You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
mcp: per-server operator opt-in for plain-http token-bearing --mcp-server endpoints #358
Part of the dark-factory epic (stacklok/stacklok-epics#297). Pairs with titlani#40 (the kubernetes arm of the run contract), the way #341 paired with titlani#38.
Gap.#347 (CWE-319) made MCPServerList.Set reject any token-bearing --mcp-server URL that is not https or loopback. Correct default — but in-cluster schedulers (titlani) point agents at plain-http MCP Services inside a NetworkPolicy-scoped namespace, where the same short-TTL bearer already crosses the identical wire from the scheduler's own client. A pod-local proxy sidecar was considered and rejected: it satisfies the gate without changing wire security (the sidecar→service hop stays cleartext) while adding a container to every run pod.
What. An explicit, named, off-by-default operator opt-in that acknowledges the cleartext hop per server:
--mcp-server-insecure-http <name> (repeatable): relaxes ONLY the scheme check, ONLY for that server name, ONLY for the http scheme (https validation and everything else unchanged; a name with no matching --mcp-server registration is rejected at flag-parse).
Lives in the shared internal/cliconfig helper so mecated/mecatequi/mecak8s stay uniform.
Flag help + docs state the acknowledgment plainly: cleartext on the network path; the operator is relying on network-layer controls (NetworkPolicy/namespace trust) + short-lived tokens.
ADR (or an amendment to ADR 0082) recording the decision and the rejected sidecar alternative.
Security invariants preserved: default posture unchanged; no global escape hatch; per-name scope only; token still env-only; the name-charset/collision validation from #347 unchanged.
Contract addition (from titlani#40's devils-advocate pass): the scheme gate currently fires inside MCPServerList.Set — i.e. at flag-parse time, in argv order — so a relaxation flag parsed after its --mcp-server would arrive too late. The opt-in MUST be order-independent: collect --mcp-server-insecure-http names during parse and defer the scheme validation to a post-parse finalize step (or validate relaxations first). Argv ordering must not be part of the caller's contract.
Activity
feat(cliconfig): per-server --mcp-server-insecure-http opt-in, order-…