Skip to content

Commit bb8412d

Browse files
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

‎Cargo.lock‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎crates/openshell-supervisor-network/src/host.rs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ pub async fn start_host_proxy(config: HostProxyConfig) -> Result<HostProxyHandle
222222
None,
223223
None,
224224
Some(direct_listener_identity),
225+
None,
225226
)
226227
.await?;
227228

0 commit comments

Comments
 (0)