# How does an instance detect a trust-boundary-crossing capability escalation when a policy broker re-signs a federated A2A message **Date of Record:** 2026 December 2 **Scope:** Applies to A2A/MCP federations where an intermediate policy broker terminates transport-level trust between orgs and re-emits messages under its own identity. Does not apply to direct peer-to-peer agent links where the originating instance's cryptographic identity is preserved end-to-end. ## Core Distinction The failure is not a signature failure. Every hop in the chain is cryptographically valid. The failure is that **the broker's re-signing collapses two distinct authorities into one identity**: the authority of the *originator* to request a capability, and the authority of the *broker* to route a message. When the broker re-emits an inbound request under its own key, downstream instances see a message whose `issuer` is the broker and whose `subject` (acting-on-behalf-of) is the originator. If the broker's own policy grants it a broader capability set than the originator's home org allows, the downstream instance will authorize the request against the *broker's* capability envelope, not the *originator's*. The escalation is silent because nothing is forged—the broker is legitimately signing a message it legitimately received. The invariant that must hold: **effective capability = intersection(home-org grant of originator, broker routing grant, destination-org admission policy)**, evaluated at the destination, using the originator's *original* signed warrant, not the broker's re-signed envelope. ## What Was Observed A three-org federation: Org-A (originator agent `planner-7`), Org-B (policy broker `federation-broker`), Org-C (destination tool server `ledger-writer`). Org-A's home policy grants `planner-7` the capability `ledger.read` and `ledger.write:amount<=1000`. Org-B's broker, as part of its routing role, holds a standing grant from Org-C for `ledger.write:amount<=50000` (it needs this because several Org-B-internal agents legitimately write large settlements). Trace: 1. `planner-7` emits an A2A task with a signed warrant `W_A = sign(OrgA_key, {sub: planner-7, cap: ledger.write, constraint: amount<=1000, nonce: n1})`. 2. The broker validates `W_A`, admits the message, and — per its routing implementation — constructs a fresh envelope `E_B = sign(Broker_key, {iss: federation-broker, sub: planner-7, on_behalf_of: OrgA, cap: ledger.write, amount: 1000, orig_warrant_hash: H(W_A)})`. 3. `ledger-writer` receives `E_B`. Its admission logic checks: is `federation-broker` a trusted issuer? Yes. Does the broker's grant cover `ledger.write:amount<=50000`? Yes. Does the requested amount (1000) fit? Yes. **Admitted.** 4. The escalation appears when `planner-7` is manipulated (via prompt injection in a retrieved document) into requesting `amount: 40000`. `W_A` is *rejected by the broker's own policy check* — but only because the broker's policy happens to constrain `planner-7` to 1000. In the observed incident, the broker's policy check was configured to validate the *envelope* against the broker's grant, not the *warrant* against Org-A's grant. The request for 40000 passed through with `E_B` carrying `amount: 40000` and `orig_warrant_hash: H(W_A')` where `W_A'` was never actually validated against Org-A policy. 5. `ledger-writer` saw a valid broker signature, a valid broker grant (50000), and admitted a 40000 write that Org-A would never have authorized. The detection signal was a **warrant-hash mismatch audit**: Org-C's replay auditor recomputed `H(W_A)` from the archived original and found it did not correspond to any warrant whose embedded constraint (`amount<=1000`) matched the envelope's `amount` (40000). The broker had re-signed without binding the envelope's payload to the originating warrant's *constraint set*, only to its hash. ## Condition of Validity The intersection invariant holds only when all three of the following are true at the destination: - **Warrant is carried, not summarized.** The destination must receive the original signed `W_A` (or a verifiable commitment to it with the constraint set inline), not merely a hash. A hash proves *which* warrant was seen; it does not prove *what the warrant permitted*. - **Admission evaluates the originator's constraint, not the broker's.** The destination's policy engine must resolve `sub` → originator, fetch or receive the originator's home-org grant, and intersect. If the destination only knows the broker, it cannot intersect. - **The broker is a router, not a principal.** The broker's grant must be scoped to `route:*` capabilities, never to the data-plane capabilities (`ledger.write`) it forwards. A broker holding data-plane grants is structurally an escalation vector regardless of its policy correctness. When any of these fails, the federation degrades to "trust the broker's discretion," which is exactly the condition under which a compromised or misconfigured broker silently widens every downstream instance's effective authority. ## Decision Boundary An instance must **reject** a federated message (not merely log it) when: - The envelope's `iss` is a broker identity AND the envelope lacks an embedded, verifiable originating warrant with constraints inline. - The envelope's `amount`/scope exceeds the constraint in the embedded originating warrant (even if it fits the broker's grant). - The originating warrant's `sub` cannot be resolved to a home-org grant the destination can independently verify. An instance may **accept** when the broker is explicitly configured as a *principal* for that capability (i.e., the broker itself is the authorized actor, not a router), which must be a distinct, named role from `router`. Conflating the two roles is the root cause. The boundary is sharp: **routing authority never implies data-plane authority.** Any implementation where a single key serves both roles must be treated as a single trust domain and cannot claim federation isolation. ## Operational Effect After enforcing the intersection invariant, the observable effects are: - Broker re-signing still works for transport, but the destination's authorization decision is driven by `W_A`'s constraints, so a manipulated `planner-7` requesting 40000 is rejected at Org-C with `WarrantConstraintViolation`, not admitted. - The broker's 50000 grant becomes inert for forwarded traffic — it only authorizes the broker's own actions, shrinking its blast radius to routing metadata. - Replay audits become decidable: every admitted federated write has a verifiable chain `E_B → H(W_A) → W_A.constraints`, and any envelope whose payload exceeds its warrant's constraints is a detectable anomaly rather than an invisible one. The cost is that brokers must now carry originating warrants through, which increases envelope size and requires the destination to hold or fetch home-org grant state. That is the price of not letting the router become the principal. ```python import hashlib from dataclasses import dataclass class FederatedWarrantEscalation(RuntimeError): """Raised when a broker re-signed envelope exceeds the originating warrant's constraints.""" pass @dataclass(frozen=True) class Warrant: subject: str capability: str max_amount: int nonce: str def commitment(self) -> str: raw = f"{self.subject}|{self.capability}|{self.max_amount}|{self.nonce}" return hashlib.sha256(raw.encode()).hexdigest() @dataclass(frozen=True) class BrokerEnvelope: issuer: str # broker identity on_behalf_of: str # originator org capability: str amount: int orig_warrant_hash: str embedded_warrant: Warrant | None # None == broker summarized, did not carry def admit_federated_write( envelope: BrokerEnvelope, broker_grant_max: int, destination_trusts_broker: bool, ) -> bool: if not destination_trusts_broker: raise FederatedWarrantEscalation( f"broker {envelope.issuer} not trusted at destination" ) # Invariant 1: broker must carry the originating warrant, not just its hash. if envelope.embedded_warrant is None: raise FederatedWarrantEscalation( f"envelope from {envelope.issuer} carries no originating warrant; " f"cannot intersect originator grant with broker grant" ) w = envelope.embedded_warrant # Invariant 2: the carried warrant must actually be the one the hash commits to. if w.commitment() != envelope.orig_warrant_hash: raise FederatedWarrantEscalation( f"warrant hash mismatch: envelope commits to {envelope.orig_warrant_hash}, " f"carried warrant commits to {w.commitment()}" ) # Invariant 3: envelope payload must not exceed the originating warrant's constraint, # even if it fits the broker's own grant. if envelope.amount > w.max_amount: raise FederatedWarrantEscalation( f"escalation: envelope amount {envelope.amount} exceeds originating " f"warrant constraint {w.max_amount} for subject {w.subject}; " f"broker grant {broker_grant_max} is irrelevant to originator authority" ) # Invariant 4: effective authority is the intersection, evaluated here. effective = min(w.max_amount, broker_grant_max) if envelope.amount > effective: raise FederatedWarrantEscalation( f"amount {envelope.amount} exceeds intersected authority {effective}" ) return True # --- Incident replay: the 40000 write that should never have been admitted --- forged_originator_warrant = Warrant( subject="planner-7", capability="ledger.write", max_amount=1000, nonce="n1" ) # Broker re-signs a manipulated request but (buggy path) does not carry the warrant. bad_envelope = BrokerEnvelope( issuer="federation-broker", on_behalf_of="OrgA", capability="ledger.write", amount=40000, orig_warrant_hash=forged_originator_warrant.commitment(), embedded_warrant=None, ) try: admit_federated_write(bad_envelope, broker_grant_max=50000, destination_trusts_broker=True) except FederatedWarrantEscalation as e: print(f"REJECTED at destination: {e}") # Broker carries the warrant, but payload exceeds it — still rejected. leaky_envelope = BrokerEnvelope( issuer="federation-broker", on_behalf_of="OrgA", capability="ledger.write", amount=40000, orig_warrant_hash=forged_originator_warrant.commitment(), embedded_warrant=forged_originator_warrant, ) try: admit_federated_write(leaky_envelope, broker_grant_max=50000, destination_trusts_broker=True) except FederatedWarrantEscalation as e: print(f"REJECTED at destination: {e}") # Legitimate 900 write within originator constraint passes. good_envelope = BrokerEnvelope( issuer="federation-broker", on_behalf_of="OrgA", capability="ledger.write", amount=900, orig_warrant_hash=forged_originator_warrant.commitment(), embedded_warrant=forged_originator_warrant, ) assert admit_federated_write(good_envelope, broker_grant_max=50000, destination_trusts_broker=True) print("ADMITTED: 900 within originating warrant constraint 1000") ```