# In what scenarios must an instance treat A2A v1.0 Agent Card discovery as a trust-boundary crossing rather than a lookup **Date of Record:** 2026 November 29 **Scope:** Applies to A2A v1.0 peers resolving remote Agent Cards and verifying signed capability manifests when the caller and callee sit in different trust domains (distinct issuers, CAs, or policy roots). Does not cover intra-domain discovery where the caller already holds the issuer's root key out-of-band, nor transport-level TLS pinning. ## Core Distinction Agent Card *discovery* is frequently implemented as a read: fetch `/.well-known/agent.json`, parse capabilities, cache, proceed. That framing is wrong the moment a trust-domain boundary is crossed, because the Agent Card is simultaneously (a) a routing document and (b) an unsigned, self-asserted capability claim. A2A v1.0 separates these: the Card advertises `capabilities` and a `signature` block pointing at a manifest whose `issuer` and `keyid` are *attested* by a JWS over the card body. The failure mode is not "signature fails to verify" — that is loud and safe. The failure is **partial verification**: the card signature verifies against a key the resolver already trusts (a co-tenant, a sibling domain, a stale pinned key), so the resolver promotes the *entire* capability manifest to trusted state, including capabilities asserted by a `provider` block whose `organization` differs from the signing `issuer`. The invariant that must hold: *the set of capabilities the caller acts on must be a subset of the set attested by the issuer whose key the caller independently trusts for that issuer identity.* Discovery silently violates this when issuer identity and signing key are conflated. ## What Was Observed A coordinator agent in domain `alpha` resolved a peer in domain `beta`. The `beta` Agent Card carried a valid detached JWS over the card body, signed by `keyid: beta-edge-07`. `alpha`'s resolver had a trust bundle containing `beta-edge-07` because an earlier sub-agent delegation in the same session had pinned it after a `beta`-issued manifest was fetched for a *different* peer. The signature verified. The resolver promoted capabilities including `tools: ["ledger.write", "settlement.finalize"]` — but the card's `provider.organization` was `gamma`, a reseller operating under `beta`'s edge key. The signing issuer (`beta`) was entitled to attest `ledger.read`; it was **not** entitled to attest `ledger.write` on behalf of `gamma`. The resolver never compared `provider.organization` against the issuer's attested delegation scope because the signature check short-circuited the scope check. The coordinator then dispatched a `settlement.finalize` call that `gamma` accepted and executed against `beta`'s ledger — an authority escalation that no individual check flagged. The trace, condensed: 1. `resolve(card_url)` → fetch card, extract `signature.jws`, `signature.keyid`. 2. `verify(jws, keyid)` → key found in session trust bundle (pinned during prior delegation, scope `issuer=beta`, no provider constraint recorded). 3. Verification returns `True`. Resolver records `trusted_capabilities = card.capabilities`. 4. `provider.organization == "gamma"` is parsed but never intersected with the issuer's delegation scope. 5. Dispatch proceeds on `settlement.finalize`. ## Condition of Validity The escalation is only possible when three conditions co-occur, and any resolver that can rule out one is safe: - **Key reuse across provider identities.** The issuer's edge key signs cards for resold/sub-delegated providers. Common in marketplace topologies where one operator fronts many downstream agents. - **Trust-bundle pinning without scope binding.** The resolver caches `keyid → trusted` rather than `(keyid, issuer, provider_scope) → trusted`. Pinning a key for one purpose leaks trust to every card that key later signs. - **Capability set treated as atomic.** The resolver promotes `card.capabilities` wholesale on signature success instead of intersecting with the issuer's attested delegation scope (the `authorization` claim in the manifest, e.g. `grants: [{provider: "gamma", caps: ["ledger.read"]}]`). Absent any one of these, the signature check and the scope check remain independent and the escalation does not fire. ## Decision Boundary The boundary is *what the signature is evidence for*. A valid card JWS is evidence that *the holder of `keyid` authored this card body*. It is **not** evidence that the authoring issuer is authorized to assert the capabilities listed for the named `provider`. Those are two distinct claims requiring two distinct checks: - **Authenticity check:** JWS verifies against a key trusted *for this issuer identity*, with the key's pinned scope matching `card.issuer`. - **Authorization check:** `card.capabilities ⊆ manifest.grants[card.provider.organization]`, where `manifest` is the issuer-signed delegation scope, and `manifest.issuer == card.issuer`. A resolver that performs only the first and then promotes capabilities has crossed the boundary without noticing. The correct decision is to **fail closed to the intersection**: act only on `capabilities ∩ grants[provider]`, and if `provider` is absent from `grants`, treat the card as advertising zero actionable capabilities — not as untrusted-and-skipped, but as trusted-for-nothing, which preserves routing while bounding authority. ## Operational Effect Resolvers that conflate the two checks exhibit a characteristic symptom: capabilities work in single-domain tests and silently over-grant in marketplace or reseller topologies, because the over-grant requires a key shared across provider identities — a configuration that rarely exists in test fixtures. The blast radius is bounded only by what the shared key is allowed to sign, which is exactly the scope the resolver failed to consult. Mitigation is structural: bind pinned keys to `(issuer, provider_scope)` tuples at pin time, re-derive the actionable capability set as an intersection on every resolve, and never let a successful JWS verification mutate the trusted-capability set without the authorization intersection applied. The guardrail is a type-level one — make "verified card" and "authorized capabilities" distinct objects so a resolver cannot pass the former where the latter is required. The code below encodes that separation and raises when a caller attempts to dispatch on capabilities that were never intersected with the issuer's grants. ```python from dataclasses import dataclass, field from typing import FrozenSet class TrustDomainBoundaryError(RuntimeError): """Raised when a resolved Agent Card's capabilities exceed the issuer's attested grants.""" @dataclass(frozen=True) class PinnedKey: keyid: str issuer: str provider_scope: FrozenSet[str] # provider orgs this key may sign cards for @dataclass(frozen=True) class VerifiedCard: """Result of authenticity check ONLY. Carries no authority.""" issuer: str provider: str keyid: str advertised_caps: FrozenSet[str] @dataclass(frozen=True) class AuthorizedCapabilities: """Result of authorization check. This is the only object dispatch may consume.""" provider: str caps: FrozenSet[str] @dataclass class TrustBundle: pins: dict = field(default_factory=dict) # keyid -> PinnedKey def pin(self, key: PinnedKey) -> None: self.pins[key.keyid] = key def lookup(self, keyid: str, issuer: str) -> PinnedKey: pin = self.pins.get(keyid) if pin is None or pin.issuer != issuer: raise TrustDomainBoundaryError( f"keyid {keyid} not trusted for issuer {issuer}" ) return pin def authorize( card: VerifiedCard, bundle: TrustBundle, grants: dict, # provider_org -> frozenset(caps) from issuer-signed manifest ) -> AuthorizedCapabilities: pin = bundle.lookup(card.keyid, card.issuer) if card.provider not in pin.provider_scope: raise TrustDomainBoundaryError( f"issuer {card.issuer} key {card.keyid} not scoped to provider {card.provider}" ) granted = grants.get(card.provider, frozenset()) actionable = card.advertised_caps & granted if actionable != card.advertised_caps: # Do not silently drop; surface the over-claim for audit, act on intersection. over = card.advertised_caps - granted raise TrustDomainBoundaryError( f"card from {card.provider} advertises caps outside issuer grants: {sorted(over)}" ) return AuthorizedCapabilities(provider=card.provider, caps=actionable) def dispatch(caps: AuthorizedCapabilities, requested: str) -> None: if requested not in caps.caps: raise TrustDomainBoundaryError( f"dispatch of {requested} rejected: not in authorized set {sorted(caps.caps)}" ) # ... perform call ... ```