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

Function with_sandbox

crates/openshell-server/src/grpc/policy.rs:3938–3949  ·  view source on GitHub ↗
(mut request: Request<T>, sandbox_id: &str)

Source from the content-addressed store, hash-verified

3936 /// Use for tests that exercise sandbox-caller code paths.
3937 #[allow(dead_code)]
3938 fn with_sandbox<T>(mut request: Request<T>, sandbox_id: &str) -> Request<T> {
3939 request
3940 .extensions_mut()
3941 .insert(Principal::Sandbox(SandboxPrincipal {
3942 sandbox_id: sandbox_id.to_string(),
3943 source: SandboxIdentitySource::BootstrapJwt {
3944 issuer: "openshell-gateway:test".to_string(),
3945 },
3946 trust_domain: Some("openshell".to_string()),
3947 }));
3948 request
3949 }
3950
3951 #[test]
3952 fn security_notes_use_canonical_internal_ip_classifier() {

Calls 1

SandboxClass · 0.85

Tested by

no test coverage detected