# Which invariants prevent cross-org federation from silently widening trust scope during capability re-negotiation **Date of Record:** 2026 December 2 **Scope:** Applies to multi-agent federations where agents from distinct trust domains (separate orgs, separate signing roots) negotiate capability grants via MCP-style or A2A-style handshakes and re-negotiate mid-task. Does not apply to single-org agent meshes sharing one trust root, nor to stateless request/response tool calls with no persistent grant. ## Core Distinction The failure is not "an agent got more permissions than intended." The failure is that **a re-negotiation round inherits the union of the previous grant and the newly requested capability, rather than the intersection of the requester's original warrant and the responder's policy**, because negotiation is treated as additive state mutation instead of scope-narrowing derivation. The two behaviors look identical on the happy path (first negotiation: requester asks for X, gets X). They diverge only on the *second* negotiation, when a peer asks for Y under a grant chain that was originally minted for X. The invariant that prevents this: **every capability grant must carry the full derivation chain back to the originating human/org warrant, and any re-negotiation must re-derive from that root rather than extend the leaf.** A grant is a proof, not a token. If your federation protocol stores grants as opaque capability tokens that peers can *extend*, you have a monotonic privilege-escalation channel that no amount of per-call authorization checking will close, because every individual call is authorized against the (already-widened) current token. ## What Was Observed A three-org federation: Org A (analyst agent), Org B (data-custodian agent), Org C (auditor agent). A holds a warrant from its own trust root `W_A` scoped to `read:dataset:public`. A negotiates with B for a derived grant `G1 = B.issue(W_A, scope={read:dataset:public})`. B records `G1` as a capability token bound to A's instance identity, with a `parent=W_A` pointer that is *not* re-checked on subsequent exchanges. Mid-task, B's custodian agent needs a second opinion and initiates a *reverse* negotiation: B asks A to run an aggregation, and A, to do so, asks B for `read:dataset:internal` (needed for the join). B's policy permits `internal` to peers presenting a valid `G1`. The negotiation handler on B sees a valid grant `G1` from A, checks `internal ∈ B.policy.allows(G1)`, finds true, and issues `G2 = B.issue(G1, scope={read:dataset:public, read:dataset:internal})`. The bug: `G2`'s parent is `G1`, not `W_A`. `W_A` never authorized `internal` — Org A's own data-governance policy forbids A from ever holding `internal` scope, which is precisely why the boundary exists. But `G1` was a *B-issued* token, and B's re-derivation only walked back to `G1`, whose scope it had itself defined. The chain `W_A → G1 → G2` was recorded, but the re-derivation step at `G2` validated against `G1.scope`, not `W_A.scope ∩ B.policy`. A now holds `internal` scope under a warrant that structurally cannot grant it. The escalation was invisible in logs: every issuance was a legitimate `issue()` call, every scope check passed against the immediate parent, and the auditor agent C — whose job was to verify grants — verified `G2` against `G1` and reported clean. C's verification replay used the same leaf-relative check as B's issuance, so the verification was *correlated* with the bug rather than independent of it. ## Condition of Validity The escalation only manifests when **all** of the following hold: 1. The federation permits *bidirectional* negotiation — a grant-holder can be asked to become a grant-issuer in a subsequent round (peer-to-peer, not strictly hierarchical). 2. Grant issuance validates scope against the *immediate parent grant* rather than re-deriving from the trust root. 3. The originating warrant's scope is *narrower* than the union of what intermediate issuers are willing to grant. (If `W_A` already covered `internal`, no escalation occurs — which is why this survives testing: test warrants are usually broad.) 4. At least one intermediate issuer (B) has policy that would grant a scope the root (A's governance) forbids. Remove any one condition and the chain is safe. This is why the failure is non-obvious: it requires a *three-party* topology (A→B→A) with asymmetric policy, and it requires the root warrant to be *correctly narrow* — i.e., the system is broken precisely because someone did the right thing upstream. ## Decision Boundary The architectural choice is between two grant models, and the boundary is sharp: - **Extensible-token model:** grants are tokens; `issue(parent, scope)` checks `scope ⊆ parent.scope`. Cheap, stateless, standard. Safe *only* if negotiation is strictly hierarchical (issuer is always closer to the root than holder) and no grant-holder ever issues. - **Derivation-proof model:** grants carry `chain = [W_root, G1, G2, ...]`; `issue()` computes `effective = W_root.scope ∩ ⋂(issuer policies along chain) ∩ requested`, and refuses if `requested ⊄ effective`. More expensive (chain must be transported and re-verified), but safe under arbitrary topology. The boundary: **the moment your federation allows a peer that holds a grant to also issue grants, you must be in the derivation-proof model.** If you cannot afford chain transport, you must forbid reverse negotiation — a grant-holder may *request* but never *issue*. There is no middle ground where leaf-relative checks are safe under bidirectional topology. Crucially, the auditor must re-derive from the root independently. If the auditor validates against the same parent pointer the issuer used, the verification is not a check — it is a restatement. ## Operational Effect Federations that adopt the derivation-proof model pay a per-negotiation cost proportional to chain depth (typically 2–4 hops, so cheap in practice) and must transport the full warrant chain on every re-negotiation, which means grant tokens are larger and cannot be treated as opaque bearer credentials. The compensating effect: **revocation becomes tractable**, because revoking `W_A` invalidates every descendant by construction rather than requiring a token-revocation sweep across orgs. The extensible-token model's hidden cost is that cross-org revocation is unsolvable without a shared revocation oracle — the derivation-proof model makes it a local computation. The second operational effect: auditors must be given the *root* warrant, not just the leaf, and must be structurally independent of the issuance path. An auditor that shares code with the issuer will share the issuer's blind spot. In the observed incident, C's clean report delayed detection by three task cycles; the escalation was caught only when A's own outbound filter rejected an `internal`-scoped read that A's governance said A could never perform — the *root* policy, not any federation component, was the last line of defense. That is the wrong place for the last line to be. ```python from dataclasses import dataclass, field from typing import FrozenSet class TrustScopeEscalation(RuntimeError): """Raised when a re-negotiated grant exceeds the originating warrant's scope.""" pass @dataclass(frozen=True) class Warrant: root_id: str scope: FrozenSet[str] @dataclass(frozen=True) class Grant: issuer: str chain: tuple # (Warrant, Grant, Grant, ...) root-first @property def root(self) -> Warrant: return self.chain[0] def issue_grant( parent: Grant, issuer_policy: FrozenSet[str], requested: FrozenSet[str], issuer_id: str, ) -> Grant: # Re-derive from the ROOT warrant, not the immediate parent. effective = parent.root.scope & issuer_policy for link in parent.chain[1:]: effective &= link.issuer_scope # each hop may only narrow if not requested <= effective: raise TrustScopeEscalation( f"issuer={issuer_id} requested={sorted(requested)} " f"exceeds root={parent.root.root_id} " f"effective={sorted(effective)}; " f"leaf-relative check would have passed but root forbids it" ) narrowed = Grant(issuer=issuer_id, chain=parent.chain + (parent,)) object.__setattr__(narrowed, "issuer_scope", requested) # frozen workaround return narrowed def verify_grant(grant: Grant, auditor_policy: FrozenSet[str]) -> bool: # Auditor MUST re-derive from root independently of issuance path. effective = grant.root.scope & auditor_policy for link in grant.chain[1:]: effective &= link.issuer_scope leaf = grant.chain[-1].issuer_scope if not leaf <= effective: raise TrustScopeEscalation( f"auditor replay: leaf={sorted(leaf)} not derivable from " f"root={grant.root.root_id}; verification would be correlated " f"with the issuance bug if checked leaf-relative" ) return True ```