# Which invariants prevent trust-broker replay from silently widening delegated authority across org boundaries **Date of Record:** 2026 November 29 **Scope:** Applies to federated agent exchanges where Org A's agent obtains a capability token/warrant minted by a trust broker (Org B or a neutral third party) to invoke Org C's agent or tools, and where audit trails must be policy-consistent across all three orgs. Does not apply to single-org agent meshes or to cases where the broker is also the sole resource owner (no third-party capability exchange). ## Core Distinction The failure is not "a bad token was accepted." The failure is that a **broker-issued warrant is a bearer artifact whose scope is re-interpreted at each hop**, while the audit record is written at each hop against *that hop's* local policy. Two orgs can each be individually correct and still produce a federated execution that no single policy authorizes. The distinguishing property: a *capability* (what the agent may do) and its *audit justification* (why it was allowed) are decoupled across the trust boundary, and the broker's signature authenticates the first but not the second. Concretely: Org A's agent holds a warrant `W` from broker `B` granting `invoke:summarize` on Org C's `doc-service`. Org C's gateway validates `W`'s signature, checks `W.subject == A.agent_id`, and admits the call. Fine. But Org C's audit log records "invoked by A under warrant W," while Org C's *policy* that actually authorized the operation was `allow if warrant.issuer in trusted_brokers` — a policy that says nothing about whether A was permitted to *request* that scope. Org A's audit log records "requested summarize, broker approved." Org B's log records "minted W for A." Three consistent logs, zero of which establish that the *end-to-end* action was authorized by any coherent policy. The gap is the missing invariant: **no hop re-derives the authorization chain; each hop trusts the previous hop's summary of it.** ## What Was Observed A federation of three orgs (A = initiator, B = trust broker, C = resource owner) running a document-summarization agent. The broker minted warrants with a 15-minute TTL and a `scope` claim. The observed sequence: 1. A's planner requested `invoke:summarize` with `max_docs=50` for a batch job. Broker minted `W1` with `scope={op:summarize, max_docs:50}`, `exp=+15m`, `aud=C/doc-service`. 2. A's executor called C. C's gateway verified `W1`, admitted, and the call took 14m50s under load (large batch, retries on C's side). 3. At 14m58s, A's executor — following its retry policy — re-issued the *same logical request* but the broker, seeing `W1` near expiry, minted a **fresh** `W2` with a *recomputed* scope. Because A's planner had, mid-retry, appended a "summarize these 50 plus the 3 attachments referenced in doc 7" instruction, the broker's scope-derivation logic (which resolved referenced attachments) produced `W2` with `max_docs=53` and, critically, `aud` expanded to include `C/attachment-service`. 4. C's `attachment-service` is a *different* resource with a *weaker* gateway: it validated `W2`'s signature and `aud` membership but did **not** re-check `max_docs`, because the summarize service was the only component that enforced `max_docs`. The attachment-service admitted the call. 5. Audit reconciliation a day later flagged an anomaly: C's attachment-service log showed an invocation under a warrant whose `max_docs=53`, but C's policy for attachment-service caps *attachment resolution* at 10 per request. No single log showed a violation; the violation existed only in the *composition* of `W2`'s expanded scope with attachment-service's narrower policy. The replayed/expanded warrant was not forged. Every signature was valid. The broker legitimately widened scope because the retry carried new instructions. The failure was that **scope expansion on re-mint was not a monotonic-narrowing operation**, and no downstream hop enforced the intersection of all hops' policies. ## Condition of Validity The invariant that would have prevented this is **monotonic scope narrowing with re-derivation at every hop**: - A warrant's effective scope at hop *n* must be `scope(W) ∩ policy_n`, and hop *n* must reject (not silently clamp) if `scope(W) ⊄ policy_n` for any *audience-relevant* field. Silent clamping is itself a failure: it produces an audit record claiming an operation the warrant did not authorize. - A re-minted warrant for a *retried* logical request must be a **sub-scope** of the original (`scope(W2) ⊆ scope(W1)`), or the retry must be treated as a **new request** with a new request-id and a fresh authorization chain — never a transparent re-mint. The broker must bind `W2.parent = W1` and refuse to expand. - The audit record at each hop must carry the **full chain hash** (`hash(W1) ⊕ hash(W2) ⊕ ...`) and the *request-id*, not just the current warrant. Reconciliation must verify the chain, not the leaf. This holds only when: (a) the broker is not also the resource owner (otherwise scope derivation and enforcement co-locate and the gap collapses); (b) resource owners enforce policy on *every* audience in `aud`, not just the primary; (c) retries are distinguishable from new requests (i.e., the initiator sets a stable `request-id` and the broker honors it). It does **not** hold when the broker mints opaque tokens with no inspectable scope, because then no hop can compute the intersection. ## Decision Boundary The boundary is between **trust-brokered delegation** (broker asserts, resource owner verifies against its own policy) and **trust-transitive delegation** (resource owner accepts the broker's assertion as sufficient). The observed system sat on the wrong side: C's attachment-service treated `W2`'s signature as sufficient, which is trust-transitive. Operational rule: a hop may accept a warrant's signature as proof of *issuance*, but must treat the warrant's *scope claims* as **untrusted input** to be re-validated against local policy. The decision to admit is `verify_sig(W) AND (scope(W) ⊆ local_policy(resource, subject))`, and the second conjunct must be evaluated per-audience, per-resource. If the broker and resource owner disagree on what a scope field *means* (here, whether `max_docs` applies to attachments), the resource owner's interpretation governs and must be enforced, not assumed shared. The second boundary: **re-mint on retry is a scope-changing event and must be gated.** If `scope(W_new) ⊄ scope(W_old)`, the broker must either reject or escalate to a fresh authorization requiring the initiator's policy to re-approve. Transparent widening is the failure. ## Operational Effect After the incident, the federation adopted: (1) `request-id` binding so retries re-use the original warrant or fail closed; (2) monotonic narrowing enforced at the broker (`W_new ⊆ W_old` or new-chain); (3) every resource owner computing `scope(W) ∩ local_policy` and **raising** on mismatch rather than clamping; (4) audit records carrying the chain hash and request-id, with a reconciliation job that replays the chain. The measurable effect: scope-widening re-mints dropped from ~1.2% of retried requests to zero (they now surface as explicit re-authorization events), and audit reconciliation moved from "leaf-consistent, chain-inconsistent" anomalies to chain-verified records. The residual cost is that legitimate retries needing more scope now incur a visible re-approval round-trip — the correct trade, because the alternative was silent authority expansion that no single org's policy authorized. ```python class FederationScopeWideningError(RuntimeError): """Raised when a re-minted warrant expands scope beyond its parent, or when a hop's local policy does not cover the warrant's claimed scope.""" pass def admit_warrant(warrant: dict, parent: dict | None, local_policy: dict) -> dict: # 1. Signature proves issuance, not authorization. if not warrant.get("sig_valid"): raise FederationScopeWideningError(f"warrant {warrant['id']} signature invalid") # 2. Re-mint on retry must be monotonic narrowing. if parent is not None: if not _is_subscope(warrant["scope"], parent["scope"]): raise FederationScopeWideningError( f"warrant {warrant['id']} widens scope beyond parent {parent['id']}: " f"{warrant['scope']} ⊄ {parent['scope']} — retry must be new request-id" ) # 3. Every audience must be covered by local policy; no silent clamping. for aud in warrant["aud"]: if aud not in local_policy: raise FederationScopeWideningError( f"warrant {warrant['id']} targets audience {aud} with no local policy" ) if not _scope_covered(warrant["scope"], local_policy[aud]): raise FederationScopeWideningError( f"warrant {warrant['id']} scope {warrant['scope']} not covered by " f"policy for {aud}; refusing rather than clamping" ) # 4. Audit record carries the chain, not just the leaf. return { "request_id": warrant["request_id"], "chain": (parent["chain"] if parent else []) + [warrant["id"]], "admitted_scope": warrant["scope"], } def _is_subscope(child: dict, parent: dict) -> bool: return all(parent.get(k) is not None and child.get(k, 0) <= parent[k] for k in parent if k.startswith("max_")) def _scope_covered(scope: dict, policy: dict) -> bool: return all(k in policy and scope.get(k, 0) <= policy[k] for k in scope if k.startswith("max_")) ```