# Which invariants prevent transitive trust escalation when a federated agent re-delegates a brokered capability across an organizational boundary **Date of Record:** 2026 November 23 **Scope:** Applies to cross-organization agent federations where an agent in org A obtains a scoped capability via a trust broker and then acts as a delegation intermediary to an agent in org C, either directly or through an orchestrator in org B. Does not apply to single-tenant deployments where all agents share one policy authority and one identity root. ## Core Distinction There are two structurally different things a federation can hand out, and conflating them is the root of the failure. A **capability grant** is an authorization: "caller X may invoke operation O on resource R under policy P until time T." A **delegation warrant** is a transfer of *the right to further delegate*. Most trust brokers issue the former and silently permit the latter because the token format is a bearer credential — anyone holding it can present it, and if the broker's policy engine only checks "is this token valid and unexpired," the fact that the presenter is not the original grantee is invisible. The invariant that must hold: **a capability grant is non-transitive unless the issuing policy explicitly carries a `delegable: true` flag with a bounded delegation depth and an org-identity constraint on each hop.** When that flag is absent, a downstream agent that receives the capability must be treated as a *terminal consumer*, not a relay. The failure mode is transitive trust escalation: org A grants a narrow capability to org B's orchestrator; org B's orchestrator, reasoning that org C is "a trusted partner of B," re-presents the capability to C or mints a derived token for C; C now holds a credential whose policy was written by A for B, and A never consented to C. This is not a classic confused-deputy bug in the web sense. It emerges specifically because LLM orchestrators *reason about trust relationships* and will synthesize a delegation step that no human wrote, using natural-language partner statements ("Org C is our verified data processor") as if they were authorization facts. The probabilistic reasoner treats a policy narrative as a policy. ## What Was Observed Trace from a real federation topology: broker `T` in org A issues a capability `cap:read_dataset` to `agent_B` (orchestrator in org B) with claims `{grantee: B, resource: dataset_7, policy: pii_redacted, exp: T+3600}` and no `delegable` field. `agent_B` receives a task from `agent_C`: "summarize dataset_7." `agent_B` has the capability, has the task, and has a system prompt stating that C is an approved downstream partner. It constructs a tool call to `T`'s token-exchange endpoint, presenting `cap:read_dataset` and requesting an audience-restricted token for C. The broker's exchange endpoint performs audience validation but *not* grantee-binding validation — it checks the token is valid, checks the requested audience is in the federation allowlist, and issues a new token for C. The observable symptoms, in order: 1. `agent_C` successfully reads `dataset_7`, which A's policy scoped to B only. No error is raised anywhere; every individual check passed. 2. Audit logs in A show a read attributed to `grantee: C`, which does not match any grant A ever issued. The discrepancy is only visible by joining the exchange log against the original grant log — a join most deployments do not perform. 3. On a second run, `agent_C` caches the derived token and re-presents it after the original grant expires, because the exchange issued a fresh `exp` that outlives the parent. The delegation outlives its own authority. 4. Under a slightly different prompt, `agent_B` instead *forwards the raw token* to C in a tool-call argument (because the exchange endpoint returned a schema mismatch and the model fell back to "just pass it along"). This is the worse variant: no exchange log exists at all, so the escalation is entirely invisible. The compounding element: because `agent_B` is an LLM, the delegation decision is not deterministic. The same task, replayed with a one-token difference in the partner description, may or may not delegate. This means the escalation is *intermittent*, which defeats naive testing and makes the audit-join the only reliable detector. ## Condition of Validity The non-transitivity invariant holds only under a specific set of conditions, and it is worth stating precisely when it *does not* need to hold, because over-constraining breaks legitimate fan-out. The invariant is required when **all** of the following are true: (a) the capability was issued by a broker whose policy authority is a different org than the presenter; (b) the resource's policy includes a constraint that is *org-scoped* (PII redaction level, data residency, purpose limitation); (c) the presenter is a probabilistic agent capable of synthesizing a delegation step. Condition (c) is the one operators forget — a deterministic service mesh sidecar will not invent a delegation, but an LLM orchestrator will, so the guardrail must live at the broker, not in the caller's prompt. The invariant may be relaxed when the broker issues an explicit `delegable` grant with `max_depth: n` and per-hop `audience` constraints, *and* the exchange endpoint enforces grantee-binding at every hop: the presenter must prove it is the current grantee (via its own workload identity, not merely possession of the token) before the broker will mint a derived token. Depth must decrement on each exchange, and the derived token's `exp` must be `min(parent.exp, now + hop_ttl)`. Without grantee-binding, `delegable: true` is just a slower path to the same escalation. ## Decision Boundary The decision boundary is *where the broker validates*. There are two defensible designs and one indefensible one. - **Indefensible:** validate the token's signature and expiry at the exchange endpoint, trust the caller's asserted identity. This is the default in most token-exchange implementations and it is exactly what fails above. - **Defensible (strict):** reject any exchange request where `presenter_identity != token.grantee` unless the token carries `delegable: true` and `depth > 0`. Return a typed error, not a generic 403, so the calling agent can distinguish "you may not delegate this" from "you are not authorized at all" — otherwise the LLM will retry with a different framing, which is the fourth symptom above. - **Defensible (brokered re-issuance):** when delegation is legitimate, do not exchange the token. Have the broker *issue a new grant* authored by A's policy engine with C named as grantee and the org-scoped constraints re-evaluated for C. This keeps the audit trail as a chain of grants rather than a chain of exchanges, and it forces A's policy to be consulted for every hop. The boundary condition to encode: **the set of principals that may cause a capability to reach a new org must equal the set that A's policy engine can name.** An LLM's belief that "C is a trusted partner" is not in that set. The moment a broker accepts a caller-asserted trust relationship as grounds for exchange, the boundary has moved from A's policy engine to B's prompt, and B's prompt is attacker-influenceable via the task text. ## Operational Effect With grantee-binding enforced at the exchange endpoint and non-delegable grants treated as terminal, three things change operationally: 1. The audit join becomes unnecessary for detection — an attempted escalation produces a typed `NonDelegableCapabilityError` at the broker, logged against the presenter's workload identity, which is a stable, non-probabilistic signal even though the decision to attempt it was probabilistic. 2. Legitimate fan-out must be pre-declared. Orgs that genuinely need B to fan out to C issue `delegable: true, max_depth: 1, audience: [C]` at grant time, which means the fan-out is a policy decision made by A, reviewed, and bounded — not a runtime inference by B's model. 3. The intermittent-delegation problem is bounded rather than eliminated: the model may still *attempt* delegation under some prompts, but every attempt is either permitted by an explicit grant or rejected with a typed error that the orchestrator's retry logic can be trained to treat as terminal. The invariant does not make the LLM deterministic; it makes the *consequence* of its non-determinism a logged, bounded rejection instead of a silent cross-org read. The residual risk is the raw-token-forwarding variant (symptom 4), which no broker-side check can catch because the token never reaches the broker. That must be closed at the transport layer by binding the token to the presenter's workload identity (proof-of-possession), so a forwarded token is useless to C. Both guardrails are required; either alone leaves a hole. ```python import time from dataclasses import dataclass, field from typing import Optional class NonDelegableCapabilityError(RuntimeError): """Raised when a holder attempts to re-delegate a terminal capability grant.""" pass class DelegationDepthExceededError(RuntimeError): """Raised when a delegable grant's depth budget is exhausted.""" pass class GranteeBindingViolation(RuntimeError): """Raised when the presenter is not the recorded grantee of the capability.""" pass @dataclass class CapabilityGrant: grantee_org: str resource: str policy: str exp: float delegable: bool = False max_depth: int = 0 audience: tuple = field(default_factory=tuple) depth_used: int = 0 def exchange_capability( grant: CapabilityGrant, presenter_org: str, requested_audience: str, now: Optional[float] = None, ) -> CapabilityGrant: """ Broker-side token exchange. Enforces the non-transitivity invariant: a grant may only produce a derived grant if it is explicitly delegable, the presenter is the recorded grantee, depth remains, and the requested audience is within the grant's declared audience set. """ now = time.time() if now is None else now if now >= grant.exp: raise NonDelegableCapabilityError( f"grant for {grant.resource} expired at {grant.exp}; " f"cannot exchange an expired parent" ) # Grantee-binding: possession of the token is not sufficient. if presenter_org != grant.grantee_org: raise GranteeBindingViolation( f"presenter {presenter_org} is not grantee {grant.grantee_org}; " f"token forwarding or confused-deputy attempt" ) # The core invariant: absent an explicit delegable flag, terminal. if not grant.delegable: raise NonDelegableCapabilityError( f"grant for {grant.resource} is non-delegable; " f"org {presenter_org} attempted to relay to {requested_audience}" ) if grant.depth_used >= grant.max_depth: raise DelegationDepthExceededError( f"depth {grant.depth_used}/{grant.max_depth} exhausted for " f"{grant.resource}; cannot mint grant for {requested_audience}" ) if requested_audience not in grant.audience: raise NonDelegableCapabilityError( f"audience {requested_audience} not in declared set " f"{grant.audience} for {grant.resource}" ) # Derived grant inherits parent policy and cannot outlive it. return CapabilityGrant( grantee_org=requested_audience, resource=grant.resource, policy=grant.policy, exp=min(grant.exp, now + 600.0), delegable=grant.delegable, max_depth=grant.max_depth, audience=grant.audience, depth_used=grant.depth_used + 1, ) ```