Skip to content

Commit b4f81f7

Browse files
committed
fix(server): gate only newly authored uninspected credentialed endpoints
Attaching a credentialed provider made every later `policy set` and `policy update` fail, even for unrelated edits: credentialed endpoint 'github.com:443' in rule 'pypi' uses L4-only; configure L7 inspection or explicitly set allow_uninspected_credentials: true The rule named in the error is one the operator never wrote. A sandbox image's baked policy reaches the store through the supervisor sync path, which skips the credential gate by design — rejecting that delivery would crash-loop the sandbox. Sandbox create passes too, because it only sees the request's policy plus the provider layers. Endpoint stamping then marks any endpoint overlapping a credentialed provider's host and port, so the image's L4-only `github.com:443` becomes credentialed, and every operator edit was re-validated against the whole effective policy and rejected. The operator could not even edit the offending endpoint, because that edit was rejected as well. Gate the difference on edit paths instead. An edit is rejected for the uninspected credentialed endpoints it introduces; endpoints the current policy already carries are logged and admitted. Endpoint identity is the rule name, host, port, and uninspected mode, so moving an inherited endpoint from L4-only to `tls: skip` is a fresh authoring act. Stamping is untouched and stays a full recomputation. Sandbox create and provider attach keep the strict whole-policy gate, since attaching a credentialed provider is a new credential exposure. Nothing is granted by admitting an inherited endpoint: the network supervisor still denies that traffic. Refs: NVIDIA#2998 Signed-off-by: Philippe Martin <[email protected]>
1 parent 8bc7955 commit b4f81f7

3 files changed

Lines changed: 490 additions & 22 deletions

File tree

‎architecture/security-policy.md‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,23 @@ flag defaults to `false` and is security-flagged in policy approval flows.
135135
Incremental merges only ever add the flag to a matching endpoint; clearing it
136136
requires removing the endpoint or replacing the policy.
137137

138+
Sandbox create and provider attach gate the whole effective policy. Edits to an
139+
existing sandbox policy — `policy set` and `policy update`, and the proposal
140+
evaluation behind them — gate the difference instead: an edit is rejected for
141+
the uninspected credentialed endpoints it introduces, while endpoints the
142+
sandbox's current policy already carries are logged and admitted. An endpoint's
143+
identity for this comparison is its rule name, host, port, and uninspected mode,
144+
so moving an inherited endpoint from L4-only to `tls: skip` is a fresh authoring
145+
act rather than the same finding carried forward. Stamping is unaffected and
146+
stays a full recomputation.
147+
148+
The gate has to work this way because a supervisor syncing the policy baked into
149+
a sandbox image reaches the store without passing it — rejecting that delivery
150+
would crash-loop the sandbox. Gating the whole policy on every later edit would
151+
make a policy the gateway itself admitted permanently uneditable, including the
152+
edit that would fix the offending endpoint. Nothing is granted by admitting an
153+
inherited endpoint: the network supervisor still denies that traffic.
154+
138155
The network supervisor independently enforces the same boundary. Credentialed
139156
WebSocket upgrades use the parsed relay, binary frames fail closed, and text
140157
placeholders require rewrite. REST bodies can continue streaming when body

0 commit comments

Comments
 (0)