Repository navigation
Commit bb8412d
committed
feat(supervisor-network): serve reserved destinations inside the proxy
Add a `ReservedStreamHandler` hook to the transparent-open path so a staged
workload connection to a reserved, unroutable address is served by the
supervisor itself instead of being policy-evaluated and dialed upstream. The
branch sits at the top of `preauthorize_transparent_open`, ahead of host
mapping, OPA, SSRF checks, and destination validation, because the address
is a label the supervisor switches on rather than a place anything could
reach. The handler is consulted before `RelayReady` is sent, so an exhausted
handler refuses the open with `ResourceExhausted` and the sandbox never
commits the workload socket. A connect to the OTLP relay address with no
handler installed is denied outright rather than falling through.
`ReservedDestination` is threaded through `ProxyHandle::start_with_bind_addr`
and `run_networking`; both supervisor call sites pass `None` until the relay
is wired in the next commit. No hyper or OTLP dependency enters this crate.
Unit tests cover the four cases: served without policy (bytes from the
workload side reach the handler), refused at capacity, denied without a
handler, and other destinations unaffected.
Refs NVIDIA#2641
Signed-off-by: Roland Huß <[email protected]>1 parent e12c36a commit bb8412d
5 files changed
Lines changed: 362 additions & 6 deletions
File tree
- crates
- openshell-supervisor-network/src
- openshell-supervisor/src
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
| 225 | + | |
225 | 226 | | |
226 | 227 | | |
227 | 228 | | |
| |||
0 commit comments