Skip to content

fix(server): add ConnectSupervisor and RelayStream to SANDBOX_METHODS#1475

Merged
TaylorMutch merged 1 commit into
NVIDIA:mainfrom
zanetworker:fix/oidc-supervisor-sandbox-methods
May 20, 2026
Merged

fix(server): add ConnectSupervisor and RelayStream to SANDBOX_METHODS#1475
TaylorMutch merged 1 commit into
NVIDIA:mainfrom
zanetworker:fix/oidc-supervisor-sandbox-methods

Conversation

@zanetworker
Copy link
Copy Markdown
Contributor

Summary

Add ConnectSupervisor and RelayStream to the SANDBOX_METHODS exemption list so the supervisor relay works when OIDC is enabled without mTLS.

When the gateway is configured with OIDC authentication and TLS disabled (disable_tls = true), the supervisor's ConnectSupervisor and RelayStream gRPC calls are rejected because they require an OIDC Bearer token that the supervisor does not (by design) carry. This causes sandbox connect to fail with supervisor session not connected.

The supervisor authenticates via mTLS in TLS-enabled deployments (line 339 in multiplex.rs bypasses all OIDC checks). In OIDC-only deployments, the existing SANDBOX_METHODS list exempts other supervisor RPCs (PushSandboxLogs, GetSandboxProviderEnvironment, etc.) but was missing these two relay RPCs.

Related Issue

Fixes #1470

Changes

  • Added /openshell.v1.OpenShell/ConnectSupervisor to SANDBOX_METHODS in crates/openshell-server/src/auth/oidc.rs
  • Added /openshell.v1.OpenShell/RelayStream to SANDBOX_METHODS
  • Added test assertions for both RPCs in sandbox_rpcs_are_sandbox_methods

Testing

  • mise run pre-commit passes
  • cargo test -p openshell-server -- sandbox_rpcs passes (1 test, including new assertions)
  • cargo test -p openshell-server passes (all 10 tests: 6 unit + 4 integration)
  • cargo clippy -p openshell-server --no-deps clean
  • Verified on OpenShift cluster: gateway 0.0.44, Helm chart 0.0.44, Keycloak OIDC, LoadBalancer service. Without fix: supervisor connects repeatedly, SSH relay times out. With OIDC removed (workaround): sandbox connect works end-to-end.

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (not applicable, no architectural change)

The supervisor's ConnectSupervisor and RelayStream RPCs were missing
from the SANDBOX_METHODS exemption list. When OIDC is enabled without
mTLS (disable_tls = true), these RPCs are rejected because the
supervisor does not carry an OIDC Bearer token. This causes sandbox
connect to fail with "supervisor session not connected".

Both RPCs are exclusively called by the sandbox supervisor, matching
the existing SANDBOX_METHODS pattern. They already work in mTLS-only
mode where all requests pass via the TLS handshake.

Fixes NVIDIA#1470

Signed-off-by: Adel Zaalouk <azaalouk@redhat.com>
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented May 20, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 20, 2026

All contributors have signed the DCO ✍️ ✅
Posted by the DCO Assistant Lite bot.

@sjenning
Copy link
Copy Markdown
Contributor

Can confirm this issue and that this fixes it 👍

@zanetworker
Copy link
Copy Markdown
Contributor Author

recheck

@zanetworker
Copy link
Copy Markdown
Contributor Author

zanetworker commented May 20, 2026

I have read the DCO document and I hereby sign the DCO.

@pimlock
Copy link
Copy Markdown
Collaborator

pimlock commented May 20, 2026

/ok to test 53f794b

@TaylorMutch TaylorMutch merged commit bdaa08f into NVIDIA:main May 20, 2026
42 of 44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Supervisor ConnectSupervisor and RelayStream RPCs rejected when OIDC is enabled without mTLS

4 participants