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

Function close_if_stale

crates/openshell-supervisor-network/src/l7/relay.rs:990–1014  ·  view source on GitHub ↗
(guard: &PolicyGenerationGuard, ctx: &L7EvalContext)

Source from the content-addressed store, hash-verified

988}
989
990fn close_if_stale(guard: &PolicyGenerationGuard, ctx: &L7EvalContext) -> bool {
991 if !guard.is_stale() {
992 return false;
993 }
994
995 ocsf_emit!(
996 NetworkActivityBuilder::new(openshell_ocsf::ctx::ctx())
997 .activity(ActivityId::Open)
998 .action(ActionId::Denied)
999 .disposition(DispositionId::Blocked)
1000 .severity(SeverityId::Medium)
1001 .status(StatusId::Failure)
1002 .dst_endpoint(Endpoint::from_domain(&ctx.host, ctx.port))
1003 .firewall_rule(&ctx.policy_name, "l7")
1004 .message(format!(
1005 "L7 tunnel closed after policy reload [host:{} port:{} captured_generation:{} current_generation:{}]",
1006 ctx.host,
1007 ctx.port,
1008 guard.captured_generation(),
1009 guard.current_generation(),
1010 ))
1011 .build()
1012 );
1013 true
1014}
1015
1016async fn relay_jsonrpc<C, U>(
1017 config: &L7EndpointConfig,

Callers 6

relay_with_inspectionFunction · 0.85
relay_restFunction · 0.85
relay_jsonrpcFunction · 0.85
relay_graphqlFunction · 0.85

Calls 1

is_staleMethod · 0.80

Tested by

no test coverage detected