Status: v0.4.0. Steps 1 to 6 are implemented: caller authentication by WIT with WPT or HTTP signatures, mTLS, JWT-SVID and OAuth access tokens, bearer or DPoP-bound; AAT, asor-03 and RFC 8693 act chains (decoders and per-format checks, then the format-neutral invariant engine and an authority algebra per detail type); audit events, OpenTelemetry spans and the chain view; revocations received as OpenID Shared Signals. Items marked Open need a decision before the code that depends on them.
Request pipeline
Section titled “Request pipeline”One ext_authz Check call runs these steps in order and stops at the first failure.
inbound request (via Envoy / Istio / agentgateway ext_authz) 1. sanitize check the target, ignore forwarding headers (strip them on an allow) 2. authenticate Authenticator -> Authenticated (caller id, method, bound user token, proof key) 3. chain ChainDecoder plugins -> NormalizedChain -> invariant engine -> authority algebra signals user token and chain principal against received Shared Signals revocations 4. authorize AuthZEN 1.0 evaluation request -> decision (fail closed) 5. mint Txn-Token (typ txntoken+jwt) -> ok_response header, credential and chain headers removed 6. record audit record + OpenTelemetry span + reason code1. Sanitize
Section titled “1. Sanitize”- Deny requests for authorities outside
allowed_authorities, and request targets an upstream could read differently from the path the PDP sees (request.unnormalized_path, listed indocs/bindings.md). - After steps 2 and 3, an inbound
Txn-Tokenis accepted only from a workload listed ininternal_callersthat proved possession of a key for the request (WIT with WPT or HTTP signature, or mTLS). It is verified and forwarded unchanged, or replaced when this hop verified a chain (tctx.chain:<caller>). From anyone else it is denied (txn.untrusted_hop). - Never forward the inbound access token downstream (MCP security best practices, Txn-Token draft §13).
Authorization,Workload-Identity-Token,Signature-Input,Signature,AAT-Chain,AAT-PoP,Agent-Delegation-Chain,DPoPand the user token header are removed from an allowed request. - Never read
ForwardedorX-Forwarded-*for a decision. On an allow, remove the ones a client can set to name another host, port, prefix or path (Forwarded,X-Forwarded-Host,-Port,-Prefix,-Uri, andX-Original-URL,X-Rewrite-URL), whatever the previous hop.X-Forwarded-For,X-Forwarded-ProtoandX-Forwarded-Client-Certstay with the proxy, which sets or sanitizes them (Envoyuse_remote_address,forward_client_cert_details).
2. Authenticate
Section titled “2. Authenticate”visado_credentials::Authenticator picks one method by what the request carries:
| Method | Input | Built on |
|---|---|---|
wit-wpt |
Workload-Identity-Token + Authorization: WPT |
wimsey-wit, wimsey-wpt |
wit-httpsig |
WIT + RFC 9421 signature | wimsey-httpsig (needs with_request_body for digests) |
mtls |
peer certificate from CheckRequest.attributes.source |
wimsey-mtls, SPIFFE X.509-SVID, one CA per trust domain |
jwt-svid |
bearer JWT-SVID | jsonwebtoken, SPIFFE bundle file per trust domain |
oauth-at |
bearer or DPoP-bound access token | jsonwebtoken (RS256 needed for Dex and Keycloak), configured JWKS |
Trust rules:
- Trust anchors and JWKS locations are configured per trust domain. Keys are never fetched from URLs found inside a token.
- Audience is an exact string match.
- Clock leeway is 30 s, at most 60 s (
Authenticator::with_leeway); the server file does not set it. - WPT
jti, HTTP signaturenonceand DPoPjtireplay are checked against bounded caches, one per proof type, each with a per-caller quota (see bindings.md). - DPoP proofs can be required to carry a server-provided nonce (RFC 9449 §9). Nonces are stateless (an issue time under an HMAC), so replicas that share the key accept each other’s.
Method selection, the Envoy settings each method needs, and their limits are in bindings.md.
3. Delegation chain
Section titled “3. Delegation chain”Three layers, so a new draft is a new plugin:
- A decoder per format (
ChainDecoderfor AAT and asor,visado_chain_act::Verifier::decodeforact) parses, canonicalizes, checks signatures and links (par_hash, or nesting only), and produces aNormalizedChain. The format’s request checks (proof of possession, status, audience, action) follow in the same crate. - A format-neutral invariant engine (
visado_chain::invariants::Engine) then checks the normalized chain again, whatever the format. The per-format checks stay; the engine must agree with them, and the gate runs it on every chain after them. In order, each with its deny code:- shape: one to 32 hops, depths
0..nin order (chain.malformed) - links: the first hop is the root, signed by the trust anchor; every later hop names its parent’s actor as delegator and is signed by the key its binding names, the parent’s
cnfor the anchor; a nested hop shares its parent’s token (chain.link_mismatch) - the principal never changes (
chain.principal_altered) expis monotone: no hop outlives its parent (chain.exp_extended)- depth limits hold, read per profile (
DepthSemantics::{AsorStrict, AatHolderCap, Uncapped}, see below;chain.depth_exceeded) - audiences only narrow: a hop’s audience is a non-empty subset of the restriction in force, and a hop without one inherits it (
chain.audience_widened) - no delegation token repeats (
chain.token_repeated). A holder may repeat: AAT-02 §6.2 lets a holder derive a token for itself, and the AAT vectors cycle keys - verified hops end the chain and the leaf is verified (
chain.unverified) - every verified hop’s authority type has an algebra (
chain.unknown_authority), and each verified hop’s authority is subsumed by its verified parent’s (chain.scope_escalation) - status holds: no status reference is left unchecked (
chain.status_unchecked) - proof of possession holds:
holder_proofis true (chain.no_holder_proof) - the action is allowed: the leaf’s authority permits it (
chain.action_denied)
- shape: one to 32 hops, depths
- An
AuthorityAlgebraper RAR detail type implementssubsumes(parent, child)andpermits(leaf, action); anAlgebrasregistry maps a type to its algebra, and unknown types are denied. Each format crate implements its own type, from the same rules its decoder applies:attenuating_agent_token(AAT §8 step 4p and step 6b),agent_delegation(asor §4.3 rules 1 to 3 and step 8, without running totals) andrfc8693-act(only the empty authority, which subsumes only itself and permits a request only when no action is asked of the chain, since RFC 8693 gives an actor no authority; the gate asks none of anactchain).
del_max_depth means different things in the two drafts, so the engine reads Hop::max_depth per profile, fixed by the profile rather than configured, and the audit record of an accepted chain names it (depth_semantics):
AsorStrict(asor-03): only the first hop’s bound limits the chain.Hop::max_depthisDT_0.del_max_depth - 1on every hop; every depth must be at most it.AatHolderCap(AAT-02): every hop carries its own cap. Each depth is at most its hop’smax_depth, and no hop raises its parent’s.Uncapped(RFC 8693act): no per-hop bound; the adapter’smax_actorsand the engine’s 32 hops apply.
struct NormalizedChain { profile: Profile, principal: Principal, root: TrustRef, hops: Vec<Hop>, holder_proof: bool }struct Hop { id: String, depth: u32, max_depth: Option<u32>, actor: ActorId, principal: Principal, delegator: Option<ActorId>, signer: KeyThumbprint, signer_binding: SignerBinding, // RootAnchor | ParentCnf link: Link, // Root | ParHash | Nested authority: Authority, validity: Validity, audience: Option<Vec<String>>, cnf: Option<Cnf>, status: Option<StatusCheck>, // Unchecked | Valid assurance: Assurance, // Verified | Declared}Only Verified hops are used for authorization, and only when holder_proof is true: the presenter proved possession of the leaf key for this request. ChainDecoder::decode checks the chain only and sets it to false. Declared hops, such as prior actors in a nested RFC 8693 act claim, go to the Txn-Token context and the chain view only.
Order of formats:
- AAT (draft-niyikiza-oauth-attenuating-agent-tokens-02): 229 published vectors, and each hop is signed by the parent’s
cnfkey. - asor (draft-asor-wimse-agent-delegation-chain-03): 36 published vectors; every hop is signed by a trust anchor, the leaf key is proven with DPoP, and each
statusreference is checked against a Token Status List the gate holds. - RFC 8693
actadapter: the actors of a verified access token’sactclaim, signed by its issuer. The current actor isVerifiedonce it is bound to the authenticated caller; prior actors stayDeclaredand never reach the PDP, as RFC 8693 §4.1 requires. Its actors have no key; the gate reads the chain only from a user token bound to a WIT caller, or from a DPoP-bound access token, so the caller proved possession of a key for the request andholder_proofis true there. - Delegate SD-JWT once it has vectors.
Shared Signals
Section titled “Shared Signals”With [ssf] configured, the gate checks the user token and the sub principal of a verified chain against revocations received from OpenID Shared Signals Transmitters, after the chain step and before the PDP. visado-ssf holds the protocol and the store; the server does the I/O.
- Each
[[ssf.streams]]names a Transmitterissuer. Its keys and verification endpoint come from the Transmitter Configuration Metadata at/.well-known/ssf-configurationunder the issuer (SSF 1.0 §7.2), whoseissuermust match. Keys are fetched again everykey_refreshand, at most every 30 s, when a SET names an unknown key. - Delivery is push (RFC 8935:
POSTtopush_pathon the HTTP listener,application/secevent+jwt,Authorizationcompared withpush_authorization_env) or poll (RFC 8936:poll_endpointeverypoll_interval, acknowledging what verified and reporting what did not in the next request). - A verified CAEP
session-revokedorcredential-change, or RISCaccount-disabled,account-purgedorsessions-revoked, revokes aniss_sub,emailoropaquesubject forhorizonseconds after the event.subject_issuerslists the token issuers the stream may revoke. - A token issued before the event is denied:
ssf.session_revokedorssf.credential_changed(401 with a challenge, so the caller gets a new token),ssf.account_disabled(403). - A stream that has not proven itself within
max_staleness(a successful poll, or any verified SET, including the Verification events visado asks for everyverify_interval) denies the tokens of itssubject_issuerswithssf.stream_stale(503). A full store that had to drop a revocation denies them withssf.store_full(503) until that event’s horizon passes. - The lookup hashes the issuer and value with SHA-256 and reads a
HashMapunder a read lock; it allocates nothing, and a token from an issuer no stream covers costs one pass over the streams.cargo bench -p visado-ssftimes it. - The store is in memory and per replica; a restart loses it, and each replica needs its own push or poll. Choices against the specs are in
SPEC-MAP.md.
4. Authorize
Section titled “4. Authorize”AuthZEN 1.0 POST /access/v1/evaluation at the configured [pdp] endpoint. visado_authzen::discover reads the endpoint from /.well-known/authzen-configuration; the server does not use it yet.
Open: the agent-and-principal profile. AuthZEN does not say how to carry an agent acting for a user. What visado sends:
subjectis the caller (type: agent, orclientfor an OAuth client;id: its identifier).resourceistype: http_resourcewithscheme://authority/pathasid;action.nameis the HTTP method.context.principalis the user (type: user), when the caller acts for one.context.scope,context.auth_methodandcontext.txn.context.chainfor a verified chain:profile,issuer,depth,holders(key thumbprints, root first), the leaf’sauthorityand theprincipal. Anactchain has its own shape (bindings.md).
To be proposed to the AuthZEN WG once it works end to end.
X-Request-IDis set to thetxnvalue and checked in the echo.- Timeouts, transport errors, non-200 responses or a non-boolean
decisionall deny. - The PDP endpoint must be
httpsor a loopbackhttpaddress: whoever answers it decides the request.[pdp] allow_insecure_http = trueallows plainhttpto another host, for a network nothing else can reach, and logs a warning at startup.bearer_envalways needshttpsor loopback. The endpoint, the OTLP endpoint and the status list URIs must not carryuser:password@; the startup log names the PDP byscheme://host:portonly. [pdp] context_in_subjectalso copies thecontextmembers intosubject.properties, for PDPs that do not passcontextto the policy (Cerbos).
5. Mint the Transaction Token
Section titled “5. Mint the Transaction Token”Per draft-ietf-oauth-transaction-tokens-11:
- Header
typ: txntoken+jwt, signed with the trust domain’s key:Ed25519orES256, orRS256when[signing_key]names an RSA private JWK of at least 2048 bits with the exponent 65537 (for recipients that verify RS256 only, such as kontxt). JWKS is published at/.well-known/jwks.json. - Claims:
aud: trust domaintxn: UUID, also the correlation id everywheresub: principalscope: never wider than the authorized scopereq_wl: caller workload idiat,exp: short, default 60 stctx:agent,auth_method, andchainas sent to the PDP (with prior actors foract)rctx:methodandresource
- Injected with
ok_response.headers(Txn-Token, overwrite), with the credential and chain headers inheaders_to_remove. Thetxnalso goes intodynamic_metadatafor later filters and access logs. - Not built yet: a token endpoint (RFC 8693 profile) for services that want a Txn-Token without the gateway. Replacement is in
visado-txn-tokenalready:txn,subandaudstay the same, scope never widens, and expired tokens are refused. - Open: there is no
subject_token_typeURN for a WIT. Use a private URN and propose one to the WIMSE and OAuth WGs.
6. Record
Section titled “6. Record”- One audit record per decision on stdout, as a JSON log line under
visado::audit, the service’s own denials (request.no_http_attributes,request.invalid_header,internal.clock) included. Its members and hash are specified in audit.md. No credential is copied into it, JWS-looking text in any member is replaced by[token], and a claim that does not parse is described, not quoted. - It has the AIMS §11 minimum: agent, delegated subject and the verified chain, resource and MCP tool, action and decision, time and
txn, posture inputs (auth_method,sender_constrained, the chain,pdp), andremediationwith its cause (reason,detail). The records are hash-chained per process (seq,prev,hash) for tamper evidence. A denial from a received Shared Signal is recorded with itsssf.*code and, indetail, the event time and the token’siat. - OpenTelemetry: one
visado.authorize {target}span withhttp.request.method,url.full,visado.txn,visado.agent,visado.principal,visado.decisionandvisado.reason. Not yet: per-hop span events and GenAI or MCP semantic-convention attributes. - Deny reasons are stable, language-neutral codes, listed in bindings.md. The Transaction Token vectors share the
txn.*codes. For example:token.expiredwpt.replaychain.link_mismatchchain.scope_escalationpdp.unavailable
Chain view
Section titled “Chain view”Off by default. With [chain_view] enabled = true the gate keeps a summary of each recent decision in a bounded in-memory ring buffer (capacity, default 256, at most 10000; 0 keeps none; the oldest entry is dropped first, and everything is lost on restart). Denials of unauthenticated requests are recorded too, so anyone who can reach the proxy can push real entries out: the view is a debugging aid, not an audit trail, which is the visado::audit log. The HTTP listener serves:
| Route | Returns |
|---|---|
GET /api/requests?limit=N |
{"capacity": n, "requests": [...]}, newest first; limit defaults to 100 and is capped by the capacity |
GET /api/requests/{id} |
one summary, or 404 {"error": "not_found"} |
GET /chain |
a single page (plain HTML, CSS and JS in crates/server/ui/, embedded with include_str!; no build step, no CDN) that polls the list every 2 s and draws principal → hops → caller → PDP → decision, with verified hops solid, declared hops dashed and the deny reason on the decision |
A summary holds:
id: the check’s own identifier (thetxnthe gate would mint with), unique per checktxn: the transaction, which a forwarded Transaction Token keeps across hopstime,method,resource(scheme://authority/path, no query)caller,auth_method,principal, each once knowndecision,status,codepdp:{"result": "allow" | "deny"}or{"result": "error", "code": ...}, ornullwhen the PDP was not askedchain:profile,issuer,principal,holder_proof, and per hopdepth,actor_kind(key,nameorsubject),actor,actor_issuer,assurance(verifiedordeclared),link(root,par_hashornested) and the holder key thumbprint; only for a chain that verified
It never holds a token, proof, signature, digest, header value, body or the hop’s authority. The request path is shown as received, without the query: an upstream that puts a secret in the path (/hooks/<secret>) exposes it here, as it does in access logs. Strings are cut to 256 characters and chains to 32 hops (hops_omitted counts the rest).
Deployment modes
Section titled “Deployment modes”- ext_authz server (v0):
tonic+envoy-typesgRPC. One server covers Envoy, Istio (CUSTOMaction) and agentgateway, which vendors the same proto. The port listens on loopback unless[grpc_tls]requires the proxy’s client certificate orgrpc_reachable_only_by_proxyis set (bindings.md). - Token endpoint and UI (v0):
axumfor the RFC 8693 endpoint, JWKS, health, and the chain view (/api/requests,/chain; see Chain view). The token endpoint is not built yet. - agentgateway ExtMcp (later): tool-aware AuthZEN requests at the MCP method layer.
- Standalone PEP (later, only if asked):
hyper1.x +tower+rustls. Notpingora, which brings its own lifecycle and OpenSSL by default.
Workspace layout
Section titled “Workspace layout”crates/ txn-token mint, verify, replace (published on its own) chain ChainDecoder trait, NormalizedChain, invariants, algebra, DPoP checks and nonces chain-aat AAT decoder chain-asor asor decoder and status lists chain-act RFC 8693 act adapter authzen AuthZEN 1.0 client and the agent profile ssf Shared Signals receiver: SET validation, push and poll messages, revocation store credentials caller authentication (wraps wimsey) extauthz decision pipeline and Envoy ext_authz server server binary: config, JWKS, chain view, telemetry, status list refresh server/ui/ chain view (plain HTML, CSS and JS), embedded with include_str! testkit test fixtures and the lab helpers (unpublished)conformance/ vectors, one JSON file or directory per suitefuzz/ cargo-fuzz targetsdeploy/local/ a configuration for cargo rundeploy/lab/ compose file for the end-to-end labReference lab (aims-lab)
Section titled “Reference lab (aims-lab)”Not built as drawn. deploy/lab runs Keycloak as the Resource AS, redeeming ID-JAGs that Casdoor issues, since no Dex release issues them yet. The agents are demo.sh callers, not services; agentgateway routes /mcp to a small MCP server (deploy/lab/mcp), and the attack demos are in deploy/lab/attacks. The plan:
user --login--> Dex (ID-JAG issuance, master build)agent A --ID-JAG--> Keycloak 26.7+ (Resource AS, experimental feature) --> access tokenagent A (SPIRE WIT-SVID) --WIT+WPT, delegation token--> [Envoy + visado] --Txn-Token--> agent Bagent B --> [Envoy + visado] --> MCP servervisado --AuthZEN--> OPA with the AuthZEN pluginKnown setup constraints, from reading the code (not yet run):
- the Dex client id must equal the Keycloak clientId
- the ID-JAG audience must be the Keycloak realm issuer
- Keycloak users must be pre-linked by Dex’s opaque
sub
The attack demos, drawn from research/05-threats.md, run in deploy/lab today (attacks):
- a prompt-injected agent widening its delegation
- a stolen chain replayed by another workload
- agent-to-agent escalation: a ticket recruits the admin agent
- exfiltration within granted scope, which visado does not stop
Open questions
Section titled “Open questions”- Which ID-JAG revision to accept: the MCP extension cites -04 and the latest is -06. Proposal: accept both and record which one passed.
- The Txn-Token draft does not define a representation of the call chain across replacement. visado carries the chain context in
tctx.chain, and intctx.chain:<caller>on a replacement (seeSPEC-MAP.md). Open: whether to propose it to the OAuth WG. - Key storage beyond files (KMS/HSM) and per-trust-domain key separation.
- Name of the WIT
subject_token_typeURN to propose.
© 2026 The visado Authors. Licensed under Apache-2.0.
Third-party logos are trademarks of their respective owners and are used to show compatibility; their use does not imply endorsement.