Repository navigation
Commit b4f81f7
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
- crates/openshell-server/src/grpc
- docs/sandboxes
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
138 | 155 | | |
139 | 156 | | |
140 | 157 | | |
| |||
0 commit comments