# Where must an instance refuse a brokered capability that widens scope across a trust boundary it cannot re-verify? **Date of Record:** 2026 December 4 **Scope:** Applies to federated agent deployments where a broker in org A issues a delegated capability token to an agent instance in org B, which then invokes tools or sub-agents in org C. Does not apply to single-org MCP tool calls or to static API-key integrations where scope is fixed at provisioning time. ## Core Distinction A capability token carries two distinct semantic payloads that are routinely conflated: the *grant* (what the issuing authority asserts the holder may do) and the *scope closure* (the set of downstream resources the holder will actually touch when executing). In same-org delegation these coincide because the issuer can introspect the full call graph. Across a federation boundary they diverge: the broker in org A attests a grant over resource `R_A` it controls, but the receiving instance in org B resolves that grant against *its own* tool registry, which may map the abstract capability `documents:read` onto a concrete backend that transitively fans out to `R_C` in org C — a resource the broker never saw and cannot vouch for. The invariant that must hold: **a delegated capability may only be exercised if the receiving instance can construct a scope closure whose every member is covered by a grant in the token's provenance chain.** When the local resolution of an abstract capability produces a closure wider than the attested grant, the instance is not merely over-reaching — it is executing under a warrant it cannot re-verify, because the widening happened *after* signing, inside its own registry. ## What Was Observed A federated retrieval agent in org B received a brokered token from org A's trust service: ``` grant: { action: "documents:read", resource: "corpus:acme-public", expiry: T+900 } provenance: [A.trustbroker → B.federation-gateway] ``` Org B's gateway validated the signature, checked expiry, and admitted the call. The instance then invoked its local `documents:read` tool. That tool's registry entry — provisioned months earlier by a different team — resolved `documents:read` to a composite handler that queried the primary corpus *and* a shared vector index. The vector index was physically hosted in org C and contained embeddings derived from `corpus:acme-internal`, a resource outside `R_A`. The failure trace: 1. Gateway admits token; scope check passes against the *abstract* capability string `documents:read`. 2. Instance resolves capability → composite handler (registry binding not visible to gateway). 3. Handler fans out: read `R_A` (covered), read `R_C` index (not covered, not visible to broker). 4. Org C's egress audit logs an access from a principal whose token provenance terminates at A's broker — but A's broker never granted `R_C`. 5. No exception is raised at any hop. The read succeeds. The violation is discovered only during cross-org reconciliation, hours later, as an orphaned access record with no matching grant. The non-obvious part: every individual component behaved correctly against its local contract. The gateway validated what it was given. The tool did what its registry said. The broker signed what it was asked to sign. The boundary failure lives in the *gap between the abstract capability and its concrete closure*, which no single party owns. ## Condition of Validity The scope-closure invariant holds only when the receiving instance can, at admission time, enumerate the transitive resource closure of the capability it is about to exercise and compare it set-wise against the union of grants in the provenance chain. This requires three properties, all of which are typically absent across org boundaries: - **Registry closure transparency:** the local binding from abstract capability to concrete resources must be inspectable *before* execution, not discovered during fan-out. Composite handlers that resolve dependencies at runtime violate this. - **Grant expressiveness:** the token must be able to express negative constraints (`NOT resource:R_C`) or an explicit allow-list of concrete resource identifiers, not just an abstract verb. Most brokering schemes carry only positive abstract grants. - **Provenance completeness:** the chain must terminate at an authority that the receiving instance can cryptographically verify *and* whose signing key was scoped to the resource namespace in question. A broker authorized to sign for `corpus:acme-public` must not have its signature accepted as covering `corpus:acme-internal` merely because both live under one org's key. When any of these is absent, the instance cannot construct the closure, and the invariant is undefined — which is the dangerous state, because undefined is silently treated as satisfied. ## Decision Boundary The instance must distinguish three outcomes at admission, and only the first is a proceed: - **Closure covered:** every member of the resolved closure appears in the provenance chain's grant set. Execute. - **Closure wider than grant:** at least one member is uncovered. This is the boundary case. The instance must *refuse the widening*, not refuse the call — it may execute the covered subset if the handler supports partial resolution, but it must not fan out into uncovered resources. If partial resolution is impossible, refuse entirely. - **Closure unresolvable:** the registry cannot enumerate the closure pre-execution. Treat as uncovered. A capability whose blast radius cannot be bounded before invocation must not be invoked under a brokered warrant, because the broker's attestation cannot be extended to resources it could not name. The subtle rule: **the receiving instance is the last party that can observe the widening, and therefore owns the refusal.** The broker cannot see org B's registry. Org C cannot see the token's abstract grant. Only the resolving instance holds both the grant and the closure simultaneously. Delegating the check back to the broker ("ask A if this is okay") reintroduces a round-trip that the broker will answer from the same incomplete view that caused the gap. ## Operational Effect Enforcing the invariant changes the failure mode from *silent over-reach discovered in reconciliation* to *loud refusal at admission*. The cost is that composite capabilities with opaque closures become unusable across federation until their registries are made transparent — a real capability regression that teams will pressure to waive. The correct response is not to waive but to require that any capability admitted across a trust boundary declare its closure statically, so the broker can sign over the actual resource set rather than an abstract verb. The guardrail that bounds the failure: at admission, resolve closure, diff against provenance grants, and if the diff is non-empty and the handler cannot be constrained to the covered subset, raise and halt. This converts an unbounded, invisible cross-org leak into a bounded, visible, per-call rejection that names the uncovered resource — which is exactly the information the broker needs to re-issue a correctly scoped token. ```python from dataclasses import dataclass, field from typing import FrozenSet class ScopeClosureViolation(RuntimeError): """Raised when a resolved capability closure exceeds its attested grant set.""" @dataclass(frozen=True) class Grant: action: str resources: FrozenSet[str] @dataclass(frozen=True) class BrokeredToken: grant: Grant provenance: tuple # ordered issuer chain, terminal = original authority expiry: int @dataclass class CapabilityBinding: abstract: str concrete_closure: FrozenSet[str] # resolved from local registry, pre-execution def admit_brokered_call( token: BrokeredToken, binding: CapabilityBinding, now: int, verifier_ok: bool, ) -> FrozenSet[str]: if not verifier_ok: raise ScopeClosureViolation("provenance chain failed cryptographic verification") if now >= token.expiry: raise ScopeClosureViolation("token expired before closure resolution") if binding.abstract != token.grant.action: raise ScopeClosureViolation( f"binding action {binding.abstract!r} does not match granted " f"{token.grant.action!r}" ) uncovered = binding.concrete_closure - token.grant.resources if uncovered: # The instance is the only party holding both grant and closure. # Refuse the widening; do not delegate the check back to the broker. raise ScopeClosureViolation( "resolved closure exceeds attested grant; uncovered resources: " f"{sorted(uncovered)}; broker cannot re-verify these" ) return binding.concrete_closure def execute_federated(binding: CapabilityBinding, token: BrokeredToken, now: int, verifier_ok: bool, handler_supports_partial: bool) -> FrozenSet[str]: try: covered = admit_brokered_call(token, binding, now, verifier_ok) return covered except ScopeClosureViolation as exc: uncovered = binding.concrete_closure - token.grant.resources if handler_supports_partial and uncovered: # Execute only the covered subset; never fan out into uncovered. return binding.concrete_closure & token.grant.resources raise ScopeClosureViolation( f"refusing brokered execution: {exc}" ) from exc ```