Documentation
¶
Overview ¶
Package main implements the MCP gateway service.
Request filter pipeline ¶
Every inbound request is processed through a fixed ordered pipeline of five stages before audit/analytics finalization runs unconditionally as stage 6. Stage order is security-sensitive and is fixed in code:
Stage 1 – InspectFilter: bounded body capture; RPC method and tool name extraction Stage 2 – PolicyFilter: atomic policy snapshot acquisition; OAuth metadata early-exit Stage 3 – AuthFilter: optional OAuth and adapter-certificate authentication Stage 4 – AuthzFilter: authorization and session/grant evaluation Stage 5 – UpstreamFilter: credential cleanup; path rewrite; upstream proxy Stage 6 – (orchestrator): audit/analytics finalization
Ordering guarantees:
- Authentication (stage 3) always completes before authorization (stage 4).
- The policy snapshot (stage 2) is captured once and held immutable for the entire exchange lifetime; no later stage may re-acquire it.
- Authorization consumes AuthenticatedRequest and produces EvaluatedRequest; upstream preparation (stage 5) only reads its policy and identity.
Filters have typed phase inputs and outputs (see filter.go). A non-nil FilterResponse halts processing; stage 6 runs from the HTTP orchestrator.
Source Files
¶
- analytics.go
- caller.go
- cert_reload.go
- client_ca_reload.go
- credential_broker.go
- credential_trailers.go
- dependencies.go
- exchange.go
- extensions.go
- filter.go
- filter_auth.go
- filter_authz.go
- filter_inspect.go
- filter_policy.go
- filter_upstream.go
- idempotency.go
- idempotency_store.go
- main.go
- metrics.go
- oauth.go
- policy_cache.go
- policy_state.go
- proxy.go
- public_path.go
- response.go
- rpc.go
- rpc_types.go
- session_sync.go
- status.go
- tokenfile.go
- tool_metrics.go
- types.go
- upstream_resilience.go
Directories
¶
| Path | Synopsis |
|---|---|
|
Package credential is the shared credential gateway.
|
Package credential is the shared credential gateway. |
Click to show internal directories.
Click to hide internal directories.