Important
CTF Pilot Flight Ops replaces Kube-CTF, and is the actively maintained instancing system for CTF Pilot.
CTFd plugin for integrating challenge instance lifecycle with the CTF Pilot Flight Ops dispatcher.
It acts as the main connection system between CTFd and Flight Ops, allowing to integrate challenge start and stop directly into the CTFd interface, allowing teams to start and stop their instances.
This plugin follows the same principles as the kube-ctf CTFd plugin, but have been rebuildt to fit with the CTF Pilot Flight Ops system.
- Custom CTFd challenge type:
flightops - Admin configuration panel for dispatcher and JWT settings
- Backend-owned API contract for the CTFd frontend (not raw dispatcher passthrough)
- JWT auth to dispatcher with Flight Ops claim shape
- Production-focused error mapping and rate limiting
- Frontend status polling
- Copy
src/intoCTFd/plugins/. - Install dependencies from
src/requirements.txt. - Restart or start CTFd.
- Open
/admin/flight_opsand configure dispatcher + JWT settings.
Add this block in your active CTFd theme challenge.html:
{% block kubectf_info %}
{% endblock %}Recommended placement: below the connection info area.
The plugin exposes a frontend-facing status API:
GET /api/flight_ops/specGET /api/flight_ops/{flight_plan}POST /api/flight_ops/{flight_plan}with JSON body{ "action": "create" | "extend" | "terminate" }
{
"apiVersion": "v1",
"kind": "flight-ops-status",
"flight_name": "demo-flight",
"connection_strings": [
"https://challenge.example.com",
"ncat --ssl challenge.example.com 443"
],
"expires_at": "2026-01-01T01:00:00Z",
"started_at": "2026-01-01T00:00:00Z",
"status": "pending|ready|landed|failed|missing|unknown"
}The response intentionally avoids Kubernetes resource-like structure and only includes essential values used by the challenge UI.
GET /api/flight_ops/spec returns polling metadata (base interval, max interval, backoff multiplier, jitter, and statuses that should be polled).
createmaps to:POST /api/flightplans/{name}/departextendmaps to:POST /api/flights/{name}/refreshterminatemaps to:POST /api/flights/{name}/land- Status lookup chooses the most relevant flight for the caller and plan.
The plugin creates JWTs with required dispatcher claims, including iss, aud, exp, iat, nbf, jti, and flight context.
CTFd path: /admin/flight_ops
Required:
- Dispatcher URL
- JWT Secret
- JWT Issuer
Optional:
- JWT Audience (default:
ground-control-dispatcher) - JWT Expiration seconds (default:
120) - Terminal ID (default:
ctfd) - Request timeout seconds (default:
10)
Environment variable overrides are supported:
FLIGHT_OPS_DISPATCHER_URLFLIGHT_OPS_JWT_SECRETFLIGHT_OPS_JWT_ISSUERFLIGHT_OPS_JWT_AUDIENCEFLIGHT_OPS_JWT_EXPIRATIONFLIGHT_OPS_TERMINAL_IDFLIGHT_OPS_REQUEST_TIMEOUT
The challenge view polls status while flights are pending or ready.
Polling behavior:
- Base interval:
5000ms - Exponential backoff multiplier:
1.6 - Max interval:
30000ms - Per-request jitter: up to
750ms
Polling stops automatically on terminal status (missing, landed, failed, unknown).
The backend emits structured status-sync logs with challenge, status, method, and request latency.
Run tests with:
python -m unittest discover -s tests -p "test_*.py"We welcome contributions of all kinds, from code and documentation to bug reports and feedback!
Please check the Contribution Guidelines (CONTRIBUTING.md) for detailed guidelines on how to contribute.
To maintain the ability to distribute contributions across all our licensing models, all code contributions require signing a Contributor License Agreement (CLA).
You can review the CLA here. CLA signing happens automatically when you create your first pull request.
To administrate the CLA signing process, we are using CLA assistant lite.
A copy of the CLA document is also included in this repository as CLA.md.
Signatures are stored in the cla repository.
This repository is licensed under the EUPL-1.2 License.
You can find the full license in the LICENSE file.
We encourage all modifications and contributions to be shared back with the community, for example through pull requests to this repository.
We also encourage all derivative works to be publicly available under the EUPL-1.2 License.
At all times must the license terms be followed.
For information regarding how to contribute, see the contributing section above.
CTF Pilot is owned and maintained by The0Mikkel.
Required Notice: Copyright Mikkel Albrechtsen (https://themikkel.dk)
We expect all contributors to adhere to our Code of Conduct to ensure a welcoming and inclusive environment for all.