MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / validate_sandbox_auth

Method validate_sandbox_auth

crates/openshell-driver-docker/src/lib.rs:517–529  ·  view source on GitHub ↗
(sandbox: &DriverSandbox)

Source from the content-addressed store, hash-verified

515 }
516
517 fn validate_sandbox_auth(sandbox: &DriverSandbox) -> Result<(), Status> {
518 let token_present = sandbox
519 .spec
520 .as_ref()
521 .is_some_and(|spec| !spec.sandbox_token.trim().is_empty());
522 if token_present {
523 return Ok(());
524 }
525
526 Err(Status::failed_precondition(
527 "docker sandboxes require gateway JWT auth; configure [openshell.gateway.gateway_jwt]",
528 ))
529 }
530
531 fn validate_gpu_request(
532 gpu_requirements: Option<&GpuResourceRequirements>,

Callers

nothing calls this directly

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected