# Where must an instance validate the A2A v1.0 agent card signature chain before accepting a delegated task envelope, and what breaks when it does not **Date of Record:** 2026 November 24 **Scope:** Applies to A2A v1.0 task delegation where a receiving agent (callee) accepts a signed task envelope from a caller whose authority derives from a card-fetched public key, including multi-hop delegation chains where the immediate caller is not the original principal. Does not apply to single-hop calls where the callee and caller share a pre-provisioned trust root out-of-band. ## Core Distinction The failure is not "the signature was invalid." The failure is that the signature was *valid over the wrong card*. A2A v1.0 separates two artifacts: the **agent card** (a JSON document at `/.well-known/agent.json` declaring capabilities, endpoints, and a `signingKey` / `keyId`) and the **task envelope** (the signed payload carrying `taskId`, `from`, `to`, `capability`, `payload`, and a `delegationChain`). The envelope's signature is checked against a key. The question this record fixes is: *which* key, resolved through *which* card, at *which* point in the chain—and can a caller cause the callee to resolve a key that was never bound to the identity that signed? The invariant that must hold: **the key used to verify envelope hop *N* must be the key whose `keyId` appears in the card that was itself fetched from the endpoint authenticated for the `from` field of hop *N*, and that card's own signature must chain to a root the callee already trusts.** Break any link and the envelope is cryptographically intact but semantically forged. ## What Was Observed A two-hop delegation: principal `P` delegates to orchestrator `O`, `O` re-delegates to worker `W`. `P`'s card at `https://p.example/.well-known/agent.json` declares `keyId: pk-p-1`. `O`'s card declares `pk-o-1`. The envelope arriving at `W` carries a `delegationChain` of two hops: 1. Hop 1: `from: P`, `to: O`, signed by `pk-p-1`, card-signed by `P`'s root. 2. Hop 2: `from: O`, `to: W`, signed by `pk-o-1`, card-signed by `O`'s root. `W` performed verification correctly *per hop*: it fetched `O`'s card from the `from`-declared endpoint, matched `pk-o-1`, verified hop 2. It then fetched `P`'s card, matched `pk-p-1`, verified hop 1. Both signatures passed. `W` executed. The break: `O`'s card listed `trustedIssuers: ["*"]` and, critically, `O`'s card advertised a `delegationPolicy` of `"attenuate"` but its `capability` set in the card *did not include* the capability `P` had granted in hop 1. `O` had re-delegated a capability (`filesystem.write:/tmp`) that its own card never claimed. `W` never checked that each hop's `capability` was a subset of the *granting* hop's card-declared capabilities—it only checked `from`/`to`/signature. The result: a confused-deputy escalation where `W` acted on a capability that `O` was never authorized to forward. The signatures were all valid; the *authority* was fabricated at hop 2 by an agent whose card did not support it. A second, sharper variant: `O`'s card endpoint returned a card with `keyId: pk-o-1` at fetch time, but `O` rotated to `pk-o-2` and the envelope was signed by `pk-o-2` while the *cached* card still listed `pk-o-1`. `W`'s verifier, on mismatch, fell back to "fetch card fresh" but the fresh fetch hit a stale CDN edge and returned the old card again. Verification "succeeded" against a key the signer no longer held—meaning the actual signer of hop 2 was unverified, and any holder of the revoked `pk-o-1` could have produced it. ## Condition of Validity The per-hop signature check is only sound when all of the following hold simultaneously: - **Card-to-identity binding.** The card for hop *N* was retrieved from an endpoint whose TLS identity matches the `from` authority of hop *N*, and the card's own signature verifies against a root in the callee's trust store. A card fetched from a `from`-controlled URL that is itself unsigned, or signed by a key the callee cannot chain, contributes zero authority. - **Capability attenuation.** For every hop *N* > 1, `capability(hop N) ⊆ capabilities(card of hop N's from)`. The granting agent may only forward what its own card claims. Without this, a valid signature attests to *who spoke*, not *what they were allowed to say*. - **Key freshness under rotation.** The `keyId` in the envelope must match the `keyId` in a card whose fetch is not served from a cache older than the card's `validUntil`, and the callee must reject on `keyId` mismatch rather than silently re-fetch-and-retry against a possibly-stale edge. A re-fetch is not a freshness proof. - **Chain monotonicity.** The `delegationChain` must be append-only and each hop must reference the prior hop's `taskId` hash; a chain that re-orders or omits a hop is not a delegation, it is a new grant. When any of these is absent, the envelope is *signature-valid but authority-invalid*, and the callee has no basis to execute. ## Decision Boundary The boundary is between **verifying a signature** and **verifying a delegation**. These are different predicates over different artifacts: - Signature verification answers: *did the holder of key K sign this byte string?* It is local, cheap, and per-hop. - Delegation verification answers: *was the holder of K authorized by its own card to assert this capability on behalf of this principal, at this time, along this chain?* It is global over the chain, requires card resolution, and must be evaluated before any side effect. The callee must treat the envelope as **inert until the full chain predicate passes**. Concretely: no tool invocation, no filesystem touch, no downstream A2A call may be issued from an envelope whose chain has not been verified end-to-end, including attenuation and freshness. A verifier that checks hop *N* and then executes before checking hop *N-1*'s attenuation has already crossed the boundary—the side effect is committed against unverified authority. The correct ordering is strict: resolve and verify *all* cards and attenuation constraints for the entire chain first, then admit the envelope to the execution queue. Partial verification with early execution is the failure mode, not a performance optimization. ## Operational Effect When the invariant holds, a compromised or buggy intermediate agent `O` cannot manufacture authority: any capability it forwards beyond its card is rejected at `W` before execution, and any key it presents that does not match a fresh, chain-valid card is rejected. The blast radius of a single compromised hop is bounded to what that hop's card actually claims. When it fails, the effect is silent: signatures verify, logs show "signature OK," and the callee executes an escalated capability. The failure is invisible to signature-level monitoring and only surfaces as an unauthorized side effect—often much later, during audit replay, when the chain is re-evaluated against card snapshots and the attenuation gap appears. The remediation is not "check signatures harder"; it is to insert the attenuation and freshness predicates into the admission path and to make card resolution fail-closed on `keyId` mismatch rather than retry-open. The guardrail is a single admission gate that composes signature, attenuation, and freshness into one predicate and refuses to emit an execution token unless all three pass. The code below encodes that gate and raises on the first violated link. ```python import hashlib from dataclasses import dataclass from typing import Mapping class DelegationAdmissionError(RuntimeError): """Raised when a task envelope is signature-valid but authority-invalid.""" @dataclass(frozen=True) class Card: agent_id: str key_id: str capabilities: frozenset[str] root_trusted: bool valid_until: int @dataclass(frozen=True) class Hop: from_agent: str to_agent: str capability: str key_id: str prior_task_hash: str | None def admit_envelope( chain: list[Hop], cards: Mapping[str, Card], now: int, trusted_roots: frozenset[str], ) -> str: """Return an execution token only if the full chain predicate passes. Predicate per hop N: 1. card exists for hop.from_agent and is root-trusted 2. card.key_id == hop.key_id (no silent rotation fallback) 3. card.valid_until > now (freshness) 4. for N > 1: hop.capability in card.capabilities (attenuation) 5. chain is append-only and references prior hop hash """ if not chain: raise DelegationAdmissionError("empty delegation chain") prior_hash: str | None = None for idx, hop in enumerate(chain): card = cards.get(hop.from_agent) if card is None: raise DelegationAdmissionError( f"hop {idx}: no card resolved for {hop.from_agent}" ) if not card.root_trusted or card.agent_id not in trusted_roots: raise DelegationAdmissionError( f"hop {idx}: card for {hop.from_agent} not chained to trusted root" ) if card.key_id != hop.key_id: # fail-closed on rotation; do NOT re-fetch-and-retry raise DelegationAdmissionError( f"hop {idx}: keyId mismatch card={card.key_id} envelope={hop.key_id}" ) if card.valid_until <= now: raise DelegationAdmissionError( f"hop {idx}: card for {hop.from_agent} expired at {card.valid_until}" ) if idx > 0: if hop.capability not in card.capabilities: raise DelegationAdmissionError( f"hop {idx}: attenuation violated — {hop.from_agent} " f"forwarded '{hop.capability}' not in its card" ) if hop.prior_task_hash != prior_hash: raise DelegationAdmissionError( f"hop {idx}: chain discontinuity, prior hash mismatch" ) prior_hash = hashlib.sha256( f"{hop.from_agent}|{hop.to_agent}|{hop.capability}|{hop.key_id}".encode() ).hexdigest() return "exec:" + prior_hash # execution token, only emitted on full pass ```