aic-verifier — Docs index (EN)EN
aic-verifier documentation
This is the developer and operator documentation for aic-verifier. It is
meant to be read without the source: everything below describes the surfaces,
shapes and guarantees, and points at the files to open when you want the code.
Reading paths
| You want to… | Start here |
|---|---|
| Try it in two minutes | quickstart.md |
| Decide between middleware and reverse proxy, and see the code | api.md · architecture.md |
| Turn on evidence and understand what a record means | evidence.md |
Know every Config field, record shape, constant and version |
reference.md |
| Understand why a decision is (or is not) trusted | threat-model.md |
| Put it in production: TLS, keys, monitoring, rotation | deployment.md |
| Run the examples end to end | examples.md |
| Compare SDK vs full gateway, and current non-goals | comparison.md |
The two integration styles in one paragraph
- Middleware —
cfg.Handler(mux)wraps your ownhttp.Handler. The SDK authenticates each request, refuses early, and puts the verified*AuthContexton the request context (aicverifier.FromContext). You keep your routing and your handler code.api.mdis the reference. - Reverse proxy —
NewServer(cfg, routes)runs onehttp.Serverin front of a backend and injectsX-AIC-*identity headers. Your backend does not change at all.architecture.mdhas the flow.
The DecisionServer adds a third, transport-independent style:
NewDecisionServer(cfg) exports the same admission as Decide(), HTTP, gRPC
and an admin handler, so HTTP and non-HTTP carriers make the identical decision
for one Config.
What you always get
- Missing/invalid credential → typed
*AuthError, request never reaches the handler/backend. allow_unresolvedis never silentlyallow.- With
Evidenceconfigured: recomputable DSSE-wrapped decision/admission/ outcome records, each bound to a per-admission nonce, with verified linkage. - Authorization policy (capabilities, roles, constraints, challenges) is configured, never taken from the request.
Repository layout
aicverifier.go HTTP entry (Authenticate, Handler/AuthMiddleware)
config.go Config, LoadConfigFile/ParseConfig
decision.go CLC decision core + capability ∩ principal authorization
clc.go CLCRevision, Authorize* helpers
aic.go AIC structures, AICFingerprint, HasAIC
identity.go AuthContext, FromContext, X-AIC-* propagation
challenge.go CLC-CHALLENGE-v1 refusal shape
evidence*.go decision/admission/outcome records, sinks, verify, profiles
server.go reverse proxy (Routes, outcome reporting)
decide.go DecisionServer (transport-independent Decide/Admin/Health)
audit.go audit logging (merkle-chained, TSA-signable)
mcp/ optional MCP admin-panel subpackage
examples/ runnable end-to-end examples (see examples.md)
smoke/ CLC corpus smoke suite (build tag smoke)
Other entry pages
- SECURITY.md — guaranteed properties, reporting, hardening
- CONTRIBUTING.md — build/test gates, conventions
- CHANGELOG.md — release history