APF Gateway Interceptor for OpenShell
APF’s gateway interceptor puts OpenShell’s control plane under signed policy. It injects the signed sandbox policy at admission, refreshes it on running sandboxes, and refuses direct policy edits, agent-authored proposals, draft approvals, and provider and profile changes outside the bundle. It does not bind every OpenShell RPC that can affect a sandbox. Refer to Enforcement Coverage and Limitations. It runs inside apf-policy-gateway and implements OpenShell’s openshell.gateway_interceptor.v1.GatewayInterceptor service.
Manifest
APF returns this manifest from Describe:
Bindings
APF declares 14 bindings. Every governance binding fails closed. The two post-commit bindings are observational and fail open, as OpenShell requires.
Every RPC uses the openshell.v1.OpenShell/ service prefix. Register APF with OpenShell’s default binding_policy = "dynamic". OpenShell’s allowlist and exact policies accept only one binding per configured RPC, and APF declares three each on CreateSandbox and UpdateConfig, so exact stops the OpenShell gateway from starting and allowlist cannot include admission. Refer to OpenShell gateway interceptors.
Governance Decisions
Governance decisions write an audit record to apf-policy-gateway-interceptor-audit.jsonl. A few outcomes write none: a refresh denied because the served projection has no provenance token, a sandbox creation or refresh that fails because the policy service is unreachable, a successful configuration validation, an allowed settings-only update, and post-commit calls. Provider operations do record an unreachable policy service, as interceptor.govern_denied.policy_service_unavailable. Admission decisions are listed on Sandbox Admission. The others are:
Allowed governance operations are recorded too, for example with interceptor.provider_type_allowed, interceptor.provider_profiles_allowed, and interceptor.policy_analysis_allowed. Every denial also carries the correlation ID in OpenShell’s log annotations under apf.nvidia.com/correlation-id, so OpenShell’s log entry and APF’s audit record join on it.
Provider Profile Snapshots
When OpenShell lists APF’s interceptor in provider_profile_sources, it calls SnapshotProviderProfiles to read the bundle’s provider catalog. APF builds the snapshot from the policy service’s openshell.provider-profile.v1 documents and verifies each one:
- The provenance token’s signature verifies, and its signer is the configured document key ID.
- The token names a bundle and a non-zero version, and the version and digest match the response.
- The body hashes to the digest.
- Every document comes from the same bundle and version. If the policy changes during the snapshot, the snapshot fails rather than mix identities.
The snapshot revision is a hash of the verified content, the bundle identity and version, and the verifier identity, so it changes when the catalog, the bundle revision, or the verifying key changes. Any invalid profile fails the whole snapshot.
Caller Authentication
Only the OpenShell gateway may call the interceptor. In authenticated mode, every call must carry a valid OpenShell extension JWT for the interceptor’s audience, and APF rejects supervisor credentials. Refer to Configure Service Authentication.
The interceptor accepts gRPC messages up to 8 MiB.
Failure Behavior
Next Steps
- To register the interceptor, refer to Add APF to OpenShell.
- To see the admission flow in detail, refer to Sandbox Admission.