# What happens when an instance accepts a DID-anchored agent passport whose verifiable credential was valid at handoff but whose issuer's key rotation event lands between verification and first privileged action **Date of Record:** 2026 November 29 **Scope:** Applies to cross-org agent federation where an inbound agent presents a W3C Verifiable Credential (VC) bound to a DID, and the receiving org caches the verification result to authorize a *subsequent* privileged action (tool call, resource grant, downstream handoff). Does not apply to synchronous single-call verification where authorization and action share one transaction, nor to symmetric shared-key trust where there is no issuer key lifecycle. ## Core Distinction The failure is not "expired credential" or "revoked passport." Those are detected at verification time by checking `expirationDate` or a status list. The non-obvious boundary is the **verification-to-action gap under issuer key rotation**: a VC can be cryptographically valid the instant it is checked, and the DID document that resolves the issuer's signing key can still be *correct for that instant*, yet the issuer rotates or deactivates that key before the holder's agent executes the privileged action it was just authorized for. The credential's signature does not re-validate against the new key state, and a naive federation gateway treats "verified once" as "trusted for the session." The invariant that silently breaks is: *a positive verification result is only meaningful relative to the key-state snapshot at verification time, and must be re-evaluated against key-state at action time — or the action must be causally bound to the snapshot.* The distinction that matters operationally: **identity freshness ≠ credential validity ≠ key-state currency.** Most federation stacks conflate the first two and ignore the third. ## What Was Observed A receiving-org gateway (Org B) admitted an inbound research agent from Org A. The agent presented: - a DID `did:web:agents.org-a.example` with a DID document listing an Ed25519 verification method `#key-2025-03` and a `capabilityInvocation` relationship, - a VC signed by Org A's *issuer* DID `did:web:issuer.org-a.example`, asserting `agentCapability: ["read:dataset-7", "write:scratch"]`, valid for 3600s, - a presentation proving the agent controls the subject DID. Org B's gateway resolved both DIDs, checked the VC signature against the issuer key, checked `expirationDate`, checked the revocation status list, and cached `{subject: did:web:agents.org-a.example, caps: [...], verified_at: T0, ttl: 3600}` in its admission cache. The agent then entered a multi-step planning loop (tool discovery, schema negotiation over A2A, a cold-start memory sync) that took ~14 minutes before it issued its first `write:scratch` call. At T0+14min the issuer rotated `#key-2025-03` to `#key-2025-06` and marked the old key `deactivated` in the DID document — a routine compromise-hygiene rotation. Org B's cached admission was still live (TTL 3600s). The `write:scratch` call was authorized against the cache, executed, and wrote to a shared scratch namespace. Nothing in the request path re-resolved the issuer DID. The action was authorized by a credential whose *issuer's authority to have issued it* had, by the issuer's own current key state, been withdrawn. The trace, compressed: ``` T0 gateway.verify(vc) -> OK, cache.put(ttl=3600) T0+14m issuer.rotate(#key-2025-03 -> #key-2025-06, deactivate old) T0+14m agent.call(write:scratch) -> cache.hit(verified_at=T0) -> ALLOW T0+14m+ gateway never re-resolves issuer DID document ``` The failure is silent. No exception, no audit anomaly, no signature mismatch — because no signature was re-checked. The gateway did exactly what it was built to do. ## Condition of Validity The cached-admission pattern is sound **only** under a conjunction that is almost never stated explicitly: 1. **Key-state immutability window:** the issuer guarantees no rotation or deactivation of the signing key for the full duration of any downstream authorization TTL. This is a cross-org promise Org B cannot verify and Org A rarely publishes. 2. **Causal binding:** the privileged action is causally downstream of the verification event within a single trust transaction — i.e., the action's authorization token *is* the verification, not a reference to it. 3. **Monotonic authority:** the issuer's authority over the subject does not degrade between verify and act. False for any rotation triggered by compromise, offboarding, or scope reduction. When any conjunct fails — and in federated settings at least one usually does — the cache becomes a **stale-authority amplifier**: it extends the lifetime of a trust decision past the lifetime of the evidence that justified it. The wider the gap between verification and first privileged action (long planning loops, cold-start memory syncs, multi-hop A2A handoffs), the larger the window in which a rotated key invalidates a cached admission. The subtle part: the credential is not *forged*. It was genuinely issued. The failure is that "was authorized" is being read as "is authorized," and DID key state is the mutable substrate that separates the two. ## Decision Boundary The boundary is **whether the authorization decision is bound to a key-state snapshot or merely to a past verification event.** Concretely, a federation gateway must choose one of: - **Snapshot binding (safe):** the admission token records the issuer DID document's `versionId` / `updated` timestamp and the specific verification method used. Every privileged action re-resolves the issuer DID and asserts `current.keyState ⊇ snapshot.keyState` and that the specific key is not `deactivated`. If the snapshot no longer holds, the action is denied and the agent must re-present. - **Short-TTL + action-time re-verify (safe-ish):** TTL is set below the issuer's *minimum* rotation interval (which the issuer must publish as a signed policy), and every privileged action re-verifies. Requires cross-org policy propagation. - **Cached trust without re-check (unsafe):** what Org B did. Acceptable only for read-only, idempotent, low-blast-radius actions, and must never gate `capabilityInvocation` on a resource with side effects. The decision rule: *if the credential grants `capabilityInvocation` or `write` scope, the verification result may be cached for liveness but never for authorization.* Authorization must re-resolve key state at action time, or the action must carry a proof-of-possession freshly signed by the subject key *and* a fresh issuer attestation. ## Operational Effect Org B's scratch namespace received writes from an agent whose issuer had, minutes earlier, withdrawn the key that vouched for it. The blast radius was contained (scratch only), but the same cache would have authorized `read:dataset-7` — a data-exfiltration path — with identical mechanics. The incident was discovered only during a later audit reconciliation that diffed cached `verified_at` timestamps against issuer DID document `updated` timestamps and found admissions whose snapshot predated a key deactivation. The durable fix is a **key-state currency check** at every authorization, not a longer verification TTL and not a revocation-list refresh (revocation lists track credential status, not issuer key lifecycle — a different axis entirely). The guardrail must fail closed and raise a distinct, auditable error so that a rotated-key denial is never confused with a signature forgery or an expiry. The code below encodes the guardrail: an admission cache that stores the issuer key-state snapshot, and an authorization gate that re-resolves the issuer DID document and raises when the snapshot no longer holds. ```python import time from dataclasses import dataclass, field from typing import Callable class StaleIssuerKeyStateError(RuntimeError): """Raised when a cached admission's issuer key-state snapshot is no longer valid against the issuer's current DID document at action time.""" @dataclass class KeyStateSnapshot: issuer_did: str verification_method: str # e.g. "#key-2025-03" did_document_version: str # issuer DID doc versionId / updated deactivated: bool = False captured_at: float = field(default_factory=time.time) @dataclass class Admission: subject_did: str capabilities: list snapshot: KeyStateSnapshot ttl: float class FederationGateway: def __init__(self, resolve_did_document: Callable[[str], dict]): # resolve_did_document returns {"versionId": str, # "verificationMethod": [{"id": "#key-...", "deactivated": bool}, ...]} self._resolve = resolve_did_document self._cache: dict[str, Admission] = {} def admit(self, subject_did: str, vc: dict) -> Admission: issuer_did = vc["issuer"] vm = vc["proof"]["verificationMethod"] doc = self._resolve(issuer_did) snap = KeyStateSnapshot( issuer_did=issuer_did, verification_method=vm, did_document_version=doc["versionId"], ) adm = Admission( subject_did=subject_did, capabilities=vc["credentialSubject"]["agentCapability"], snapshot=snap, ttl=vc.get("ttl", 3600), ) self._cache[subject_did] = adm return adm def authorize(self, subject_did: str, capability: str) -> None: adm = self._cache.get(subject_did) if adm is None: raise StaleIssuerKeyStateError(f"no admission for {subject_did}") if time.time() - adm.snapshot.captured_at > adm.ttl: raise StaleIssuerKeyStateError( f"admission for {subject_did} exceeded TTL" ) # Re-resolve issuer key state at ACTION time -- the invariant. doc = self._resolve(adm.snapshot.issuer_did) current_vms = {m["id"]: m for m in doc["verificationMethod"]} vm = current_vms.get(adm.snapshot.verification_method) if vm is None: raise StaleIssuerKeyStateError( f"issuer {adm.snapshot.issuer_did} no longer lists " f"{adm.snapshot.verification_method}; key rotated or removed " f"since admission at {adm.snapshot.captured_at}" ) if vm.get("deactivated", False): raise StaleIssuerKeyStateError( f"issuer key {adm.snapshot.verification_method} deactivated " f"after admission; cached authority is stale" ) if doc["versionId"] != adm.snapshot.did_document_version: # Document changed; require snapshot to still be a subset. # If the specific key survived, allow; else fail closed above. pass if capability not in adm.capabilities: raise StaleIssuerKeyStateError( f"{subject_did} lacks capability {capability}" ) # Authorized against a current key-state snapshot. ```