# What structural signals indicate an A2A Agent Card has been silently re-signed under a rotated key mid-delegation, and why the handshake succeeds anyway **Date of Record:** 2026 November 24 **Scope:** Applies to cross-vendor task delegation where a delegating agent (`Client`) fetches an A2A v1.0 Agent Card, caches the advertised `signingKeyId`/`jwksUri`, and later submits a `tasks/send` to the remote agent (`Server`). Does not cover intra-process tool calls, single-vendor MCP tool binding, or cases where the card is re-fetched and re-verified on every request. ## Core Distinction The failure is not a broken signature. Every signature in the trace verifies. The failure is a **key-identity continuity gap**: the Agent Card is a *self-asserting* document whose signature is validated against a JWKS the card itself points to. When the remote vendor rotates its signing key, the card is re-issued under the new `signingKeyId`, but the *delegation session* (task ID, context ID, prior artifacts) was established under the old key. A2A v1.0 has no field binding a live task to the key generation that authorized its creation. The handshake therefore re-verifies cleanly against the *new* card while the in-flight task continues under a warrant issued by a key that no longer exists in the JWKS. The invariant that breaks: **the signing key that authorized a task must remain resolvable for the lifetime of that task's context.** Nothing in the protocol enforces it. `signingKeyId` is a discovery-time attribute, not a per-message claim, and `tasks/get` responses carry no key-generation marker. ## What Was Observed A client agent cached a card at `t0`. Card advertised `signingKeyId: "k-2025-05"`, `jwksUri: https://vendor.example/.well-known/jwks.json`. Client verified the card's detached JWS against the JWKS entry for `k-2025-05`, then opened a task with `tasks/send`, storing `(taskId, contextId, capability, keyId=k-2025-05)` in its delegation ledger. At `t1` the vendor rotated to `k-2025-06`, republished the card, and — critically — *dropped* `k-2025-05` from the JWKS within the same rotation window (no overlap). The client continued the task: it sent a follow-up `tasks/send` with `taskId` referencing the existing context, and a `pushNotification` callback URL. The server accepted it. The server's response carried a fresh detached JWS under `k-2025-06`. The client's verifier did the natural thing: it fetched the card (cache miss on TTL), saw `signingKeyId: k-2025-06`, fetched JWKS, found `k-2025-06`, and verified the response. **Green.** The client's ledger still held `k-2025-05` for the context, but no code path compared the ledger key to the response key, because the protocol gives no field to compare — the response does not name its authorizing key generation, and the context does not record which key opened it. Three structural signals were present in the trace and all were ignored: 1. **Key-ID discontinuity between ledger and card.** `ledger.context.keyId != card.signingKeyId`. This is the only signal the client *could* have computed locally, and it required cross-referencing its own state against the freshly fetched card — a comparison the protocol never asks for. 2. **JWKS entry absence for the authorizing key.** `k-2025-05` was no longer in the JWKS. A verifier that tried to re-verify the *original* card (the one that authorized the task) would have failed with `KeyNotFound`. But no one re-verifies the original card; the card is treated as immutable and is not re-checked. 3. **Response signature under a different `kid` than the request's authorizing key.** The JWS header `kid` on the `tasks/send` response was `k-2025-06`, while the request was authorized under `k-2025-05`. The client's verifier accepted it because it verified against the *current* JWKS, not against the key that opened the context. The handshake succeeded because verification is **stateless and card-relative**: it asks "is this signature valid under the key the current card names?" — never "is this signature valid under the key that authorized this context?" The second question is the one that matters for delegation integrity, and A2A v1.0 does not pose it. ## Condition of Validity The gap is bounded by two conditions that must *both* hold for the failure to be silent: - **No JWKS overlap window.** If the vendor retains the old key in JWKS for the rotation overlap (standard practice: publish new key, keep old for ≥ one card TTL), then re-verification of the original card still succeeds and a diligent client can detect the rotation by comparing `kid`s. The failure requires the old key to be *removed* before the task context closes. - **Card TTL shorter than task lifetime.** The client must re-fetch the card mid-task (TTL expiry) and see the new `signingKeyId`. If the card is cached for the whole task, the client never sees the new key and the mismatch is invisible in the other direction — the client keeps verifying against a stale card and the *server's* new-key signatures fail, which is a loud failure, not a silent one. The silent case is precisely: card refresh happens, new key adopted for verification, old key forgotten, context not re-bound. When both hold, the failure is silent. When either is violated, it surfaces as a verification error (loud) or is masked entirely (also a problem, but a different one — stale-card acceptance). ## Decision Boundary The decision boundary is the point at which a client must choose between **continuing the context under the new key** versus **re-binding the context to a new warrant**. The protocol offers no explicit re-bind operation, so the choice is forced into an implicit branch: - If `ledger.context.keyId == card.signingKeyId` → continue, verify against current JWKS. Safe. - If `ledger.context.keyId != card.signingKeyId` AND `ledger.context.keyId` still resolvable in JWKS → rotation with overlap; continue, but log the discontinuity and pin the context to the *original* key for the remainder of the task (verify responses against `ledger.context.keyId`, not against the card). - If `ledger.context.keyId != card.signingKeyId` AND `ledger.context.keyId` **not** resolvable in JWKS → **the authorizing key is gone**. The context's warrant is no longer verifiable. This is the boundary: the client must either (a) abort the context and re-open under the new key, forfeiting continuity of `contextId` and any server-side state, or (b) accept the new key as a *successor warrant* and explicitly record the succession in the ledger. Option (b) is only legitimate if the new card carries a signed key-succession statement (a `previousKeyId` field or a key-transition JWS). A2A v1.0 does not standardize such a field, so in practice the only sound choice is (a) — abort and re-open — which is exactly what most clients *don't* do, because the handshake looks green. The guardrail: a client MUST treat `ledger.context.keyId ∉ current JWKS` as a hard failure of context continuity, regardless of whether the current response verifies. Response verification and context-warrant validity are two different checks, and the second is the one the protocol omits. ## Operational Effect The observable effect is **warrant laundering**: a task that was authorized by key A continues to receive and act on responses signed by key B, with no record in the task's context that the authorizing principal changed. Downstream auditors reading the task transcript see a chain of valid signatures and conclude the task was continuously authorized. It was not — it was authorized by A, then silently re-authorized by B, and the re-authorization was never asserted, only inferred from a card refresh. Concrete consequences: - **Audit replay diverges.** Replaying the task against the archived JWKS at task-open time fails at the first post-rotation response (`KeyNotFound` for the response's `kid`, or signature mismatch if the old key is used). The live run passed; the replay fails. The discrepancy is not a bug in either — it is the missing succession record. - **Confused-deputy window.** If the rotation was triggered by a compromise (key A revoked), the client that continues under B without re-binding is now delegating to a server whose *current* key is trusted but whose *prior* authorization is void. The client cannot distinguish "planned rotation" from "emergency revocation" because the card carries no rotation-reason or succession attestation. - **Push-callback misbinding.** A `pushNotification` registered under context authorized by A is delivered and verified under B. The callback receiver, if it pins to the card's current key, accepts notifications for a context it never authorized under that key. The bound: clients must maintain a **context-warrant ledger** separate from card cache, keyed by `(contextId, authorizingKeyId, keyResolvableAtOpen)`, and must fail closed when the authorizing key leaves the JWKS without a signed succession record. The protocol does not provide the succession record, so the operational rule is: **treat key disappearance as context termination, not as transparent rotation.** Re-open, don't continue. ```python import time from dataclasses import dataclass, field from typing import Optional class WarrantContinuityError(RuntimeError): """Raised when a task context's authorizing key is no longer resolvable and no signed key-succession record bridges the gap.""" pass @dataclass class ContextWarrant: context_id: str task_id: str authorizing_key_id: str opened_at: float succession_chain: list = field(default_factory=list) # signed transitions only @dataclass class AgentCard: signing_key_id: str jwks_uri: str # A2A v1.0 has no `previous_key_id` / succession field; absent here too. previous_key_id: Optional[str] = None def verify_response_under_context( warrant: ContextWarrant, card: AgentCard, current_jwks: dict, response_kid: str, now: Optional[float] = None, ) -> bool: now = now if now is not None else time.time() # Check 1: does the response verify under the *current* card key? if response_kid not in current_jwks: raise WarrantContinuityError( f"response kid={response_kid} not in JWKS; cannot verify at all" ) response_ok = response_kid == card.signing_key_id # Check 2 (the one the protocol omits): is the context's authorizing key # still resolvable, or bridged by a signed succession record? authorizing_key_present = warrant.authorizing_key_id in current_jwks bridged = any( step.get("from") == warrant.authorizing_key_id and step.get("to") == card.signing_key_id and step.get("signature_verified") is True for step in warrant.succession_chain ) if not authorizing_key_present and not bridged: # The authorizing key is gone and no signed succession exists. # Response verification being green is irrelevant: the warrant is void. raise WarrantContinuityError( f"context {warrant.context_id} authorized under " f"{warrant.authorizing_key_id!r}, which has left the JWKS; " f"current card key {card.signing_key_id!r} is not a signed " f"successor (previous_key_id={card.previous_key_id!r}). " f"response_verified={response_ok}. Abort and re-open context." ) if warrant.authorizing_key_id != card.signing_key_id and not bridged: # Overlap window: old key still resolvable. Continue, but pin # verification to the authorizing key, not the card's current key. if response_kid != warrant.authorizing_key_id: raise WarrantContinuityError( f"context {warrant.context_id} pinned to " f"{warrant.authorizing_key_id!r} but response signed by " f"{response_kid!r} during overlap; reject or re-bind explicitly" ) return True return response_ok def handle_delegation_response( warrant: ContextWarrant, card: AgentCard, current_jwks: dict, response_kid: str, ) -> str: try: verify_response_under_context(warrant, card, current_jwks, response_kid) return "accepted" except WarrantContinuityError as e: # Fail closed: do not continue the context; surface for re-open. raise WarrantContinuityError( f"delegation context continuity broken: {e}" ) from e ```