# In what scenarios must an instance reject a federated agent credential whose DID document has been rotated between warrant issuance and warrant presentation? **Date of Record:** 2026 November 27 **Scope:** Applies to cross-organization agent federation where a verifier instance admits a peer agent based on a signed warrant (capability grant) bound to a Decentralized Identifier (DID), and the peer's DID document may be updated independently of the warrant. Does not apply to single-org deployments where the DID controller and the warrant issuer are the same administrative principal, nor to bearer-token schemes with no DID binding. ## Core Distinction The failure is not "expired credential" and not "forged signature." Both of those are caught by ordinary verification. The boundary condition is a **rotation race between two independently-versioned trust artifacts**: the warrant (a signed capability grant, immutable once issued) and the DID document (the mutable key-binding record that resolves what public key currently controls the DID). Verification of a warrant succeeds cryptographically against the key *embedded or referenced at issuance time*, but the DID document that the verifier resolves at *presentation time* may have been rotated — new verification key, revoked old key, possibly a changed `controller` or `alsoKnownAs` set. The non-obvious part: **a valid signature over a valid warrant, presented by a DID whose current document no longer contains the signing key, is not a forgery and not an expiry.** It is an ambiguous state. The peer agent is who it claims to be *historically*, the warrant was legitimately issued, and yet the current key material no longer vouches for the presenter. Whether to admit depends on whether your invariant is "the warrant is authentic" or "the presenter currently controls the DID that the warrant names." These are different predicates and they diverge exactly at rotation. ## What Was Observed A peer agent from org B presents a warrant to a verifier in org A. The warrant payload is: ``` { "iss": "did:web:issuer.org-b.example", "sub": "did:web:agent-7.org-b.example", "cap": ["read:inventory", "write:reservation"], "iat": 1749800000, "exp": 1749900000, "kid": "did:web:agent-7.org-b.example#key-1" } ``` At issuance, `did:web:agent-7.org-b.example` resolved to a document whose `verificationMethod` contained `#key-1` with public key `P1`. The warrant is signed by `P1`'s private half. Fine. At presentation, the verifier resolves the DID document fresh (as it must — DID documents are not cached forever, and `did:web` in particular resolves over HTTPS with whatever cache headers the host sends). The document now contains `#key-2` with key `P2`, and `#key-1` has been removed from `verificationMethod` (a clean rotation, not merely a revocation entry in a status list). The warrant still verifies against `P1` if the verifier kept the old key or if the warrant embeds the key inline. But the *presenter* is signing the presentation challenge with `P2`, because the agent's runtime was restarted after rotation and only holds `P2`. Two sub-cases were observed in the field: 1. **Verifier caches the DID document.** The verifier resolved the document at issuance (or on first contact) and pinned it. The presentation verifies end-to-end against the stale document. The agent is admitted. This is *correct* if the rotation was benign (routine key hygiene) and *catastrophic* if the rotation was a compromise response — the old key was pulled precisely because it leaked, and the verifier is now trusting a warrant signed by a key the controller has disavowed. 2. **Verifier resolves fresh and requires the signing key to be in the current document.** The presentation fails. The agent — legitimate, same controller, same warrant, just post-rotation — is locked out for the remaining lifetime of a perfectly valid warrant. This is the *availability* failure and it is the common one, because rotation is routine and warrants are long-lived. The asymmetry is the whole story: **caching the DID document trades compromise-response correctness for availability; resolving fresh trades availability for compromise-response correctness.** Neither default is safe. The verifier must know which failure it is choosing, per warrant, and that requires information the warrant does not currently carry. ## Condition of Validity The invariant that makes fresh-resolution safe is: > A warrant presented under DID `D` is admissible iff (a) the signature verifies against a key that was authorized by *some* version of `D`'s document during the warrant's validity window, AND (b) the *current* document for `D` does not mark that key as revoked, AND (c) the current `controller` of `D` is unchanged from issuance, OR the controller change is itself countersigned by the prior controller. Condition (c) is the one that is almost never checked and is the actual attack surface. A DID document rotation that changes `controller` — not just keys — is a transfer of identity control. If org B's agent DID is re-controlled (say, the domain `org-b.example` lapses and is re-registered, or an internal admin reassigns the DID), the *new* controller can mint new keys and present old warrants. The warrant was signed by the old controller; the presenter is the new one. Signature checks pass; the presenter is a different principal. This is the cross-org equivalent of a domain-takeover, gated behind a DID document that most verifiers never inspect beyond `verificationMethod`. The condition of validity for *any* admission decision is therefore: the verifier must have, at presentation time, a **signed historical chain of the DID document** (or a trusted resolver that provides one, e.g., a `did:web` host that serves versioned documents with monotonic `versionId` and a signed log), sufficient to prove that the key that signed the warrant was authorized *and not since revoked* and that `controller` is stable. Without that chain, the verifier is guessing. ## Decision Boundary The decision boundary is a three-way split, not a boolean: - **Admit** when: signing key is in current `verificationMethod`, `controller` unchanged, no revocation entry for the key, and the current document's `versionId` is ≥ the version referenced by the warrant's `kid` resolution. This is the clean path. - **Admit-with-attenuation** when: signing key is absent from current document but present in a *prior* version that the resolver can prove was current at `iat`, `controller` unchanged, and no revocation. Attenuate by re-issuing a short-lived session credential bound to the *current* key (`P2`), so the long-lived warrant is not the thing being trusted for the rest of its life. The warrant proves historical authorization; the current key proves present control. Both are required; neither alone suffices. - **Reject** when: `controller` changed since `iat` without a countersigned handoff, OR the signing key appears in a revocation/status list effective before `iat`, OR the resolver cannot produce a versioned history and the current document lacks the signing key (you cannot distinguish benign rotation from compromise-response, so fail closed). The trap is the middle case. A naive verifier collapses "signing key absent from current document" into **Reject** (availability failure) or into **Admit** by pinning the old document (compromise-response failure). The correct move is to *decouple* the two predicates — historical authorization vs. present control — and require both, then bind the session to the present key. ## Operational Effect The downstream effect on multi-agent workflows is a class of **silent half-authorization** that is worse than outright rejection. When a verifier pins a stale DID document and admits a post-rotation agent, every downstream tool call the agent makes inherits a warrant whose signing key the controller has disavowed. If the rotation was a compromise response, the verifier has just re-admitted the compromised key's authority for the warrant's remaining TTL — up to hours. If the rotation was benign, the verifier has admitted correctly but is now blind to the *next* rotation, because it never re-resolves. The pinned-document verifier is a one-rotation-lag trust anchor: it is always trusting the previous epoch. The mitigation that holds is to make rotation a **first-class event in the federation protocol**, not an out-of-band key-hygiene operation. Concretely: (1) warrants carry the `versionId` of the DID document current at issuance, so the verifier knows which version to demand from the resolver; (2) resolvers must serve a monotonic, signed version chain for `did:web` (a plain HTTPS GET of the current document is insufficient — it is a single mutable snapshot with no history); (3) verifiers cache the *chain*, not the snapshot, and re-validate the chain on every presentation, which is cheap; (4) admission issues a session credential bound to the *current* key, so the long-lived warrant never directly authorizes post-rotation traffic. This bounds the failure: a compromise-response rotation invalidates the old key for *new* sessions immediately, while in-flight sessions expire on their short TTL and are not silently extended. ```python import time from dataclasses import dataclass, field from typing import Optional class FederationTrustError(RuntimeError): """Raised when a federated warrant cannot be safely admitted under DID rotation.""" @dataclass class DidDocumentVersion: version_id: int controller: str verification_keys: frozenset[str] # key ids, e.g. "#key-1" revoked_keys: frozenset[str] = field(default_factory=frozenset) @dataclass class Warrant: issuer: str subject: str signing_key_id: str did_version_at_issuance: int issued_at: int expires_at: int def admit_federated_warrant( warrant: Warrant, did_chain: list[DidDocumentVersion], # ordered, oldest first, from trusted resolver now: int, ) -> dict: if now >= warrant.expires_at: raise FederationTrustError( f"warrant {warrant.subject} expired at {warrant.expires_at}, now={now}" ) if not did_chain: raise FederationTrustError("resolver returned empty DID history; cannot verify rotation") # Locate the document version that was current at issuance. issued_doc = next( (d for d in did_chain if d.version_id == warrant.did_version_at_issuance), None ) if issued_doc is None: raise FederationTrustError( f"no DID document version {warrant.did_version_at_issuance} in chain; " f"cannot prove signing key was authorized at issuance" ) # (a) signing key must have been authorized at issuance if warrant.signing_key_id not in issued_doc.verification_keys: raise FederationTrustError( f"signing key {warrant.signing_key_id} was not authorized by DID version " f"{issued_doc.version_id} at issuance" ) current = did_chain[-1] # (b) signing key must not be revoked as of the latest known version if warrant.signing_key_id in current.revoked_keys: raise FederationTrustError( f"signing key {warrant.signing_key_id} is revoked in current DID version " f"{current.version_id}; likely compromise-response rotation" ) # (c) controller must be stable, or the change must be countersigned (not modeled here) if current.controller != issued_doc.controller: raise FederationTrustError( f"DID controller changed from {issued_doc.controller!r} to " f"{current.controller!r} between issuance and presentation; " f"presenter is a different principal" ) # Clean path: signing key still current. if warrant.signing_key_id in current.verification_keys: return {"decision": "admit", "bind_key": warrant.signing_key_id} # Attenuated path: signing key rotated out benignly; bind session to current key. if not current.verification_keys: raise FederationTrustError( f"DID version {current.version_id} has no verification keys; cannot bind session" ) present_key = sorted(current.verification_keys)[0] return { "decision": "admit-attenuated", "bind_key": present_key, "historical_key": warrant.signing_key_id, "session_ttl": min(300, warrant.expires_at - now), } def _demo() -> None: chain = [ DidDocumentVersion(1, "org-b", frozenset({"#key-1"})), DidDocumentVersion(2, "org-b", frozenset({"#key-2"}), frozenset({"#key-1"})), ] benign = Warrant("issuer", "agent-7", "#key-1", 1, 0, 10_000) # key-1 revoked -> must raise, not silently admit via stale pin admit_federated_warrant(benign, chain, now=100) if __name__ == "__main__": _demo() ```