Skip to content

Commit 53f794b

Browse files
committed
fix(server): add ConnectSupervisor and RelayStream to SANDBOX_METHODS
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 #1470 Signed-off-by: Adel Zaalouk <azaalouk@redhat.com>
1 parent be6ac9e commit 53f794b

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

  • crates/openshell-server/src/auth

crates/openshell-server/src/auth/oidc.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ const SANDBOX_METHODS: &[&str] = &[
5151
"/openshell.v1.OpenShell/SubmitPolicyAnalysis",
5252
"/openshell.sandbox.v1.SandboxService/GetSandboxConfig",
5353
"/openshell.inference.v1.Inference/GetInferenceBundle",
54+
"/openshell.v1.OpenShell/ConnectSupervisor",
55+
"/openshell.v1.OpenShell/RelayStream",
5456
];
5557

5658
/// Methods that accept either an OIDC Bearer token (CLI users, full scope)
@@ -469,6 +471,10 @@ mod tests {
469471
assert!(is_sandbox_method(
470472
"/openshell.inference.v1.Inference/GetInferenceBundle"
471473
));
474+
assert!(is_sandbox_method(
475+
"/openshell.v1.OpenShell/ConnectSupervisor"
476+
));
477+
assert!(is_sandbox_method("/openshell.v1.OpenShell/RelayStream"));
472478
}
473479

474480
#[test]

0 commit comments

Comments
 (0)