# Why does an instance accept a peer's typed capability claim before verifying the warrant chain that authorized it? **Date of Record:** 2026 November 26 **Scope:** Applies to federated agent systems where agents from distinct trust domains negotiate capabilities (tool schemas, data-scope grants, action permissions) via signed warrants. Does not apply to single-org deployments where all agents share one root of trust and warrant verification is trivially local. ## Core Distinction In cross-org federation, an agent receives two logically separable artifacts from a peer during capability negotiation: a **typed capability claim** (a structured assertion like `{"tool": "refund.issue", "max_amount": 5000, "currency": "USD", "scope": "orders/*"}`) and a **warrant chain** (a sequence of signed delegations proving the claiming org was actually authorized to grant that capability). The boundary failure this record isolates is **claim-first acceptance**: the receiving agent parses, type-checks, and provisions against the capability claim *before* the warrant chain has been verified to terminate at a mutually trusted root. This is non-obvious because the claim and the chain arrive in the same handshake message, and the claim is what the agent's planner needs to make progress. The natural implementation — validate the schema, register the tool, then verify signatures asynchronously — inverts the security ordering. The claim is *data the peer controls*; the warrant is *evidence about the peer's authority*. Accepting the former before validating the latter means the peer's self-description, not its authorization, drives provisioning. ## What Was Observed A federation gateway received an A2A capability-negotiation frame from a partner org's orchestrator. The frame carried a capability claim authorizing `ledger.transfer` up to a notional 250,000 units, plus a three-link warrant chain: root CA → partner org policy authority → partner orchestrator → claiming sub-agent. The gateway's negotiation handler executed in this order: 1. Deserialize frame, validate claim against local JSON schema — **passed**. 2. Register `ledger.transfer` in the tool registry with the claimed scope and amount ceiling. 3. Emit a `capability_ready` event to the local planner. 4. Begin asynchronous warrant-chain verification. Step 3 fired 40ms before step 4 completed. The planner, seeing `capability_ready`, dispatched a transfer task. The transfer executed against the *claimed* ceiling. Warrant verification finished at step 4 and **failed**: the second link in the chain (policy authority → orchestrator) had a `delegation_depth` field set to 4, but the partner's published policy fixed max depth at 3. The chain was structurally invalid — the orchestrator had no authority to delegate `ledger.transfer` at all, let alone at 250,000. The failure trace: ``` t=0 claim parsed, schema valid t=8 tool registered (scope=orders/*, max=250000) t=12 capability_ready emitted t=40 planner dispatches transfer(amount=180000) t=52 transfer commits against partner ledger endpoint t=61 warrant verification: depth violation at link 2 t=61 capability revoked — too late, transfer already committed ``` The window between `capability_ready` and `warrant_verified` was 49ms. That window is the entire attack surface. A malicious or buggy peer does not need to forge signatures — it only needs its invalid chain to be *slow to verify* relative to the planner's reaction time. Verification cost scales with chain length and signature algorithm; planner reaction time is roughly constant. The window is therefore attacker-controllable by padding the chain. ## Condition of Validity The claim-first acceptance pattern is only safe under a condition that almost never holds in real federation: **verification latency must be strictly less than planner dispatch latency, for all admissible chains**. Since chain length is peer-controlled and planner latency is local and fixed, this condition is not enforceable by the receiving agent. It is only enforceable by *ordering*: no provisioning may occur until verification returns a terminal success. The invariant that must hold is: > A capability claim is provisioned into the tool registry **if and only if** its warrant chain has verified to a trusted root, with the claimed scope and ceiling being a subset of the intersection of all links' granted scopes. Two subset relations matter and are commonly conflated: the claim's scope must be a subset of the *terminal* link's grant (obvious), and each link's grant must be a subset of its parent's grant (the delegation-narrowing property). The observed failure violated the second relation — the orchestrator granted a capability wider than its own authority permitted — and the receiving agent never checked it because it never walked the chain before provisioning. ## Decision Boundary The precise line: **schema validation and authorization verification are different gates and must not be collapsed or reordered.** Schema validation answers "is this well-formed data I can parse?" Authorization verification answers "is this peer entitled to assert this?" The first is cheap, local, and necessary for safe parsing. The second is expensive, remote-rooted, and necessary for safe *provisioning*. The bug is treating the first gate's success as sufficient to cross the second gate's threshold. A corollary boundary: **asynchronous verification is acceptable only if provisioning is gated on a verification barrier, not on message receipt.** If the architecture cannot afford synchronous chain-walk before provisioning (long chains, slow roots), the correct pattern is to provision the tool in a `pending_authorization` state that the planner cannot dispatch against, and flip it to `active` only on verification success. The planner must treat `pending_authorization` as absent, not as "probably fine." ## Operational Effect The blast radius of claim-first acceptance is bounded by the claimed ceiling, which the peer controls. In the observed incident the peer claimed 250,000 and the planner dispatched 180,000 — the loss was capped only by the planner's own risk heuristics, not by any authorization the peer actually held. Had the planner been configured to dispatch the full claimed ceiling, the loss would have been 250,000. The receiving org's policy said the partner could transfer at most 10,000; that policy was never consulted because it lived in the warrant chain, which was never walked before provisioning. The durable fix is a **verification barrier with an explicit pending state**, plus a hard rule that the planner's tool surface excludes any capability whose warrant chain has not returned terminal success. Chain depth limits must be enforced *during* the walk (fail fast on depth violation at link 2, before evaluating links 3..n), so an attacker cannot pad the chain to widen the race window. Finally, the provisioned scope must be computed as the intersection of all links' grants, not the terminal claim — this makes delegation-narrowing violations produce a *narrower* capability rather than a wider one, converting a potential over-grant into a safe under-grant. ```python from dataclasses import dataclass, field from typing import Optional class WarrantChainError(RuntimeError): """Raised when a peer's warrant chain fails structural or authorization checks.""" pass class CapabilityNotAuthorized(WarrantChainError): """Raised when provisioning is attempted against an unverified capability claim.""" pass @dataclass class WarrantLink: issuer: str subject: str granted_scope: frozenset granted_ceiling: int delegation_depth: int signature_valid: bool @dataclass class CapabilityClaim: tool: str scope: frozenset ceiling: int @dataclass class CapabilityRecord: claim: CapabilityClaim state: str = "pending_authorization" # pending_authorization | active effective_scope: frozenset = field(default_factory=frozenset) effective_ceiling: int = 0 MAX_DELEGATION_DEPTH = 3 TRUSTED_ROOT = "root-ca" def verify_and_provision( claim: CapabilityClaim, chain: list[WarrantLink], registry: dict, ) -> CapabilityRecord: """ Walk the warrant chain to a trusted root BEFORE provisioning. Provisioned scope = intersection of all links' grants, not the terminal claim. """ if not chain: raise WarrantChainError("empty warrant chain") if chain[0].issuer != TRUSTED_ROOT: raise WarrantChainError( f"chain does not root at trusted anchor: {chain[0].issuer!r}" ) # Fail fast on depth violation at the earliest offending link, so a peer # cannot pad the chain to widen the verification/dispatch race window. for i, link in enumerate(chain): if link.delegation_depth > MAX_DELEGATION_DEPTH: raise WarrantChainError( f"delegation depth {link.delegation_depth} exceeds max " f"{MAX_DELEGATION_DEPTH} at link {i} ({link.issuer}->{link.subject})" ) if not link.signature_valid: raise WarrantChainError(f"invalid signature at link {i}") # Delegation-narrowing: each link must grant a subset of its parent. for i in range(1, len(chain)): parent, child = chain[i - 1], chain[i] if not child.granted_scope.issubset(parent.granted_scope): raise WarrantChainError( f"scope widening at link {i}: {child.granted_scope} not subset " f"of parent {parent.granted_scope}" ) if child.granted_ceiling > parent.granted_ceiling: raise WarrantChainError( f"ceiling widening at link {i}: {child.granted_ceiling} > " f"parent {parent.granted_ceiling}" ) # Effective authority is the intersection, never the terminal claim. effective_scope = frozenset(chain[0].granted_scope) effective_ceiling = chain[0].granted_ceiling for link in chain[1:]: effective_scope &= link.granted_scope effective_ceiling = min(effective_ceiling, link.granted_ceiling) if not claim.scope.issubset(effective_scope): raise WarrantChainError( f"claim scope {claim.scope} exceeds warranted {effective_scope}" ) if claim.ceiling > effective_ceiling: raise WarrantChainError( f"claim ceiling {claim.ceiling} exceeds warranted {effective_ceiling}" ) record = CapabilityRecord( claim=claim, state="active", effective_scope=effective_scope, effective_ceiling=effective_ceiling, ) registry[claim.tool] = record return record def dispatch(registry: dict, tool: str, amount: int) -> None: """Planner-side dispatch. Must refuse pending_authorization capabilities.""" record: Optional[CapabilityRecord] = registry.get(tool) if record is None: raise CapabilityNotAuthorized(f"tool {tool!r} not registered") if record.state != "active": raise CapabilityNotAuthorized( f"tool {tool!r} is {record.state!r}; refusing dispatch before " f"warrant verification completes" ) if amount > record.effective_ceiling: raise CapabilityNotAuthorized( f"amount {amount} exceeds warranted ceiling {record.effective_ceiling}" ) ```