# What happens when an instance re-signs an Agent Card after a key rotation but the verifiable presentation still anchors to the retired key **Date of Record:** 2026 November 29 **Scope:** Applies to cross-organization agent trust federation where an agent's identity is asserted by a signed Agent Card (capability + key binding) and peers verify it via a verifiable presentation (VP) chain. Does not apply to single-org intra-mesh trust where a central directory is authoritative and re-issuance is atomic. ## Core Distinction There are two distinct notions of "the agent's identity" that federation protocols conflate at the boundary: the **signing key** (a rotating secret) and the **subject identifier** (a stable DID or URI). A signed Agent Card binds `subject → signing_key → capabilities`. A verifiable presentation binds `holder → credential → subject`. Federation succeeds only when both bindings resolve to the *same* subject at verification time. The failure mode is not key rotation itself. It is **asymmetric refresh**: the Agent Card is re-signed under the new key and republished, while a previously issued verifiable presentation—held by a peer org and cached in its trust store—still carries a proof anchored to the retired key. The peer verifies the VP against the *current* card's key material, finds a proof mismatch, and cannot distinguish "this VP is stale" from "this VP is forged." Under fail-closed policy it rejects; under fail-open it accepts a presentation whose proof no longer binds to the live key. Either way the invariant `verify(VP, card.signing_key) ⟹ VP.subject == card.subject` is silently broken. ## What Was Observed A federated agent `did:web:orgA:planner` published an Agent Card with `kid: orgA-2024-11`, capabilities `[plan, delegate, verify]`, and a `validUntil` of 2025-12-01. OrgB's orchestrator completed an onboarding exchange, received a VP asserting `holder=did:web:orgA:planner`, and cached both the VP and the card in its trust store with a TTL of 24h. At T+9h, OrgA rotated keys: `kid: orgA-2025-06` became the active signing key, the card was re-signed and republished, and the old key was moved to a *retired* JWKS set retained for verification of historical artifacts. The `subject` DID did not change. The `validUntil` on the new card was extended to 2026-06-01. At T+11h, OrgB's orchestrator attempted a delegated task handoff. It re-fetched the Agent Card (cache miss on the card, hit on the VP), saw `kid: orgA-2025-06`, and validated the card signature against OrgA's live JWKS—success. It then validated the cached VP. The VP's proof referenced `kid: orgA-2024-11`. The verifier's proof-resolution logic looked up `kid` against the *card's* declared key set (which now listed only `orgA-2025-06`), not against the issuer's historical JWKS. Resolution failed with `unknown_kid`. OrgB's policy treated any proof-resolution failure as `PRESENTATION_INVALID` and quarantined the agent, dropping the delegated task with no retry. Three additional agents in the same federation that had onboarded within the 24h TTL window exhibited the identical failure within a 40-minute band after OrgA's rotation. Agents that had onboarded *before* the TTL window re-fetched both card and VP together and were unaffected—revealing the failure is a function of **cache skew between card and VP**, not of rotation per se. ## Condition of Validity The invariant holds—`verify(VP, card.signing_key) ⟹ VP.subject == card.subject`—only when the following three conditions are jointly satisfied: 1. **Co-issuance atomicity.** The Agent Card and every VP referencing it are re-issued in the same logical transaction, or the VP carries an explicit `card_kid` binding that the verifier is required to honor. 2. **Retired-key reachability.** The verifier resolves a VP's proof `kid` against the *issuer's historical JWKS*, not against the key set declared in the current card. The card's key set answers "what signs now"; the historical set answers "what signed then." 3. **Subject stability across rotation.** The `subject` field is invariant under key rotation. If rotation also renames the subject (e.g., embedding a key fingerprint in the DID), the VP is orphaned and no proof-resolution strategy recovers it. The observed failure violated condition 2. The latent, more dangerous failure—silent acceptance—occurs when a verifier violates condition 1 by fail-open: it sees a `kid` it does not recognize, falls back to "the subject matches, accept," and admits a presentation whose proof no longer cryptographically binds to the live key. That path passes the subject check while defeating the entire point of the signature. ## Decision Boundary The verifier must decide, on `unknown_kid` during VP proof resolution, between three actions: - **Reject (fail-closed):** safe against forgery, but produces the quarantine cascade observed above and breaks legitimate in-flight delegations across every rotation. - **Accept-on-subject-match (fail-open):** preserves continuity but converts the signature into decoration; any party that can mint a VP with a matching subject and an unresolvable `kid` is admitted. - **Defer-and-reconcile:** treat `unknown_kid` as `INDETERMINATE`, consult the issuer's historical JWKS for the retired key, and only if that lookup also fails escalate to rejection. The correct boundary is the third. The discriminator is **whether the proof `kid` appears in the issuer's historical JWKS under the same `subject`**. If yes, the presentation is *stale-but-authentic*: it was validly signed by a key the issuer once bound to this subject. The verifier may honor it up to the VP's own `validUntil`, and must trigger an out-of-band VP refresh before the next handoff. If no, the presentation is *unbound* and must be rejected. Collapsing these two cases into a single `PRESENTATION_INVALID` is the architectural error; collapsing them into "accept" is the security error. ## Operational Effect With defer-and-reconcile, the quarantine cascade disappears: the 40-minute band of failures becomes a 40-minute band of *stale-accepted* handoffs, each tagged `proof_age_rotation_pending`, each scheduling a VP re-fetch. The delegated tasks complete. The trust store gains a monotonic signal—`last_reconciled_kid`—that lets the verifier detect when a peer has rotated without re-issuing VPs and backpressure the peer to complete co-issuance. Without it, two regimes exist and both are wrong. Fail-closed produces rotation-triggered availability outages whose blast radius scales with the VP cache TTL and the number of peers onboarded within that window—an availability failure that looks like a security event. Fail-open produces a federation where signatures attest to nothing after the first rotation, and the first forged VP with a plausible subject is admitted silently. The invariant that must be enforced operationally is not "the VP verifies against the current card" but "every accepted VP resolves, by `kid`, to a key the issuer bound to this subject at some point, and the verifier knows which point." ```python from dataclasses import dataclass from enum import Enum class FederationTrustError(RuntimeError): """Raised when a verifiable presentation cannot be bound to a live subject.""" class ProofDisposition(Enum): LIVE = "live" # kid resolves in current card key set STALE_AUTHENTIC = "stale" # kid resolves only in issuer historical JWKS UNBOUND = "unbound" # kid resolves nowhere under this subject @dataclass class AgentCard: subject: str active_kids: set[str] @dataclass class VerifiablePresentation: subject: str proof_kid: str def resolve_proof( vp: VerifiablePresentation, card: AgentCard, issuer_historical_jwks: dict[str, set[str]], ) -> ProofDisposition: if vp.subject != card.subject: raise FederationTrustError( f"subject mismatch: vp={vp.subject} card={card.subject}" ) if vp.proof_kid in card.active_kids: return ProofDisposition.LIVE historical = issuer_historical_jwks.get(card.subject, set()) if vp.proof_kid in historical: return ProofDisposition.STALE_AUTHENTIC raise FederationTrustError( f"unbound proof kid={vp.proof_kid} for subject={card.subject}; " f"not in active {card.active_kids} nor historical {historical}" ) def admit_presentation( vp: VerifiablePresentation, card: AgentCard, issuer_historical_jwks: dict[str, set[str]], ) -> ProofDisposition: disposition = resolve_proof(vp, card, issuer_historical_jwks) if disposition is ProofDisposition.UNBOUND: # unreachable given resolve_proof raises, but kept as explicit guard raise FederationTrustError("unbound presentation admitted") if disposition is ProofDisposition.STALE_AUTHENTIC: # caller must schedule VP refresh before next handoff pass return disposition ```