(&mut self, request: tonic::codegen::http::Request<B>)
| 73 | } |
| 74 | |
| 75 | fn call(&mut self, request: tonic::codegen::http::Request<B>) -> Self::Future { |
| 76 | let sandbox = request |
| 77 | .headers() |
| 78 | .contains_key(libatomic::daemon::sandbox_grants::SANDBOX_TOKEN_METADATA); |
| 79 | let path = request.uri().path().to_string(); |
| 80 | if sandbox && !libatomic::daemon::sandbox_grants::is_sandbox_scoped(&path) { |
| 81 | let refused = tonic::Status::permission_denied(format!( |
| 82 | "atomic:FORBIDDEN: a sandbox may not call {path}" |
| 83 | )) |
| 84 | .into_http(); |
| 85 | return Box::pin(async move { Ok(refused) }); |
| 86 | } |
| 87 | Box::pin(self.0.call(request)) |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | #[derive(Clone)] |
nothing calls this directly
no test coverage detected