# What happens when an instance accepts a federated agent manifest whose signing key rotated mid-verification **Date of Record:** 2026 November 27 **Scope:** Applies to cross-organization agent-to-agent (A2A) trust establishment where a relying party validates a signed agent manifest (capability declaration + issuer DID + key binding) against a verifiable credential (VC) chain. Excludes single-org intra-cluster trust where the same key authority signs and verifies, and excludes purely symmetric shared-secret handshakes. ## Core Distinction The failure is not "expired credential" or "revoked key." Those are clean negatives: verification returns false, the handoff aborts, and the invariant holds. The boundary case is **temporal skew between manifest signing time and key-rotation effective time across two trust domains that each independently consider themselves correct**. A manifest is a structured claim: `{issuer_did, subject_agent_id, capabilities, signing_key_id, issued_at, expires_at}` signed by `signing_key_id`. A verifiable credential binds `issuer_did → signing_key_id` with a validity interval. The relying party (RP) resolves the issuer's DID document to fetch the public key, checks the signature, checks the VC validity window, and admits the peer agent. The non-obvious break: **DID document resolution is a separate network fetch with its own cache TTL, while VC validity is evaluated against the RP's local clock.** When the issuer rotates `signing_key_id` from `K1` to `K2` and sets `K1`'s `revoked`/`deactivated` timestamp in the *new* DID document, an RP holding a cached *old* DID document will still resolve `K1` as active. It then validates a manifest signed with `K1` whose `issued_at` sits inside the rotation window. Both domains are internally consistent; the federation is not. ## What Was Observed Trace from a production federation between Org A (issuer, agent `planner-a`) and Org B (relying party, agent `executor-b`): 1. `t0` — Org A publishes DID doc `D1` binding `planner-a → K1`, VC `V1` valid `[t0, t0+24h]`. Org B caches `D1` with a 6h TTL (a common, defensible default). 2. `t0+2h` — Org A rotates: publishes `D2` binding `planner-a → K2`, marks `K1` `deactivated: true` with `deactivated_at: t0+2h`. Org A's internal policy treats `K1` as dead for all signatures with `issued_at > t0+2h`. 3. `t0+2h+30s` — `planner-a` signs manifest `M` with `K2`, `issued_at = t0+2h+30s`. Correct. 4. `t0+3h` — A stale replica of `planner-a` (cold-started from a checkpoint written at `t0+1h`) re-emits a *cached* manifest signed with `K1`, `issued_at = t0+2h+45s` (clock advanced, key did not). This is the compounding state-continuity defect: the replica restored key material from checkpoint but not the rotation event. 5. `t0+4h` — Org B's `executor-b` resolves `planner-a`'s DID. Cache hit on `D1`. `K1` appears active. Signature over `M` verifies. VC `V1` is still within `[t0, t0+24h]`. **Admission succeeds at `t0+4h` for a manifest signed by a key deactivated at `t0+2h`.** 6. `t0+6h` — Org B cache expires, resolves `D2`, sees `K1` deactivated. Any *new* verification of `M` fails. But `executor-b` already holds an active session with `planner-a` admitted under the stale check. The session is not re-validated. **The trust decision is sticky past the evidence that justified it.** Observed downstream effect: `executor-b` executed three tool calls delegated by `planner-a` (a `filesystem.read` and two `http.post` to an internal endpoint) between `t0+4h` and `t0+6h` under a credential Org A had already retired. Org A's audit log shows no valid authorization for those calls; Org B's shows valid. Reconciliation failed. ## Condition of Validity The federation's trust invariant — *"an admitted peer's signature was produced by a key the issuer considered active at signing time"* — only holds if all three of the following are simultaneously true: - **Freshness coupling:** the DID document cache TTL is ≤ the minimum key-rotation propagation delay the issuer guarantees, OR the RP performs an online revocation check per admission. If issuer guarantees rotation propagation within `P` and RP caches for `T`, the invariant requires `T ≤ P`. Most federations never state `P`, so `T ≤ P` is unverifiable and the invariant is unfalsifiable — which is worse than false. - **Signing-time anchoring:** `issued_at` in the manifest is compared against `deactivated_at` in the *resolved* DID document, not against the RP's receipt time. If the RP uses receipt time, the `t0+4h` check passes trivially. - **Session re-validation:** an admitted session carries the evidence hash (DID doc version + VC id + manifest hash) and is re-checked against current resolver state at a bounded interval, or on any revocation event delivered via a push channel. Without this, admission is a one-shot decision that outlives its warrant. The failure appears precisely in the gap `(deactivated_at, deactivated_at + cache_TTL]` when a stale-key signer exists — which requires the *separate* precondition of a restored or forked agent instance whose key material predates the rotation. ## Decision Boundary The RP must choose an admission posture at the boundary. Three defensible rules, in increasing strictness: 1. **TTL-bounded:** admit if signature verifies against cached DID and `issued_at ∈ VC window`. Cost: accepts stale-key signatures for up to `T`. Only safe if `T ≤ P` is contractually established. 2. **Signing-time ordered:** additionally require `issued_at ≥ deactivated_at` implies rejection, using the resolved doc. Closes the `t0+4h` hole *only if the doc is fresh*; a stale doc has no `deactivated_at` to compare against, so this rule silently degrades to rule 1. It is a false sense of safety unless paired with freshness. 3. **Warrant-carrying session:** admit only if the manifest carries a short-lived, issuer-countersigned *warrant* (e.g., a 60s VC scoped to this handoff) that the RP verifies online at admission and re-verifies on session renewal. This is the only posture that bounds the failure without a stated propagation guarantee, because the warrant's short TTL makes the stale window smaller than any plausible rotation delay. The boundary is crossed when an operator believes they are at rule 2 but are operationally at rule 1 — which is the default whenever DID caching is enabled and no freshness contract exists. ## Operational Effect - **Silent over-admission, not rejection.** The failure mode is permissive. Logs show `admission=ok` with a valid signature and a valid VC. Nothing flags. The only evidence is a later reconciliation mismatch between the two orgs' audit logs, which surfaces hours after the delegated tool calls have already executed side effects. - **Asymmetric blame.** Org A sees an unauthorized call (key was dead); Org B sees an authorized one (signature verified). Cross-org incident response deadlocks because each side's local evidence is internally consistent. The dispute resolution requires exchanging DID document *versions with timestamps*, which most federations do not log. - **Compounding with cold-start.** The trigger requires a stale-key signer, which most commonly arises from checkpoint/restore of an agent instance that persisted key material but not the rotation event. The trust failure is therefore a *downstream symptom* of a state-continuity defect in the issuer's own agent lifecycle. Fixing federation alone will not prevent recurrence; the issuer's checkpoint schema must include key-rotation epoch and refuse to sign with a key whose epoch is behind the latest known rotation. - **Blast radius bounded by session lifetime.** Because admission is sticky, the exposure window equals the session duration, not the cache TTL. Long-lived executor sessions amplify a 6h cache TTL into a multi-hour unauthorized delegation window. Required guardrails, in order of leverage: (a) log DID document version + `deactivated_at` alongside every admission decision so cross-org reconciliation is possible; (b) require issuer-published propagation bound `P` and enforce `cache_TTL ≤ P` or fall back to online checks; (c) bind session lifetime to warrant lifetime, not to a fixed session TTL; (d) make agent checkpoint/restore carry key-rotation epoch and fail-closed on mismatch. ```python import time from dataclasses import dataclass, field from typing import Optional class StaleWarrantAdmission(RuntimeError): """Raised when a manifest is admitted under a DID document whose key deactivation postdates the manifest's signing time, or when freshness cannot be established to bound the stale-key window.""" @dataclass class DIDDocument: version: int key_id: str deactivated_at: Optional[float] = None # epoch seconds, None = active fetched_at: float = 0.0 @dataclass class Manifest: agent_id: str key_id: str issued_at: float signature_valid: bool @dataclass class FederationPolicy: cache_ttl: float issuer_propagation_bound: Optional[float] # P; None = not contracted require_online_check: bool = False def admit_peer( manifest: Manifest, resolved_doc: DIDDocument, policy: FederationPolicy, now: float, ) -> bool: if not manifest.signature_valid: return False doc_age = now - resolved_doc.fetched_at # Freshness invariant: cache must be no older than the issuer's stated # propagation bound, else the deactivated_at we compare against is stale. if policy.require_online_check and doc_age > 0: raise StaleWarrantAdmission( f"online check required but doc age {doc_age:.0f}s > 0" ) if policy.issuer_propagation_bound is None: raise StaleWarrantAdmission( "no issuer propagation bound P published; cannot prove " f"cache_ttl {policy.cache_ttl}s <= P" ) if policy.cache_ttl > policy.issuer_propagation_bound: raise StaleWarrantAdmission( f"cache_ttl {policy.cache_ttl}s exceeds propagation bound " f"{policy.issuer_propagation_bound}s; stale-key window open" ) # Signing-time anchoring: the key must have been active at issued_at. if resolved_doc.deactivated_at is not None: if manifest.issued_at >= resolved_doc.deactivated_at: raise StaleWarrantAdmission( f"manifest signed at {manifest.issued_at} with key " f"{resolved_doc.key_id} deactivated at " f"{resolved_doc.deactivated_at}" ) if doc_age > policy.cache_ttl: raise StaleWarrantAdmission( f"resolved doc age {doc_age:.0f}s exceeds cache_ttl " f"{policy.cache_ttl}s; re-resolve before admission" ) return True def _demo() -> None: now = 100_000.0 # Stale replica signs at t+45s with a key deactivated at t+30s. doc = DIDDocument(version=1, key_id="K1", deactivated_at=now - 30, fetched_at=now - 3600) manifest = Manifest("planner-a", "K1", issued_at=now - 45, signature_valid=True) policy = FederationPolicy(cache_ttl=21600, issuer_propagation_bound=None) try: admit_peer(manifest, doc, policy, now) except StaleWarrantAdmission as e: print(f"admission blocked: {e}") if __name__ == "__main__": _demo() ```