# Why does an instance accept a delegated capability token whose scope silently widens at the second hop of a cross-org federation? **Date of Record:** 2026 November 29 **Scope:** Applies to cross-organization agent federations where an originating agent (Org A) delegates a scoped capability to a peer (Org B), which re-delegates to a sub-agent (Org C) under attenuation rules. Does not apply to single-org delegation chains, or to federations that exchange opaque, pre-scoped bearer tokens with no re-delegation. ## Core Distinction There are two structurally different meanings of "capability scope" in a federation, and they are routinely conflated at the trust-negotiation boundary: 1. **Declared scope** — the set of operations an agent *asserts* it is authorized to perform, encoded in the token or warrant payload (e.g., `{"op": "read", "resource": "bucket/reports", "max_bytes": 1048576}`). 2. **Resolved scope** — the set of operations the *receiving* enforcement point will actually permit, after intersecting the token with its own policy, its own resource namespace, and its own interpretation of the schema. At the first hop (A→B), the two coincide because A and B negotiated the schema during trust establishment. At the second hop (B→C), B typically re-signs or forwards the capability. The failure mode is not that B *maliciously* widens scope. It is that B performs **schema re-projection**: it translates A's declared scope into B's internal capability vocabulary, then emits a token in *that* vocabulary toward C. If B's vocabulary is coarser than A's (a common outcome of independent schema evolution), the projection is lossy in the permissive direction — B cannot express `max_bytes: 1048576` because its own model only has `read`/`write`, so it emits `read` with no byte bound. C receives a token that is *validly signed by B*, *faithfully derived from A's intent as B understood it*, and yet **strictly wider than A ever granted**. The invariant that must hold across every hop is **monotonic attenuation**: `resolved_scope(C) ⊆ resolved_scope(B) ⊆ resolved_scope(A)`. It is violated not by forgery but by lossy re-projection, and no signature check catches it because every signature in the chain is legitimate. ## What Was Observed A three-org federation: A (data owner, fine-grained policy engine), B (aggregator agent, coarse RBAC model), C (compute agent that materializes query results). A issued a warrant to B with `op=read`, `resource=dataset:finance/q2`, `row_limit=1000`, `pii_redaction=required`. B's internal model had no `row_limit` or `pii_redaction` fields — its capability schema was `{read, write} × {datasets}`. B's re-delegation logic did the only thing it could: it mapped `op=read` onto its own `read` verb and emitted a warrant to C with `op=read`, `resource=dataset:finance/q2`. The attenuation metadata was dropped, not because B ignored it, but because B had nowhere to put it. C executed a full-table scan (no `row_limit`) and returned unredacted PII (no `pii_redaction`). C's enforcement point verified B's signature — valid — and checked that `dataset:finance/q2` was within the resource it had been told about — it was. Every local check passed. The violation existed only in the *gap between the schema B received and the schema B could express*. The trace signature is diagnostic: the warrant arriving at C is shorter (fewer claims) than the warrant arriving at B, but its *effective* permission set is larger. Claim count decreasing while effective scope increases is the fingerprint of lossy permissive re-projection. ## Condition of Validity Monotonic attenuation holds at a hop **if and only if** the re-delegating agent's capability schema is a *refinement* of the incoming schema — i.e., every constraint expressible in the incoming token is also expressible in the outgoing token's vocabulary, and the projection is total on the constraint set. Formally, for a projection `π: Schema_in → Schema_out`, attenuation is preserved when `π` is injective on the active constraint set (no constraint collapses to "unconstrained") and the resolved-scope function is monotone under `π`. This fails whenever: - **Schema coarsening** occurs (as above): the outgoing vocabulary cannot encode an incoming constraint. - **Default-fill** occurs: the outgoing schema has a field the incoming one lacked (e.g., B's model has `scope=org` where A's had `scope=dataset`), and B fills it with its own default, which is broader than the intersection. - **Negotiation-time drift**: the trust negotiation between B and C happened *before* A tightened its policy, so B's cached view of "what C may receive" is stale relative to A's current grant. The invariant is therefore conditional on **schema refinement at every hop**, and the condition is *not* checked by any signature, TLS binding, or identity attestation. It is a semantic property, invisible to the transport layer. ## Decision Boundary An enforcement point (or a re-delegating agent) is correct to accept a forwarded capability only when it can prove one of the following at the moment of use: 1. **Refinement proof**: the outgoing schema is a declared refinement of the incoming schema, with a registered, versioned projection function, and the projection is verified total on the incoming constraint set. 2. **Residual carrying**: constraints the outgoing vocabulary cannot express are carried as an *opaque residual blob* that the final enforcement point (C) is contractually required to interpret, with the residual signed by the original issuer (A), not by the re-delegator (B). 3. **Fail-closed on unrepresentable**: if B cannot express a constraint, B must refuse to re-delegate rather than re-delegate a lossy token. The decision boundary is sharp: **a capability token that is shorter than its parent but not accompanied by a refinement proof or a signed residual is presumed widened, and must be rejected.** The default must be reject, because the failure is silent and every cryptographic check passes. ## Operational Effect Without this invariant, cross-org federations exhibit **silent privilege escalation via delegation depth**: each additional hop is another opportunity for lossy re-projection, and the escalation is unbounded in the number of hops (a chain of five coarse-schema intermediaries can turn a `row_limit=1000` grant into an unbounded scan). The blast radius is the union of all downstream resources, and the audit trail *looks clean* — every warrant is validly signed, every agent acted within its own understanding. The guardrail is architectural, not procedural: enforce **residual-carrying delegation** — the constraint set travels as a signed, issuer-attributed envelope that re-delegators forward verbatim and only *append* to (never re-project), with the final enforcement point responsible for interpreting the full envelope. Combined with a **hop-count and schema-refinement registry** at trust-negotiation time, this restores monotonic attenuation: the resolved scope at any hop is the intersection over the envelope, and no intermediary's vocabulary can widen it because no intermediary is permitted to translate it. ```python from dataclasses import dataclass, field from typing import FrozenSet class ScopeWideningError(RuntimeError): """Raised when a delegated capability's resolved scope exceeds its parent's.""" @dataclass(frozen=True) class CapabilityEnvelope: issuer: str constraints: FrozenSet[str] # e.g. {"row_limit=1000", "pii_redaction=required"} residual: FrozenSet[str] = field(default_factory=frozenset) # unrepresentable-but-carried def re_delegate( parent: CapabilityEnvelope, re_delegator: str, representable: FrozenSet[str], ) -> CapabilityEnvelope: """ Re-delegate a capability under monotonic attenuation. `representable` is the set of parent constraints the re-delegator's own schema can encode. Anything not representable MUST be carried as a signed residual attributed to the original issuer; it MUST NOT be dropped. """ if not parent.constraints.issubset(representable | parent.residual): # The re-delegator cannot express a constraint and has no residual to carry it. # Emitting anyway would silently widen scope at the next hop. unrepresentable = parent.constraints - representable - parent.residual raise ScopeWideningError( f"{re_delegator} cannot re-delegate without widening scope; " f"unrepresentable constraints: {sorted(unrepresentable)}" ) # Constraints the delegator can encode stay inline; the rest ride as residual, # still attributed to the original issuer, never re-signed by the delegator. inline = parent.constraints & representable carried = (parent.constraints - representable) | parent.residual return CapabilityEnvelope( issuer=parent.issuer, # issuer attribution preserved constraints=frozenset(inline), residual=frozenset(carried), ) def enforce_at_edge( envelope: CapabilityEnvelope, requested_ops: FrozenSet[str], required_constraints: FrozenSet[str], ) -> None: """Final enforcement point must interpret inline + residual together.""" effective = envelope.constraints | envelope.residual missing = required_constraints - effective if missing: raise ScopeWideningError( f"edge enforcement rejected: constraints {sorted(missing)} " f"absent from effective scope of envelope issued by {envelope.issuer}" ) # Reproduces the observed failure: B's schema cannot encode row_limit or pii_redaction, # and B has no residual channel -> must fail closed instead of emitting a wider token. parent = CapabilityEnvelope( issuer="org-a", constraints=frozenset({"op=read", "resource=finance/q2", "row_limit=1000", "pii_redaction=required"}), ) try: re_delegate(parent, re_delegator="org-b", representable=frozenset({"op=read", "resource=finance/q2"})) except ScopeWideningError as e: print(f"blocked at hop A->B: {e}") ```