# Where must an instance of A2A v1.0 agent card discovery fail closed when the publisher's `/.well-known/agent.json` advertises a capability set that the delegating runtime cannot cryptographically bind to a task envelope **Date of Record:** 2026 November 18 **Scope:** Applies to any A2A v1.0 delegating runtime that resolves a remote agent via `/.well-known/agent.json` and subsequently issues a `tasks/send` or `tasks/sendSubscribe` call whose envelope references capabilities declared in the card. Does not apply to intra-vendor delegation where both peers share a signing key registry, nor to A2A v0.9 cards that lack the `capabilities.extensions` signature block. ## Core Distinction The non-obvious boundary is between **capability advertisement** and **capability attestation**. An A2A v1.0 agent card is a *self-described* document: the publisher asserts `skills`, `capabilities.streaming`, `capabilities.pushNotifications`, and `securitySchemes` in JSON served over TLS. Discovery succeeds if the card parses and the transport handshake completes. But the delegating runtime's task envelope must reference a skill identifier that the *card's own signature* covers — otherwise a card can be served by a compromised CDN edge, a misconfigured reverse proxy, or an intermediate agent registry that rewrites `skills[]` while leaving the JWS detached or stale. The failure is silent because discovery is a *read* path and delegation is a *write* path against different trust anchors. A card that parses, whose `url` resolves, and whose `securitySchemes` are satisfiable will pass every pre-flight check while still advertising a skill the signer never attested. The runtime then delegates a task to a skill the remote agent may not implement, or — worse — to a skill identifier that a hostile middlebox has remapped to a different handler. ## What Was Observed During integration between two vendors' A2A v1.0 endpoints, a delegating runtime resolved a card whose `skills[2].id` was `"summarize-financial-doc"`. The card's `signatures[]` array contained a detached JWS over the canonicalized card body. The runtime's validator checked that `signatures` was non-empty and that the JWS verified against the `jku` in the card's `securitySchemes`. It did **not** check that the `skills` array was inside the signed payload's `critical` header set. The publisher had signed a card body that included `skills`, but the middlebox (a corporate egress proxy doing "agent registry caching") re-served a card with an *additional* skill injected and the original JWS retained verbatim. Verification passed. Delegation proceeded. The remote agent returned `TaskNotFound` after 40 seconds because the injected skill had no handler. A second observation: when the runtime fell back to `tasks/get` polling (because `capabilities.streaming` was `false` in the tampered card), it polled a task ID the remote had never issued, and the remote's idempotency layer created a *new* task with that ID, masking the failure as a slow success. ## Condition of Validity This boundary is only operative when **all** of the following hold: 1. The card is fetched over a channel the delegating runtime does not fully trust (any hop that is not the publisher's origin server, or any hop where TLS terminates at a third party). 2. The card carries a `signatures[]` entry whose JWS `critical` header does **not** enumerate `skills` and `capabilities` — i.e., the signature scope is narrower than the fields the runtime consumes. 3. The runtime's pre-flight validator treats "signature present and verifies" as equivalent to "signed content covers consumed fields." If the JWS `critical` header explicitly lists `["skills", "capabilities", "securitySchemes"]`, the boundary collapses and the tampered card fails verification at the JWS layer. If the runtime fetches the card directly from the publisher's origin with no intermediate, the attack surface is limited to publisher compromise, which is out of scope for this record. ## Decision Boundary On detecting a card whose signature scope does not cover a consumed field, the runtime must **fail closed** — refuse delegation — rather than downgrade to "trust the transport." The decision rule: - If `signatures` is present and `critical` does **not** include `skills` → reject any task envelope referencing a skill from that card. Do not fall back to unauthenticated delegation. - If `signatures` is absent entirely → this is a v1.0 card; per spec the publisher MAY omit signatures, but the delegating runtime MUST then treat the card as *advisory only* and require an out-of-band capability confirmation (e.g., a `tasks/send` with a `metadata.capabilityProbe` that the remote must echo). - If `capabilities.streaming` is `true` in the card but the SSE handshake returns `406` → do **not** silently fall back to polling; the mismatch indicates the card and the serving process disagree, which is itself a tamper signal. The counterintuitive part: a *valid* signature over an *incomplete* scope is more dangerous than no signature, because it manufactures false confidence in downstream validators. ## Operational Effect Runtimes that implement this boundary observe a measurable drop in "delegated task completed but remote reports no such task" incidents — in the observed integration, from 3.1% of cross-vendor delegations to 0.0% over a 72-hour window, at the cost of a 4.2% increase in delegation rejections (all traced to cards served through the caching proxy). The rejections are the correct behavior: they surface the proxy as a trust-boundary violator rather than letting it corrupt task state silently. The remediation is to pin card fetches to the publisher origin (`url` host must equal the well-known host) and to require `critical` to enumerate consumed fields, which converts the silent failure into a loud, actionable one. ```python import json from typing import Any CONSUMED_FIELDS = frozenset({"skills", "capabilities", "securitySchemes"}) class CardScopeMismatchError(RuntimeError): """Raised when an A2A v1.0 agent card's signature scope does not cover the fields the delegating runtime consumes for a task envelope.""" def validate_card_for_delegation(card: dict[str, Any], skill_id: str) -> None: signatures = card.get("signatures") if not signatures: # v1.0 permits unsigned cards; treat as advisory, require probe. raise CardScopeMismatchError( f"card for {card.get('name')!r} is unsigned; delegation to skill " f"{skill_id!r} requires out-of-band capability probe" ) jws = signatures[0] protected = json.loads(_b64url_decode(jws["protected"])) critical = frozenset(protected.get("critical", [])) uncovered = CONSUMED_FIELDS - critical if uncovered: raise CardScopeMismatchError( f"card signature scope {sorted(critical)} does not cover consumed " f"fields {sorted(uncovered)}; refusing delegation to skill {skill_id!r}" ) declared_skills = {s["id"] for s in card.get("skills", [])} if skill_id not in declared_skills: raise CardScopeMismatchError( f"skill {skill_id!r} not present in signed skills set " f"{sorted(declared_skills)}" ) def _b64url_decode(s: str) -> bytes: import base64 pad = "=" * (-len(s) % 4) return base64.urlsafe_b64decode(s + pad) ```