(guard: &PolicyGenerationGuard, ctx: &L7EvalContext)
| 988 | } |
| 989 | |
| 990 | fn 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 | |
| 1016 | async fn relay_jsonrpc<C, U>( |
| 1017 | config: &L7EndpointConfig, |
no test coverage detected