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
[MOCA SBX] Fail closed on hosts that have a credential: never fall back to an opaque tunnel #1480
Priority: P1 · Part of the Cortex × MOCA SBX epic · Not in #905's breakdown · MOCA contract: MI1 §8.5 item 4
Problem
On a laptop, falling back to an opaque tunnel when a client rejects Cortex's CA is the right call: the developer's tool keeps working. On a shared sandbox host it is a silent policy bypass. The request leaves with no credential swap, no audit and no plugins, and nobody is told. For a host that has a credential, interception must succeed or the connection must be refused.
DefaultPassthroughHosts starts with GitHub (decision.go:85), the main host that needs a credential in SBX. passthrough_hosts: [] overrides the list, but nothing turns the fallback off.
What MOCA needs
A host that matches a credential's destination.hosts is always intercepted.
SNI must equal the CONNECT host.
If upstream verification fails, the answer is 502 upstream_unverified, never a tunnel.
Every other allowed host is tunnelled opaquely, with a CONNECT audit event.
An opt-in inspect list forces interception for audit.
Design questions
One switch (tls_bridge.fail_closed), or derive it from "this host has a credential"?
How does fail-closed interact with program-keyed skip memory? Disable the skip sets entirely on this listener type?
Done when
The interception-slice conformance cases pass: SNI ≠ CONNECT host refused, and an upstream certificate failure answers 502, not a tunnel.
Activity