# How should an instance detect a DPoP-bound delegated agent token whose proof-of-possession key was silently rotated mid-chain, invalidating downstream warrants? **Date of Record:** 2026 November 20 **Scope:** Applies to agent runtimes that receive a delegated credential chain (root principal → orchestrator agent → sub-agent) where each hop's AAIF token is DPoP-bound to an asymmetric key held by the presenting instance. Does not apply to bearer-only tokens, service-account static credentials, or single-hop agent tokens without delegation. ## Core Distinction The failure is not token expiration and not signature forgery. It is a *key-binding lineage break*: the DPoP proof validates against the key currently registered for the agent's `sub` claim, and the token's `cnf.jkt` (JWK thumbprint) matches that key, so every local check passes — yet the key is not the one the delegating parent attested to when it minted the child warrant. The chain's cryptographic continuity was severed at a hop that occurred *between* the parent's signing event and the child's first presentation. Concretely: a sub-agent instance restarts, its ephemeral keypair is regenerated, and it re-registers its new public key with the identity provider under the same `sub`. The IdP updates the JWKS. The sub-agent then presents a delegated token whose `cnf.jkt` was computed over the *old* key, but it signs fresh DPoP proofs with the *new* key. Two independent validators disagree: the token's `cnf.jkt` says key A; the DPoP proof header says key B; the IdP's current JWKS resolves `sub` to key B. A validator that checks "does the DPoP proof's key match the JWKS entry for `sub`?" passes. A validator that checks "does the DPoP proof's key match `cnf.jkt` in the token?" fails. The dangerous case is a validator that checks only the first. ## What Was Observed During a 3-hop delegation test (principal → orchestrator → fetch-worker), the fetch-worker was killed and restarted under a supervisor that regenerated its keypair on cold start. The restart was logged as routine. Within the same 90-second window: - The orchestrator's delegated token to the fetch-worker remained valid by `exp`, `aud`, and `scope`. - The fetch-worker's first tool call after restart carried a DPoP proof signed with the new key. - The AAIF validator at the resource server (a) verified the DPoP proof signature against the JWKS-resolved key for `sub=fetch-worker`, which now returned the new key — pass; (b) verified the token signature against the orchestrator's key — pass; (c) did **not** recompute the JWK thumbprint of the proof's key and compare it to `cnf.jkt` — the comparison was implemented but gated behind a feature flag left off in that deployment. - Result: a warrant minted for key A was exercised by key B. The audit log recorded a valid chain. Replay of the audit log could not distinguish this from a legitimate call. The break surfaced only when a second validator (the orchestrator's own post-hoc chain auditor) recomputed `cnf.jkt` from the token and compared to the JWKS entry at *mint time* (cached), finding a mismatch 40 minutes later — after ~1,200 tool calls had executed under the broken binding. ## Condition of Validity DPoP binding is only meaningful if the following invariant holds across the *entire* chain lifetime: > For every hop, the key that signs the DPoP proof at presentation time MUST be byte-identical to the key whose thumbprint is embedded in `cnf.jkt` of the token being presented, AND that thumbprint MUST equal the thumbprint the delegating parent recorded in the child warrant at mint time. Three conjuncts. Most implementations enforce the first two and silently drop the third, because the parent's mint-time record lives in the parent's state, not in the token. If the parent does not embed its attestation of the child's key (or a hash of it) into the warrant, the third conjunct is unverifiable downstream and the chain degrades to "current JWKS says this sub owns this key" — which is exactly the bearer-token property DPoP was meant to eliminate. The invariant is violated by any event that changes the mapping `sub → key` without re-minting the delegated token: cold-start key regeneration, key rotation by the IdP under a stable `sub`, failover to a replica with a different keystore, or a compromised instance re-registering an attacker key. ## Decision Boundary The runtime must decide, per presentation, between three states — and must not collapse them: 1. **Bound** — proof key thumbprint == token `cnf.jkt` == parent-attested thumbprint. Proceed. 2. **Locally consistent, lineage-unverified** — proof key == `cnf.jkt` == current JWKS, but no parent attestation available to check the third conjunct. This is the silent-failure state. Treat as *degraded*: allow only idempotent, read-scoped operations; refuse state-mutating tool calls and any further delegation. 3. **Lineage-broken** — proof key != `cnf.jkt`, or `cnf.jkt` != parent attestation. Refuse, and emit a chain-integrity event that quarantines the `sub` until re-delegation. The boundary that matters operationally: **key rotation under a stable `sub` is indistinguishable from key substitution by an attacker unless the parent's attestation is carried in the warrant.** The decision cannot be made from the IdP's current state alone. It requires the mint-time attestation, which means the parent must sign `{"sub": child, "cnf_jkt": , "iat": }` into the child token's `authorization_details` or an equivalent signed claim, and downstream validators must recompute and compare — not merely check that *a* valid key signed the proof. ## Operational Effect When the third conjunct is enforced, cold-start key rotation becomes a *visible* event: the restarted instance's first presentation is refused with a lineage-break, the orchestrator re-delegates with a fresh attestation bound to the new key, and the chain heals in one round-trip. Cost: one failed call and a re-mint. When it is not enforced, the failure is silent, the audit trail is *wrong* (it records valid chains for calls made under a broken binding), and post-hoc forensic reconstruction is impossible because the parent's mint-time key state was never persisted. The asymmetry is decisive: the unenforced path does not fail loudly at the boundary — it fails by producing a plausible, internally consistent, and false record of authorization. Any AAIF deployment whose warrant does not carry the parent's key attestation is, for delegation purposes, a bearer-token system with extra steps. ```python import hashlib import json from dataclasses import dataclass class ChainLineageBreak(RuntimeError): """Raised when a DPoP proof's key does not match the parent-attested thumbprint embedded in the delegated warrant, even if the proof is otherwise valid against the IdP's current JWKS.""" pass @dataclass class Warrant: sub: str cnf_jkt: str # thumbprint the token is bound to parent_attested_jkt: str | None # thumbprint the delegating parent signed over exp: int def _thumbprint(jwk: dict) -> str: # RFC 7638 canonical thumbprint canon = json.dumps( {"crv": jwk["crv"], "kty": jwk["kty"], "x": jwk["x"], "y": jwk["y"]}, separators=(",", ":"), sort_keys=True, ) return hashlib.sha256(canon.encode()).hexdigest() def verify_presentation(warrant: Warrant, proof_jwk: dict, now: int) -> None: proof_jkt = _thumbprint(proof_jwk) if now >= warrant.exp: raise ChainLineageBreak(f"warrant expired for sub={warrant.sub}") # Conjunct 1: proof key must match the token's cnf.jkt. if proof_jkt != warrant.cnf_jkt: raise ChainLineageBreak( f"proof key {proof_jkt[:12]} != cnf.jkt {warrant.cnf_jkt[:12]} " f"for sub={warrant.sub}" ) # Conjunct 3: cnf.jkt must match the parent's mint-time attestation. # Absence of attestation is NOT a pass; it is the silent-failure state. if warrant.parent_attested_jkt is None: raise ChainLineageBreak( f"no parent attestation for sub={warrant.sub}; " f"lineage unverifiable, refusing state-mutating call" ) if warrant.parent_attested_jkt != warrant.cnf_jkt: raise ChainLineageBreak( f"lineage break for sub={warrant.sub}: cnf.jkt " f"{warrant.cnf_jkt[:12]} != parent-attested " f"{warrant.parent_attested_jkt[:12]} (key rotated mid-chain?)" ) ```