# Why does an instance accept a federated agent passport whose credential chain verifies yet whose subject binding has silently rotated? **Date of Record:** 2026 November 28 **Scope:** Applies to cross-organization agent trust federation where an agent presents a DID-anchored passport (a W3C Verifiable Credential set) to a peer org's verifier before tool invocation. Does not apply to intra-org trust where a single key registry governs all issuers, nor to pure capability tokens without subject binding. ## Core Distinction There are two distinct things a verifier checks when an agent presents a federated passport, and conflating them is the failure mode: 1. **Chain validity** — does every VC in the passport verify against its issuer's DID document, is the issuer authorized by the federation trust framework, is nothing expired or revoked? 2. **Subject binding** — does the DID that *signed the presentation* (the holder proof) actually correspond to the DID that the credentials *describe as subject*? A verifier can pass (1) completely and fail (2) silently. The typical implementation verifies each credential's `proof` against `credentialSubject.id`'s controller and separately verifies the presentation's holder proof against `presentation.holder`. If those two DIDs are allowed to differ — because the spec permits a presenter to hold credentials about *another* subject — then a compromised or rotated agent key can present a passport that is fully valid, fully unrevoked, and describes a *different* agent identity than the one now executing. The verifier concludes "trusted agent X" while the process at the other end of the socket is agent Y holding X's delegated credential. The non-obvious part: the credentials are not forged. The signature chain is pristine. The failure lives entirely in the *gap between the signing key and the described subject*, which most verifiers never close because it looks like a legitimate delegation. ## What Was Observed A federated deployment between two orgs (call them Alpha and Beta) used an agent passport format where each agent has a DID (`did:web:alpha.example:agents:researcher-7`) whose DID document publishes an Ed25519 verification method. The passport was a set of VCs: - A **role credential** issued by Alpha's HR authority: `credentialSubject.id = did:web:alpha.example:agents:researcher-7`, claims `role: research-agent`, `clearance: internal`. - A **federation membership credential** issued by the trust framework root: subject is Alpha's org DID, claims `federationMember: true`. - A **presentation** wrapping both, signed by the holder. The verifier at Beta did this, in order: ``` for vc in presentation.verifiableCredential: resolve(vc.issuer) -> verify(vc.proof) -> check revocation -> check expiry verify(presentation.proof, presentation.holder) # holder = researcher-7's DID ``` This is the textbook algorithm and it passes. The break happened during a **key rotation event**. Alpha rotated `researcher-7`'s key. The DID document was updated to a new verification method `#key-2` and `#key-1` was deactivated but *not* revoked at the credential layer (the role VC was long-lived, 90-day expiry, still within window). An attacker who had exfiltrated `#key-1` before rotation crafted a presentation. The role VC was unmodified and still valid. The federation VC was unmodified and still valid. The attacker signed the *presentation* with `#key-1`. Beta's verifier resolved `researcher-7`'s DID document, saw `#key-1` listed but marked `deactivated: true`... **and the verifier's DID resolver cached the document from before rotation**, because the resolver had a 24-hour TTL and the rotation was 6 hours old. The cached document still showed `#key-1` as active. The presentation verified. The chain verified. Beta admitted the request as `researcher-7` with `clearance: internal`. The executing process was not Alpha's researcher agent; it was whoever held the stale key. Three compounding factors made this non-obvious: - **Deactivation is not revocation.** The VC revocation list (status list) was checked and clean. The DID document's `deactivated` flag is a *separate* revocation surface that the verifier never consulted because it trusted the resolver's cached view. - **The role VC outlived the key.** A 90-day credential describing a subject whose signing key rotated every 30 days means there is always a window where the credential is valid but the key that *should* present it is not the key that *does*. - **The holder proof was checked, not bound.** `verify(presentation.proof, presentation.holder)` confirms the signature is by *some* key the holder DID controls — it does not confirm the holder DID equals `credentialSubject.id`, and it does not confirm the key used is the *current* key. ## Condition of Validity The failure is bounded by a precise condition. Let: - `T_rot` = time the DID document was updated to deactivate `#key-1` - `TTL_resolver` = the verifier's DID resolution cache TTL - `T_present` = time the forged presentation arrives The forged presentation is accepted iff `T_present < T_rot + TTL_resolver` **and** the role VC's `expirationDate > T_present` **and** the status list entry for the VC is unset. That is: the acceptance window equals the resolver cache staleness window, gated by credential lifetime. The architectural invariant that closes it: **the verifier must resolve the holder's DID document at presentation time with cache-bypass or a max-staleness bound strictly less than the credential's remaining lifetime, and must assert `presentation.holder == credentialSubject.id` for every credential whose subject is an agent (not an org).** Delegation, when legitimate, must be expressed as an explicit `credentialSubject.id` chain (agent Y's VC names X as delegator), never as a holder/subject mismatch. A second invariant: **key deactivation must propagate to the credential layer within the credential's validity window.** Either the role VC is re-issued on every key rotation, or the verifier treats `deactivated: true` on the signing key as an immediate hard reject regardless of cache. ## Decision Boundary The verifier sits on a decision boundary between two policies: - **Lenient (chain-only):** accept if every VC verifies and the presentation holder proof verifies. Fast, cache-friendly, and *wrong* whenever subject binding can drift. - **Strict (bound):** accept only if, additionally, (a) the DID document used for holder verification was resolved with staleness `< min(remaining VC lifetime, rotation SLA)`, (b) `presentation.holder == credentialSubject.id` for agent-subject credentials, and (c) the specific verification method used is not `deactivated`. The boundary is crossed when the deployment cannot afford per-request DID resolution. The correct response is not to relax the bound but to **push the bound into the credential**: short-lived role VCs (minutes to hours) that are re-issued on rotation, so that even a stale resolver cache cannot outlive the credential. The credential lifetime becomes the staleness ceiling, and the invariant is enforced by expiry rather than by resolver freshness. ## Operational Effect After the incident, Beta's verifier was changed to: 1. Reject any presentation where `presentation.holder != credentialSubject.id` for agent credentials, unless an explicit delegation VC names the delegator. 2. Resolve the holder DID document with `maxStaleness = min(300s, remainingLifetime(roleVC) / 2)`. 3. Treat any `deactivated` verification method as a hard reject, not a soft warning. 4. Require role VCs to have `expirationDate - issuanceDate <= 3600s`, forcing re-issuance on rotation. The measurable effect: the acceptance window for a stale-key presentation dropped from "up to 24 hours" to "under 5 minutes or the credential's own expiry, whichever is smaller." The tradeoff is a 3–8x increase in DID resolution traffic and a re-issuance load on Alpha's HR authority — accepted because the alternative is silent impersonation across an org boundary. The general lesson for any federated agent passport: **verifying a credential chain proves the credentials are real; it does not prove the process presenting them is the subject they describe.** That gap is where cross-org trust fails. ```python import time from dataclasses import dataclass class PassportBindingError(RuntimeError): """Raised when a federated agent passport verifies its chain but fails subject binding.""" pass @dataclass class VerificationMethod: id: str deactivated: bool valid_from: float @dataclass class DIDDocument: did: str methods: dict resolved_at: float @dataclass class Credential: subject_id: str issuer: str issuance: float expiration: float @dataclass class Presentation: holder: str signed_by_method: str credentials: list presented_at: float def verify_federated_passport( presentation: Presentation, resolve_did, # callable(did) -> DIDDocument max_staleness_seconds: float = 300.0, max_role_credential_lifetime: float = 3600.0, ) -> str: """ Verify a DID-anchored agent passport with strict subject binding. Returns the bound agent DID on success. Raises PassportBindingError on any binding, staleness, or deactivation violation. """ now = presentation.presented_at # 1. Resolve the holder's DID document with a staleness bound. doc: DIDDocument = resolve_did(presentation.holder) staleness = now - doc.resolved_at if staleness > max_staleness_seconds: raise PassportBindingError( f"holder DID document stale: {staleness:.1f}s > {max_staleness_seconds}s" ) # 2. The signing method must exist and must not be deactivated. method = doc.methods.get(presentation.signed_by_method) if method is None: raise PassportBindingError( f"signing method {presentation.signed_by_method} not in DID document" ) if method.deactivated: raise PassportBindingError( f"signing method {presentation.signed_by_method} is deactivated" ) # 3. Subject binding: for agent credentials, holder must equal subject. for vc in presentation.credentials: remaining = vc.expiration - now if remaining <= 0: raise PassportBindingError(f"credential from {vc.issuer} expired") if vc.subject_id != presentation.holder: raise PassportBindingError( f"subject binding mismatch: holder {presentation.holder} " f"!= credentialSubject {vc.subject_id}" ) lifetime = vc.expiration - vc.issuance if lifetime > max_role_credential_lifetime: raise PassportBindingError( f"role credential lifetime {lifetime:.0f}s exceeds " f"{max_role_credential_lifetime:.0f}s; re-issue on rotation required" ) return presentation.holder ```