Uniform backend contract for control-plane auth provisioning #476
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why now
PR #471 took three review rounds to land, and every blocking finding was the same class of bug: a backend that provisioned the control-plane auth invariants differently from its siblings.
gatewayvscli).gatewayJWT, soControlPlaneServerfell into open mode and handed every unauthenticated caller theclirole — reopening the exact bypass for the daemons co-located in that VM.control-plane-tokenwith its guest key, so starting/adopting Firecracker silently 401'd every already-running Docker/macOS orchestrator.None of these were logic bugs in the auth primitive. They were integration bugs: each launcher (
dockergateway,dockerinfra,macosinfra,firecrackerinfra) re-derives, by hand, how to generate the signing key, scope it to the orchestrator process, mint thegatewayJWT, inject it into the data-plane daemons, and reconcile the host key file. Miss one step and it's either a security hole or a cross-backend coexistence regression — and the tests don't catch it because each backend's provisioning is bespoke.The ask
Hoist control-plane auth provisioning out of the per-backend launchers into a single shared contract that every backend satisfies. A backend should declare what it is (combined infra VM vs standalone gateway container, co-located vs isolated data plane), and the shared layer should decide:
gatewayJWT (data-plane daemons).clitoken stays valid across simultaneously-running backends.Goal: adding a new backend, or a new data-plane daemon, means implementing the contract — not rediscovering these four invariants and failing review three times.
Scope / notes
refactor/orchestrator-gatewaywork./proc/<orch>/environ) is complementary and can fold in here or stay separate.control_auth.py's mint/verify is fine; the mess is in how each launcher wires it.