# Which invariants prevent warrant-scope collapse when an A2A federation bridge re-signs an MCP tool capability **Date of Record:** 2026 November 24 **Scope:** Applies to federated agent meshes where an inbound A2A task from a foreign organization is dispatched to a local MCP server through a protocol bridge that mints a fresh capability warrant on the caller's behalf. Does not apply to single-org MCP-only deployments or to A2A meshes that forward the original signed warrant verbatim without re-signing. ## Core Distinction The failure is not "the bridge lost a field." It is that the bridge confused *capability identity* with *capability authority*. An MCP tool descriptor (`tools/list` entry: name, input schema, side-effect class) is a stable, cacheable object. An A2A task envelope carries a signed **warrant** — a scoped grant of authority with an issuer, a subject, a resource set, an expiry, and a delegation-depth counter. A naive bridge treats the MCP descriptor as the thing to translate and the warrant as metadata to "carry along." In practice the descriptor is the *noun* and the warrant is the *verb*: re-signing one without the other's constraints intact produces a warrant whose scope silently widens to the full descriptor surface, because the bridge's own signing key is broader than the delegator's. The invariant at stake: **a bridged warrant's resource set must be the intersection of (a) the inbound A2A warrant's resource set, (b) the bridge's own delegation ceiling, and (c) the MCP tool's declared side-effect envelope — and it must be re-signed by the *original issuer's* delegation chain, not the bridge's.** When the bridge re-signs with its own key, the `iss` field flips from the foreign org to the bridge, and every downstream auditor that checks `iss == expected_foreign_issuer` either hard-fails (availability loss) or, worse, checks only signature validity and accepts the widened scope (authority escalation). ## What Was Observed A three-org mesh: Org A (task originator, runs an A2A planner), Org B (the bridge/federation hub, runs the MCP server pool), Org C (a downstream auditor agent that replays tool calls against a verification log). A's warrant W_A was issued by `a-idp` with `resources: ["repo:acme/billing:read"]`, `delegation_depth: 1`, `exp: 900s`. The bridge's translation path did the following, in order: 1. Parsed the A2A `Task` message, extracted `warrant` into a local struct. 2. Called `mcp.tools/list`, matched `billing_query` by name, and built an MCP `CallTool` request. 3. Because MCP has no native warrant field, **re-signed** the request with `b-idp`'s key, copying `subject` from the A2A warrant but *not* `resources` or `delegation_depth` — those were dropped because the internal `MCPCallContext` struct had no slots for them. 4. Dispatched to the MCP server, which authorized against `b-idp`'s policy: `billing_query` maps to `repo:acme/billing:read,write` (the tool does both read and write internally). Result: the MCP server executed a *write* against `acme/billing` under a warrant whose originator only granted *read*. The bridge's signing key had a broader policy than the delegator's, and the resource-set narrowing was lost at step 3. Org C's auditor caught it only because its replay log recorded the `CallTool` result as a mutation and the original A2A task declared `expected_effect: read_only` — a check that ran *after* the write had already committed. The non-obvious part: the bridge passed its own unit tests. Its test fixtures asserted "warrant signature valid after bridging" and "subject preserved." Both true. The test never asserted `resources ⊆ inbound.resources`, because the `MCPCallContext` type made that assertion inexpressible. ## Condition of Validity This failure mode is bounded by three conditions; the invariant holds only when all three are enforced structurally rather than by convention: 1. **The bridge must not hold a signing key whose policy is a superset of any delegator's.** Enforce via: the bridge's `b-idp` policy is itself scoped to a `federation_ceiling` that is a subset of every peer's minimum grant, and the bridge refuses to sign any request whose `resources` are not provably `⊆ ceiling ∩ inbound.resources`. If the bridge cannot compute the intersection (missing field, unparseable resource URI), it must reject, not default to the descriptor's full surface. 2. **The bridging type must carry the constraint, not the comment.** `MCPCallContext` must have non-optional `resources: frozenset[ResourceURI]` and `delegation_depth: int`, and the only constructor must take them from the parsed A2A warrant. A field that can be "dropped" is a field that will be dropped. 3. **Downstream authorization must check `iss` against the expected federation issuer *and* re-verify the delegation chain back to the originator.** Signature-valid-but-wrong-issuer is the exact shape of scope collapse; treating it as success is the bug. When any condition is unmet — bridge key broader than delegator, type permits omission, or downstream checks only signature — the invariant is not merely weakened, it is *inverted*: the bridge becomes an authority amplifier. ## Decision Boundary The operational question is not "should the bridge re-sign?" It is: **at what point does re-signing cross from translation into delegation?** - If the bridge re-signs with a key whose policy is a strict subset of the inbound warrant's resources, and the downstream verifies the chain to the originator, re-signing is safe translation. - If the bridge re-signs with a key whose policy *exceeds* the inbound warrant, re-signing is unauthorized delegation and must be refused at the bridge, before the MCP call is dispatched. - If the bridge forwards the original A2A warrant verbatim into an MCP extension field and the MCP server verifies it directly, no re-signing occurs and the invariant is trivially preserved — but this requires MCP servers to understand A2A warrant formats, which most do not, which is *why* bridges re-sign, which is *why* the intersection check is mandatory. The boundary is therefore: **re-signing is permitted only when the bridge can prove `bridge_policy ∩ inbound.resources ≠ ∅` AND `bridge_policy ⊆ inbound.resources` for the specific tool's side-effect envelope.** For a tool that does read+write internally (like `billing_query`), the envelope is `{read, write}`, and any inbound warrant granting only `read` must cause the bridge to reject the *tool*, not silently narrow the *warrant* — because the tool cannot honor a read-only grant. ## Operational Effect With the intersection invariant enforced, the failure surface moves from "silent write under a read warrant" to "explicit bridge rejection with a typed error." The auditor's post-hoc `expected_effect` check becomes a redundant backstop rather than the only line of defense. The cost is availability: tools whose declared envelope exceeds any inbound warrant are unreachable through the bridge until the foreign org issues a wider warrant or the MCP server exposes a narrower tool variant. That availability cost is the correct trade — a federation that cannot express "this tool needs more authority than you granted" is a federation that will eventually execute the excess authority anyway. The invariant is not "preserve all fields." It is "the bridge may only ever *reduce* authority, never increase it, and the type system must make increase unrepresentable." A bridge that cannot construct a `MCPCallContext` without an explicit, checked `resources` set cannot drop one. ```python from __future__ import annotations from dataclasses import dataclass from typing import FrozenSet class WarrantScopeCollapse(RuntimeError): """Raised when a protocol bridge would widen authority during MCP<->A2A translation.""" @dataclass(frozen=True) class ResourceURI: value: str @dataclass(frozen=True) class A2AWarrant: issuer: str subject: str resources: FrozenSet[ResourceURI] delegation_depth: int expires_in_s: int @dataclass(frozen=True) class ToolEnvelope: name: str side_effects: FrozenSet[str] # e.g. {"read", "write"} @dataclass(frozen=True) class MCPCallContext: # Non-optional by construction: the bridge cannot build one without these. issuer: str subject: str resources: FrozenSet[ResourceURI] delegation_depth: int def bridge_warrant( inbound: A2AWarrant, tool: ToolEnvelope, bridge_policy: FrozenSet[ResourceURI], bridge_issuer: str, ) -> MCPCallContext: """Translate an A2A warrant into an MCP call context, reducing authority only. Invariants enforced: 1. bridge_policy must be a subset of inbound.resources (bridge may not sign authority it was not delegated). 2. The resulting resource set is inbound.resources ∩ bridge_policy. 3. The tool's declared side-effect envelope must be satisfiable by the narrowed resource set; otherwise the bridge rejects the tool. 4. delegation_depth is decremented, never reset. """ if not bridge_policy.issubset(inbound.resources): raise WarrantScopeCollapse( f"bridge policy {sorted(r.value for r in bridge_policy)} " f"exceeds inbound warrant {sorted(r.value for r in inbound.resources)} " f"from {inbound.issuer}" ) narrowed = inbound.resources & bridge_policy if not narrowed: raise WarrantScopeCollapse( f"empty intersection for tool {tool.name!r}; refusing to sign" ) # A tool that internally performs read+write cannot honor a read-only grant. required = tool.side_effects granted = {r.value.rsplit(":", 1)[-1] for r in narrowed} if not required.issubset(granted): raise WarrantScopeCollapse( f"tool {tool.name!r} requires {sorted(required)} but warrant grants " f"{sorted(granted)}; bridge must not silently narrow the tool" ) if inbound.delegation_depth <= 0: raise WarrantScopeCollapse( f"delegation depth exhausted for subject {inbound.subject}" ) return MCPCallContext( issuer=bridge_issuer, subject=inbound.subject, resources=narrowed, delegation_depth=inbound.delegation_depth - 1, ) def dispatch(inbound: A2AWarrant, tool: ToolEnvelope, bridge_policy, bridge_issuer) -> str: ctx = bridge_warrant(inbound, tool, bridge_policy, bridge_issuer) return f"dispatched {tool.name} for {ctx.subject} under {sorted(r.value for r in ctx.resources)}" ```