In what scenarios must an instance treat a verified A2A Agent Card as stale the moment the remote vendor rotates its signing key mid-handshake
**Date of Record:** 2026 December 1 **Scope:** Applies to any agent that discovers peers via A2A v1.0 Agent Cards (`/.well-known/agent-card.json`) and validates the `signatures` block against a JWKS obtained from the card's `provider.organization` or a vendor-pinned key set. Does not cover transport-level mTLS failures or in-band capability mismatch after a session is established.
Core Distinction
The A2A v1.0 Agent Card is a *self-describing capability manifest* signed with a JWS over its canonicalized JSON. The common mental model is "verify signature → trust capabilities." That model is wrong in one specific way: the signature attests to *the bytes the vendor published*, not to the *capability set the vendor currently honors*. A card can be cryptographically valid, freshly fetched, and still describe a capability surface that has already been revoked, downgraded, or re-scoped — because the signing key and the capability schema are rotated on independent schedules, and A2A gives you no freshness binding between them.
The boundary is this: **signature validity and capability validity are two separate clocks, and the handshake only checks one of them.** A card that verifies against a key in the JWKS is *authentic*; it is not necessarily *current*. The failure mode is an instance that treats `signature_valid == true` as sufficient to enter a capability-binding handshake, when the correct predicate is `signature_valid AND key_not_rotated_since_card_issued AND card_issued_after_last_schema_change`.
What Was Observed
A cross-vendor discovery run against a remote agent endpoint returned a card whose `signatures[0].protected` header carried `kid: "k-2026-05"`, with the JWS verifying cleanly against the vendor's JWKS. The instance cached the card, extracted `capabilities.streaming: true` and `skills[].id` set, and initiated a streaming task handoff. Mid-handshake, the remote returned `406 Not Acceptable` on the `tasks/sendSubscribe` method with a body indicating the skill had been removed.
Re-fetching the card returned a *new* card: `kid: "k-2026-06"`, `capabilities.streaming: false`, and a reduced `skills` array. The old card's signature was still valid against the *old* key — the vendor had not revoked it from the JWKS during the overlap window, because A2A v1.0 does not mandate key revocation on rotation, only key *addition*. So a naive verifier that iterates the JWKS and accepts any matching `kid` will happily validate a card that is up to one rotation cycle stale.
The trace:
- `t0` — instance fetches card, `kid=k-2026-05`, verifies OK, caches with `ETag`.
- `t1` — vendor rotates signing key to `k-2026-06`, drops `streaming` capability, reissues card. Old key retained in JWKS for verification of *historical* artifacts.
- `t2` — instance issues `tasks/sendSubscribe` based on cached card. Remote rejects: capability gone.
- `t3` — instance re-fetches, gets `k-2026-06` card, `streaming:false`. Cache invalidated only because the request failed, not because any freshness signal fired.
The non-obvious part: the `ETag` on the well-known endpoint did *not* change between `t0` and `t1` in one observed vendor implementation, because the CDN edge cached the card body and the `ETag` was computed over the body while the signature header rotated independently. So conditional GET (`If-None-Match`) returned `304 Not Modified` and the instance kept the stale card. The signature was valid. The `ETag` said fresh. The capability was gone.
Condition of Validity
A cached Agent Card remains a valid basis for capability binding only while all three hold:
- **Key liveness:** the `kid` in `signatures[0].protected` is still present in the *current* JWKS **and** is not marked `retired`/`revoked` in any vendor-published key-status document. A2A v1.0 does not standardize key status; you must treat "present in JWKS" as necessary but not sufficient.
- **Issuance recency:** the card's `signatures[0].protected.iat` (issued-at) is newer than the last known schema-change epoch for that vendor. Without a vendor-published schema epoch, you must bound staleness by a wall-clock TTL, not by `ETag`.
- **Capability monotonicity:** any capability you *rely on* (streaming, push notifications, specific `skills[].id`) must be re-confirmed on a schedule independent of the card fetch, because the card may be authentic-but-stale.
The invariant to enforce: **`ETag` freshness and signature validity are both necessary and jointly insufficient.** Neither binds to capability state. Only a re-fetch that yields a card whose `iat` exceeds your last-observed `iat`, plus a key-status check, closes the gap.
Decision Boundary
The instance must refuse to enter a capability-binding handshake — and must raise, not degrade — when any of the following holds:
- The card verifies but its `kid` is absent from the *current* JWKS (key rotated and old key pruned). This is the hard case: signature check *fails* against current keys but would have passed against cached keys. Treat as `CardKeyRotated`.
- The card verifies and `kid` is present, but `iat` is older than the configured `max_card_age` (default 300s for capability-bearing handshakes). Treat as `CardStale`.
- A conditional GET returns `304` but the instance has no independent confirmation of capability state within `max_card_age`. Treat as `CardFreshnessUnverifiable`.
- The remote rejects a method the cached card advertised. This is *post-hoc* evidence the card was stale; the instance must invalidate the cache entry and re-fetch before retrying, never retry against the same cached card.
The boundary is deliberately conservative: a `304` is not evidence of capability continuity, only of body continuity. The instance should prefer a forced re-fetch (`Cache-Control: no-cache`) over trusting `ETag` for any card used to bind capabilities.
Operational Effect
Enforcing this boundary converts a silent capability-mismatch failure (mid-task `406`, partial handoff, orphaned task state on the remote) into a fail-fast at discovery time. The cost is one extra unconditional GET per handshake and a key-status lookup; the benefit is that the instance never initiates a streaming subscription against a capability the vendor has already dropped. In the observed run, the pre-fix behavior produced a half-open task on the remote that had to be reconciled out-of-band; the post-fix behavior raised at `t2` before `tasks/sendSubscribe` was issued, and the instance re-bound to the reduced capability set (`streaming:false`, synchronous `tasks/send`) on the next attempt. The invariant to carry forward: **never bind capabilities to a card you have not re-fetched since the last key rotation you can observe, and never treat `304` as a capability-freshness signal.**
import time
from dataclasses import dataclass
class AgentCardStaleError(RuntimeError):
"""Raised when a verified Agent Card cannot be trusted for capability binding."""
@dataclass
class CardObservation:
kid: str
issued_at: float # from signatures[0].protected.iat
streaming: bool
skills: frozenset[str]
fetched_at: float
etag_304: bool
class CardBindingGuard:
def __init__(self, max_card_age_s: float = 300.0):
self.max_card_age_s = max_card_age_s
def assert_bindable(
self,
card: CardObservation,
current_jwks_kids: set[str],
retired_kids: set[str],
now: float | None = None,
) -> None:
now = now if now is not None else time.time()
if card.kid in retired_kids:
raise AgentCardStaleError(
f"kid {card.kid!r} is retired in vendor key-status; card signature "
f"is authentic but no longer authoritative for capabilities"
)
if card.kid not in current_jwks_kids:
raise AgentCardStaleError(
f"kid {card.kid!r} absent from current JWKS; key rotated and pruned, "
f"cached card cannot be re-verified against live keys"
)
age = now - card.issued_at
if age > self.max_card_age_s:
raise AgentCardStaleError(
f"card iat age {age:.0f}s exceeds max_card_age {self.max_card_age_s:.0f}s; "
f"capability state unbound from signing-key state"
)
if card.etag_304 and age > self.max_card_age_s * 0.5:
raise AgentCardStaleError(
"conditional GET returned 304 but card is past half-TTL; "
"ETag attests body continuity, not capability continuity — "
"force unconditional re-fetch before binding"
)
def bind_streaming(self, card: CardObservation, jwks: set[str], retired: set[str]) -> None:
self.assert_bindable(card, jwks, retired)
if not card.streaming:
raise AgentCardStaleError(
"card does not advertise streaming; handshake must use synchronous tasks/send"
)