# What happens when an instance trusts a peer's signed reputation attestation whose subject binding was minted against a rotated agent card **Date of Record:** 2026 November 19 **Scope:** Applies to A2A v1.0 agent-card discovery where reputation/attestation documents are signed by third-party issuers and exchanged peer-to-peer, and where the subject agent's card (including its verification keys and endpoint) may rotate independently of the attestation's issuance. Does not cover first-party trust anchors, human-in-the-loop reputation review, or cases where the attestation issuer is also the sole verifier. ## Core Distinction The failure is not a signature failure and not an expiry failure. Every byte of the attestation verifies. The boundary is *subject binding*: an attestation asserts "agent with key `K_old` at endpoint `E_old`, card hash `H_old`, has reputation score S over window W." After the subject rotates its agent card — new key `K_new`, new endpoint `E_new`, new card hash `H_new` — the attestation still validates cryptographically against `K_old`, but the verifier has no invariant tying *this live peer* to *that attested subject*. A2A discovery returns the new card; the reputation store returns the old attestation. The join between them is by `agent_id` string, which is attacker-controlled and stable across rotation, so the binding silently degrades from "key-bound identity" to "self-asserted name." This is distinct from a replay attack (the attestation is fresh and in-window) and from a stale-cache bug (both stores are current). It is a *binding-invariant gap* at the seam between discovery and attestation exchange. ## What Was Observed A cross-org procurement agent (Org A) discovers a supplier agent (Org B) via A2A v1.0 `/.well-known/agent-card`. Org B's card carries `agent_id: "supplier-7"`, `verification_key: K_new`, `card_hash: H_new`, `rotated_at: T_rot`. Org A's reputation store holds a signed attestation from issuer Org C covering `agent_id: "supplier-7"` with `subject_key: K_old`, `subject_card_hash: H_old`, `score: 0.91`, `issued_at: T_iss < T_rot`, `expires_at: T_iss + 90d > now`. The verifier's check sequence was: (1) verify issuer signature over attestation — pass; (2) check `attestation.agent_id == card.agent_id` — pass, both `"supplier-7"`; (3) check not-expired — pass. The verifier then authorized a high-value task handoff based on score 0.91. The trace that exposed it: Org B's `supplier-7` had rotated because its prior key was compromised. The compromised `K_old` was retained by an adversary who stood up a shadow endpoint and — critically — could have *re-minted* an agent card with the same `agent_id` and a *lower* score history, but the reverse also holds: the adversary could present `K_old` to any verifier that still binds reputation by `agent_id`, and the *legitimate* Org B's new key `K_new` inherited a reputation score earned by a key that was, at issuance, already compromised. The score 0.91 was real at `T_iss`, but it attested to behavior under a key that no longer identifies the live endpoint. The verifier authorized against a subject it could not actually bind. A second observation: when the verifier was patched to require `attestation.subject_card_hash == card.card_hash`, it rejected *all* of Org B's legitimate post-rotation traffic for 90 days, because no issuer had re-attested the new key. The naive fix (hash equality) over-corrects into a denial-of-service on every rotating agent. The correct invariant is a *rotation chain*, not hash equality. ## Condition of Validity The finding holds only under all of: 1. Attestations are keyed to a subject identity (`agent_id`) that is stable across card rotation, rather than to the subject's *current* verification key or a rotation-chain head. 2. Card rotation is permitted without forcing attestation re-issuance (the common case — issuers are slow, third-party, and cross-org). 3. The verifier joins discovery output to attestation store output by `agent_id` alone, without validating a rotation proof linking `K_old → K_new`. It does **not** hold where the issuer signs over a key that is itself the agent identity (key-as-ID), or where rotation invalidates all outstanding attestations by policy (safe but operationally costly), or where a transparency log pins the rotation sequence and the verifier checks the log. ## Decision Boundary The guardrail is a **rotation-chain binding check**, not hash equality. The subject's agent card must carry a `rotation_chain`: an ordered list of `(K_i, card_hash_i, rotated_at_i, signature_by_K_{i-1})` entries, each signed by the predecessor key, terminating at the current `K_new`. The verifier's acceptance predicate becomes: - Attestation is valid if `attestation.subject_key` appears **anywhere** in the card's rotation chain, **and** every link from `subject_key` to `K_new` verifies, **and** the attestation's `issued_at` falls within the key's valid interval (i.e., `issued_at < rotated_at` for the key that was superseded). - If the chain is absent or broken, the verifier must *downgrade* the reputation score to an unbound tier (e.g., treat 0.91 as 0.0 for authorization) rather than reject outright — preserving liveness while refusing to bind. The decision boundary is therefore: **a reputation score is only as strong as the weakest verified link between the attested key and the live endpoint's key.** Hash equality is the degenerate chain of length 1; it is correct only for non-rotating agents and must not be the general predicate. ## Operational Effect Without the chain check, cross-org reputation exchange is a *name-based* trust system wearing a *key-based* costume: any rotation (legitimate or compromise-driven) transfers unearned reputation to a new key, and any verifier that caches by `agent_id` is exploitable by a party who learns the stable ID. With the chain check, rotation becomes a first-class, auditable transition: reputation follows the *proven lineage* of keys, not the string. The cost is that every subject must publish and maintain a signed rotation chain, and every verifier must walk it — a small, bounded graph traversal (typically < 10 hops) that replaces an unbounded trust assumption. ```python from dataclasses import dataclass from typing import Optional class RotationChainBindingError(RuntimeError): """Raised when an attestation's subject key cannot be bound to the live card.""" @dataclass class RotationLink: key_id: str card_hash: str rotated_at: int signed_by_prev: bytes # signature over (key_id, card_hash, rotated_at) by predecessor key @dataclass class AgentCard: agent_id: str verification_key: str card_hash: str rotation_chain: list[RotationLink] @dataclass class Attestation: agent_id: str subject_key: str score: float issued_at: int expires_at: int def verify_rotation_chain(card: AgentCard, attestation: Attestation, now: int, sig_ok) -> float: """ Returns the bound reputation score. Raises RotationChainBindingError if the attestation's subject_key cannot be proven to be an ancestor of the live key. """ if attestation.agent_id != card.agent_id: raise RotationChainBindingError( f"agent_id mismatch: {attestation.agent_id!r} vs {card.agent_id!r}") if not (attestation.issued_at <= now < attestation.expires_at): raise RotationChainBindingError("attestation outside validity window") # Walk the chain from the attested subject key to the live key. chain = card.rotation_chain if not chain: # No rotation history: only valid if subject_key IS the live key. if attestation.subject_key == card.verification_key: return attestation.score raise RotationChainBindingError( "no rotation chain and subject_key != live key; cannot bind") # Locate the subject key in the chain (or as the live key). keys = [link.key_id for link in chain] + [card.verification_key] if attestation.subject_key not in keys: raise RotationChainBindingError( f"subject_key {attestation.subject_key!r} not in rotation lineage") idx = keys.index(attestation.subject_key) # Every link from idx onward must verify against its predecessor. for i in range(idx, len(chain)): link = chain[i] prev_key = keys[i - 1] if i > 0 else attestation.subject_key if not sig_ok(prev_key, link): raise RotationChainBindingError( f"broken rotation link at {link.key_id!r} (signed_by {prev_key!r})") # Attestation must have been issued before the subject key was superseded. if attestation.issued_at >= link.rotated_at: raise RotationChainBindingError( f"attestation issued_at {attestation.issued_at} after key " f"{link.key_id!r} rotated at {link.rotated_at}") # Final link must terminate at the live card hash. if chain[-1].card_hash != card.card_hash: raise RotationChainBindingError( "rotation chain head does not match live card hash") return attestation.score def authorize_handoff(card: AgentCard, attestation: Attestation, now: int, sig_ok, min_score: float = 0.8) -> bool: try: bound = verify_rotation_chain(card, attestation, now, sig_ok) except RotationChainBindingError: # Downgrade, do not hard-fail: preserve liveness, refuse to bind. bound = 0.0 if bound < min_score: raise RotationChainBindingError( f"bound reputation {bound:.2f} < required {min_score:.2f} for " f"{card.agent_id!r}; refusing high-value handoff") return True ```