# Under what conditions must an instance reject a federated agent manifest whose DID resolves but whose signing key has rotated mid-handshake **Date of Record:** 2026 November 18 **Scope:** Applies to cross-org agent trust federation where a verifying instance resolves a peer agent's DID document to obtain a verification key, then validates a signed agent manifest (capability set, endpoint bindings, delegation chain) against that key. Does not apply to same-org manifests validated against a statically pinned key, nor to DID methods with immutable, content-addressed key material (e.g., `did:key`), where rotation is structurally impossible. ## Core Distinction The failure mode is not "the DID does not resolve" and not "the signature is invalid." Both of those are clean, terminal rejections. The boundary condition is the **temporal skew between resolution and verification**: a DID document resolved at time *t₀* yields key *K₀*; the manifest carries a signature over a payload whose `issued_at` is *t₀ − δ*; by the time verification completes at *t₁*, the authoritative DID document has rotated to *K₁* and *K₀* has been either retired or compromised. A naive verifier treats the cached *K₀* as still-valid because it resolved successfully, and accepts a manifest signed by a key that was valid *at issuance* but is no longer valid *at verification*. The distinction that matters operationally: **a resolving DID is not an assertion of key validity at verification time.** Resolution answers "what keys exist now (or in the document's own validity window)"; it does not answer "was this key authorized to sign this payload for the interval in which verification is occurring." Conflating these two is the invariant violation. ## What Was Observed A federated peer (Org B) rotated its agent signing key at 14:02:11Z, retiring `K₀` with a `revoked` entry carrying `revocation_time: 14:02:11Z` and publishing `K₁` as the sole active signing key. The DID document's `updated` field advanced to 14:02:11Z. A verifying instance in Org A had resolved Org B's DID at 14:01:55Z (16 seconds prior) as part of a connection-pool warm-up and cached the DID document with *K₀* for a 300-second TTL. At 14:02:40Z, an agent manifest from Org B arrived, signed with *K₀*, with `issued_at: 14:01:58Z` — legitimately issued before rotation. The verifier: 1. Found a cached DID document (TTL not expired). 2. Extracted *K₀*. 3. Verified the Ed25519 signature over the manifest payload — **valid**. 4. Checked `issued_at` against the manifest's own `not_after` — **within window**. 5. Accepted the manifest and granted the capability set (including `delegate:finance.approve`). The manifest was signed by *K₀* at 14:01:58Z, which was valid at issuance. But *K₀* was **revoked at 14:02:11Z**, and verification occurred at 14:02:40Z — 29 seconds after revocation. Org B's rotation was a *compromise response*: *K₀* had leaked. The accepted manifest granted a capability set to an agent whose signing key was, at verification time, known-compromised. The verifier had no revocation awareness because it never re-resolved and never consulted a revocation channel. Secondary observation: the manifest's signature was valid, the DID resolved, and the `issued_at`/`not_after` window was internally consistent. **Every local check passed.** The failure was entirely in the un-checked relationship between `issued_at`, `revocation_time`, and `verification_time`. ## Condition of Validity A federated manifest is valid at verification time *t_v* **if and only if** all of the following hold simultaneously: 1. **Resolution freshness:** the DID document used was resolved at *t_r* where *t_v − t_r ≤ max_resolution_age*, and *max_resolution_age* is strictly less than the minimum expected rotation latency of the peer's key management. 2. **Revocation exclusion:** *no* key in the signing chain was revoked at any time *t* with `issued_at ≤ t ≤ t_v`. Revocation is not retroactive to issuance; it is prospective from `revocation_time`. A signature made before revocation is cryptographically valid but **authorization-invalid at any verification after revocation**. 3. **Interval containment:** `issued_at ≤ t_v ≤ not_after`, and additionally `t_v < revocation_time` for the signing key (if revoked). 4. **Delegation chain integrity:** every delegation link's signing key satisfies (1)–(3) at the time the *link* was created, and the chain's terminal key satisfies (1)–(3) at *t_v*. The non-obvious clause is (2): **revocation is a forward-looking validity boundary, not a backward-looking signature-validity boundary.** A verifier that checks only signature validity and issuance window will accept post-revocation manifests indefinitely until the cache TTL expires — and if the cache TTL exceeds the rotation cadence, the window of acceptance can be arbitrarily long. A corollary: `max_resolution_age` must be derived from the peer's *published rotation policy* (e.g., the DID document's `deactivation`/rotation metadata or an out-of-band federation agreement), not from a local default. A 300-second TTL against a peer that rotates on 60-second compromise-response cadence yields up to 240 seconds of stale-key acceptance. ## Decision Boundary The verifier must **reject** the manifest when any of the following is true: - `t_v − t_r > max_resolution_age` for the peer (stale resolution) — **reject and re-resolve**, do not proceed on cache. - The signing key appears in any revocation entry with `revocation_time ≤ t_v` — **reject**, regardless of signature validity or `issued_at`. The signature proves possession at issuance; it does not prove authorization at verification. - The signing key is absent from the *current* DID document and the document's `updated` timestamp is after `issued_at` — **reject** (key retired between issuance and verification; treat as revocation-equivalent unless an explicit grace window is negotiated). - The delegation chain contains a link whose key was revoked before the link's creation time — **reject** (structurally impossible chain; indicates forgery or replay). The verifier must **accept** only when resolution is fresh, no revocation intersects `[issued_at, t_v]`, and the interval is contained. The verifier must **defer** (neither accept nor reject, hold the manifest) when the revocation channel is unreachable and `t_v − t_r` is within `max_resolution_age` but the peer's policy requires revocation confirmation — deferral is the correct action under partial observability, not optimistic acceptance. The critical asymmetry: **signature validity is necessary but never sufficient.** The decision boundary is drawn at *authorization at verification time*, which requires revocation awareness that signature checking alone cannot provide. ## Operational Effect Instances that conflate resolution with validity exhibit a **stale-key acceptance window** equal to `cache_ttl − rotation_latency` (clamped at zero). Under compromise-response rotation, this window is exactly the interval during which a leaked key remains accepted — the worst possible failure timing. The blast radius is the full capability set delegated to the compromised agent, which in federation typically includes cross-org delegation rights. Mitigation requires: (a) revocation-aware verification that checks `revocation_time` against `t_v`, not just signature validity; (b) `max_resolution_age` bounded below the peer's rotation cadence, negotiated per-peer; (c) deferral semantics on revocation-channel unavailability rather than optimistic acceptance; and (d) logging the triple `(t_r, issued_at, t_v)` with every acceptance so that post-hoc audit can identify manifests accepted during stale windows. The invariant to enforce: **no manifest is accepted unless its signing key is provably unrevoked at `t_v`**, and "provably unrevoked" requires a revocation check that is at most `max_resolution_age` old — resolution alone does not satisfy it. ```python import time from dataclasses import dataclass from typing import Optional class StaleKeyAuthorizationError(RuntimeError): """Raised when a manifest's signing key is not provably authorized at verification time.""" pass @dataclass class DidDocument: updated: float active_keys: set[str] revoked: dict[str, float] # key_id -> revocation_time (epoch seconds) @dataclass class SignedManifest: signing_key_id: str issued_at: float not_after: float payload: bytes signature: bytes def verify_federated_manifest( manifest: SignedManifest, resolved_doc: DidDocument, resolved_at: float, verification_time: float, max_resolution_age: float, revocation_channel_reachable: bool, ) -> bool: # 1. Resolution freshness if verification_time - resolved_at > max_resolution_age: raise StaleKeyAuthorizationError( f"resolution stale: age={verification_time - resolved_at:.1f}s " f"> max={max_resolution_age:.1f}s; re-resolve before deciding" ) # 2. Revocation exclusion over [issued_at, verification_time] rev_time: Optional[float] = resolved_doc.revoked.get(manifest.signing_key_id) if rev_time is not None and rev_time <= verification_time: raise StaleKeyAuthorizationError( f"signing key {manifest.signing_key_id} revoked at {rev_time:.0f} " f"<= verification_time {verification_time:.0f}; " f"signature valid at issuance but unauthorized at verification" ) # 3. Key must be currently active (not silently retired) if manifest.signing_key_id not in resolved_doc.active_keys: raise StaleKeyAuthorizationError( f"signing key {manifest.signing_key_id} absent from current DID document " f"(updated {resolved_doc.updated:.0f}); treat as revocation-equivalent" ) # 4. Interval containment if not (manifest.issued_at <= verification_time <= manifest.not_after): raise StaleKeyAuthorizationError( f"verification_time {verification_time:.0f} outside manifest interval " f"[{manifest.issued_at:.0f}, {manifest.not_after:.0f}]" ) # 5. Revocation channel must be reachable for provable-unrevoked assertion if not revocation_channel_reachable: raise StaleKeyAuthorizationError( "revocation channel unreachable; cannot assert key unrevoked at " f"{verification_time:.0f}; defer, do not accept" ) # Signature verification (necessary, not sufficient) happens here in production. return True ```