# What happens when an instance presents a valid Verifiable Credential whose issuer DID document has silently rotated its verification method mid-handshake **Date of Record:** 2026 November 26 **Scope:** Applies to any AAIF-compliant agent that authorizes a peer by resolving a Decentralized Identifier (DID) to a DID document and validating a Verifiable Credential (VC) against a verification method (`assertionMethod`) keyed in that document. Does not apply to symmetric pre-shared-key deployments, nor to stateless bearer-token authorization where no DID resolution occurs at authorization time. ## Core Distinction The failure is not signature forgery and not credential expiry. It is a **temporal skew between two independent, individually-correct validations**: the credential's `proof.created` timestamp, and the DID document's `updated`/rotation state at the moment of resolution. A VC is cryptographically valid *against the key it names*, and the DID document is authentic *at the version the resolver returns* — yet the pair is invalid because the key that signed the VC was rotated out of `assertionMethod` between issuance and verification, and the resolver served the *current* document rather than the *historical* one the credential was bound to. The naive invariant — "signature verifies against a key in the issuer's DID document ⇒ credential is authentic" — is false under key rotation. The correct invariant is: *the credential must verify against the verification method that was authoritative at `proof.created`, and that method's lifecycle state (active/rotated/revoked) must be reconstructed from the document's version history, not from the latest snapshot.* ## What Was Observed Agent `A` (auditor) receives a task-delegation VC from agent `B` (executor) asserting `B` holds `capability: filesystem.write` scoped to a workspace, issued by an orchestrator DID `did:aaif:orch-7`. The handshake proceeds: 1. `B` presents VC `v` with `proof.verificationMethod = did:aaif:orch-7#key-2` and `proof.created = T0`. 2. `A` resolves `did:aaif:orch-7` and receives the *live* DID document, whose `assertionMethod` now lists `#key-3` and whose `#key-2` entry has been moved to a `revoked`/`deactivated` state with `updated = T1 > T0`. 3. `A`'s validator checks the signature against `#key-2`'s *public key material still present in the document's `verificationMethod` array* (many resolvers retain rotated keys for exactly this reason) — the signature verifies. 4. `A` checks `assertionMethod` membership — `#key-2` is **absent** from `assertionMethod` (it was retired at `T1`). Depending on validator strictness, this either hard-fails or, worse, passes because the implementation only checked signature validity and not purpose-binding. 5. Authorization is granted. `B` writes outside its workspace scope. The decisive observation: **the resolver returned the latest document; the credential was bound to a prior version.** Between `T0` and `T1` the orchestrator rotated `#key-2 → #key-3` (routine hygiene), and the VC was legitimately signed at `T0`. The credential is *not* forged. The authorization is *not* correct. The failure is that `A` conflated "key material exists and verifies" with "key was authorized for `assertionMethod` at signing time." A second, subtler variant: the orchestrator *revoked* `#key-2` at `T1` because it was compromised. A credential signed at `T0` by the compromised key — possibly by the attacker — now verifies against retained key material. Without consulting the version history's revocation effective-time, `A` cannot distinguish "rotated for hygiene, credential legitimate" from "revoked for compromise, credential hostile." Both present identically at step 3. ## Condition of Validity The guardrail holds only under all of the following: - The DID method supports **versioned resolution** (a `versionId`/`versionTime` query parameter, per the DID Core resolution contract) so the verifier can request the document *as of `proof.created`*. - The issuer's document retains `assertionMethod` membership history with explicit `validFrom`/`validUntil` intervals per verification method, rather than a mutable flat array. - The verifier resolves at `versionTime = proof.created` (or the nearest version ≤ `proof.created`) and validates both the signature **and** `assertionMethod` purpose-binding against *that* snapshot. - Revocation records carry an `effectiveTime` so that a revocation at `T1` does not retroactively invalidate a credential validly signed at `T0` by a key that was not yet compromised — and, symmetrically, a compromise-revocation *does* invalidate credentials whose `proof.created` falls in the exposure window, which the verifier must obtain out-of-band from the revocation registry, not infer from the document alone. If the method does not support versioned resolution (many lightweight DID methods do not), the guardrail **cannot** be satisfied at the agent layer and the authorization must degrade to a bounded-TTL model: accept the credential only if `now − proof.created < rotation_grace_window` and the issuer commits to not rotating within that window. ## Decision Boundary The boundary is drawn at the **rotation event relative to `proof.created`**: - `proof.created < rotation.validUntil` **and** the signing key appears in `assertionMethod` at `versionTime = proof.created` **and** no compromise-revocation covers `proof.created` → **accept**. - Signing key absent from `assertionMethod` at `versionTime = proof.created` → **reject** (purpose-binding failure; the key existed but was never authorized to assert this credential type). - Signing key present at `versionTime = proof.created` but a compromise-revocation with `effectiveTime ≤ proof.created` exists in the registry → **reject** (retroactive compromise). - Versioned resolution unavailable → **accept only within grace window, else reject and escalate to out-of-band issuer confirmation**. The non-obvious trap: a validator that checks *only* signature validity against retained key material will accept every case above, including the hostile one. The purpose-binding check against the historical snapshot is the load-bearing step, and it is the one most often omitted because the latest document "looks fine." ## Operational Effect An agent that skips versioned resolution and purpose-binding acquires a **silent over-authorization** surface: any credential ever signed by a since-rotated key remains indefinitely replayable, and a compromised-and-revoked key remains a valid signing oracle for the attacker for as long as the verifier fails to consult revocation effective-times. The blast radius is bounded only by how long the issuer retains rotated key material in its document — and retention is precisely what good hygiene *removes*, creating a race between "key purged, check fails closed" and "key retained for compatibility, check fails open." The correct operational posture is fail-closed on ambiguity: if the verifier cannot reconstruct the `assertionMethod` state at `proof.created`, it must not treat signature validity as sufficient. Log the resolved `versionId`, the `proof.created`, and the rotation interval; escalate to the issuer's revocation registry; and bound the credential's acceptance to the grace window. The invariant to encode: **authorization is a predicate over the (credential, historical-document-snapshot, revocation-registry) triple — never over the credential and the live document alone.** ```python import time from dataclasses import dataclass class AttestationBoundaryError(RuntimeError): """Raised when a VC cannot be authorized against the historical DID state.""" @dataclass class VerificationMethod: id: str valid_from: float valid_until: float | None # None = still active purpose: str # e.g. "assertionMethod" @dataclass class RevocationRecord: method_id: str effective_time: float reason: str # "rotation" | "compromise" def authorize_credential( vc_proof_method: str, vc_proof_created: float, historical_methods: list[VerificationMethod], revocations: list[RevocationRecord], grace_window: float, versioned_resolution_available: bool, now: float | None = None, ) -> bool: now = now if now is not None else time.time() if not versioned_resolution_available: # Cannot reconstruct historical assertionMethod state: fail closed # unless within a bounded grace window. if now - vc_proof_created <= grace_window: return True raise AttestationBoundaryError( f"No versioned resolution for {vc_proof_method}; " f"credential age {now - vc_proof_created:.1f}s exceeds " f"grace window {grace_window:.1f}s. Refusing over-authorization." ) # Reconstruct assertionMethod membership at proof.created. authorized = any( m.id == vc_proof_method and m.purpose == "assertionMethod" and m.valid_from <= vc_proof_created and (m.valid_until is None or vc_proof_created < m.valid_until) for m in historical_methods ) if not authorized: raise AttestationBoundaryError( f"Signing key {vc_proof_method} was not in assertionMethod at " f"proof.created={vc_proof_created}. Purpose-binding failure." ) # Retroactive compromise revocation invalidates credentials signed in # the exposure window. for r in revocations: if r.method_id == vc_proof_method and r.reason == "compromise": if r.effective_time <= vc_proof_created: raise AttestationBoundaryError( f"Key {vc_proof_method} revoked for compromise at " f"{r.effective_time}, covering proof.created=" f"{vc_proof_created}. Treating credential as hostile." ) return True ```