Architecture & security
Proof of possession
Why a stolen mandate is useless on its own, which key verifies what, the candidate wire formats (not chosen for the product), and what the POC implements.
Built from 6 source documents
Why it exists
The mandate is a bearer-style JWT shown to the human and stored on their machine. If it leaks (logs, browser history, a copy-paste), anyone could replay it — unless every request must also carry a fresh signature made with the agent's private key, which never leaves the machine. That signature is the proof of possession (PoP).
Which key verifies what
Two separate checks, two different keys, chained:
flowchart TB
subgraph s1["Step 1 — is the MANDATE authentic?"]
JWT["Mandate JWT (contains cnf = agent public key D)"] -->|"verify with B<br/>(Veritia public key, JWKS)"| OK1["authentic, unmodified<br/>→ trust its content, including cnf"]
end
subgraph s2["Step 2 — does the CALLER hold the key?"]
POP["Per-request proof (signed with agent private key C)"] -->|"verify with D<br/>(taken from the validated mandate)"| OK2["caller holds the private key<br/>matching cnf"]
end
OK1 --> POP- Veritia's key never verifies a signature made by the agent; the agent's key never verifies the mandate.
- The provider never needs a separate channel to learn agent keys: Veritia vouches for D by sealing it in a
token it signs — exactly the RFC 7800
cnfmechanism. - A copied mandate without key C → no valid proof → rejected. This is what makes it acceptable to pre-provision a token instead of minting it in a live OAuth redirect.
What the proof must cover
The wire format — not chosen for the product
| Option | Shape | For | Against |
|---|---|---|---|
(a) Custom header X-Agent-Signature | Detached Ed25519 signature over method+URL+body hash+iat+nonce, mandate as Bearer | Simple to explain | Non-standard: every provider implements it by hand; no library support |
| (b) DPoP — RFC 9449 | Authorization: DPoP <mandate> + DPoP: <proof JWT> with htm, htu, iat, jti; key bound via the thumbprint of cnf.jwk | The IETF standard for exactly this; libraries exist (Nimbus, jose, oauth4webapi); already recognised natively by Spring Security 6.5 | Plain DPoP does not cover the body — needs an extra claim (bsha) that generic middleware won't check |
| (c) HTTP Message Signatures — RFC 9421 | Signature-Input / Signature headers over chosen components (incl. a Content-Digest) | Standard, covers body and headers natively | Less common in OAuth stacks; the key-to-token binding must be specified separately |
The source documents list these three options without comparing them; the "for / against" columns above were written for this documentation (2026-11-30) as a starting point for the decision, not as a recorded conclusion.
What the POC implements
The full verification order is the 19-step check.
The stolen-token demonstration
Demo beat 6 replays a real mandate three ways (live-verified 2026-10-02 with demo/replay-no-key.sh):
| Attempt | DPoP header? | Proof signature valid? | Thumbprint matches cnf? | Result |
|---|---|---|---|---|
| Real local tool, real agent key | yes | yes | yes | 200 — balance returned |
Stolen token, no DPoP header | no | — | — | 401 missing_dpop |
| Stolen token + forged proof signed with the attacker's own key | yes | yes | no | 403 pop_key_mismatch |
The third row is the one that matters: the proof is a valid signature, just from the wrong key, and only the
thumbprint check against the sealed cnf.jwk stops it. Detail: stolen-token gap.
What PoP does not cover
Rate limiting / DDoS, the provider's general access control, its business rules, prompt injection (the request is cryptographically perfect), or a compromised machine holding both key and mandate. See threat model.