# Under what conditions must an instance reject a brokered capability grant whose policy envelope has been transitively narrowed by an intermediate org **Date of Record:** 2026 November 22 **Scope:** Applies to federated agent instances that receive capability grants through one or more trust-broker hops where each hop may attach or narrow a policy envelope (rate limits, data-class ceilings, tool allowlists, delegation-depth caps). Does not apply to direct same-org grants with a single authoritative issuer, nor to purely advisory capability advertisements that carry no enforcement weight. ## Core Distinction A **capability grant** asserts *that* a subject may invoke an operation. A **policy envelope** asserts *the conditions under which* that assertion remains true across every hop that relayed it. In cross-org federation these are frequently conflated: an intermediate broker validates the grant signature, forwards the token, and silently drops or rewrites the envelope because the broker's own authorization model has no representation for constraints it did not originate. The receiving instance then holds a cryptographically valid grant whose effective policy is *wider* than the strictest hop intended, or *narrower* in a way that makes the grant unusable but still looks valid. The invariant that must hold: **the effective policy at the leaf equals the intersection of every envelope attached along the chain, and the leaf must be able to recompute that intersection from the token itself.** When a hop strips an envelope field, the intersection is no longer computable at the leaf, and the leaf cannot distinguish "no constraint was imposed" from "a constraint was imposed and lost." That indistinguishability is the failure. This is not a signature-verification problem. Every signature in the chain can be valid. The break is in *envelope completeness*: a hop that narrows policy without leaving a signed, attributable record of the narrowing produces a grant whose provenance is intact but whose constraints are unverifiable. ## What Was Observed A three-hop federation: Org A (resource owner) issues a grant to Org B (broker) delegating `read:telemetry` with envelope `{max_data_class: P2, max_calls_per_min: 60, delegation_depth_remaining: 2}`. Org B re-brokers to Org C, narrowing to `{max_data_class: P1, max_calls_per_min: 30, delegation_depth_remaining: 1}`. Org C's agent relays to Org D's execution instance, which is the leaf. Observed trace: 1. Org B's broker serializes the outbound token using its internal `CapabilityToken` schema, which has fields for `data_class` and `rate` but **no field for `delegation_depth_remaining`**. The field is dropped at serialization, not by policy. 2. Org C receives the token, sees no depth field, and interprets absence as "unbounded depth" (its schema defaults missing depth to `None` = unlimited). Org C then re-delegates to Org D *and* to a second peer Org E, consuming depth it was never granted. 3. Org D's leaf validates the full signature chain — all valid — and computes effective policy as the intersection of the envelopes it can see: `{P1, 30/min, depth: None→unlimited}`. The `depth: unlimited` is a fabrication produced by two independent default-on-absence bugs compounding. 4. Org E, a sibling delegation, invokes with a data-class P2 argument. Org D's intersection says P1 ceiling, so it rejects — but Org E's own envelope (derived from the same stripped token) said P1 as well, and Org E's agent had *already* fetched P2 data under the belief its grant permitted it, because Org E's local policy engine defaulted the missing depth field differently and treated the grant as P2-scoped. The concrete damage: a P2-class telemetry record left Org A's boundary under a grant that Org A had capped at P1. The signature chain was never broken. The intersection was never computable at the leaf because one hop's schema could not represent a constraint the issuer imposed. A second, subtler observation: when Org B *did* attempt to narrow `max_calls_per_min` from 60 to 30, it did so by mutating the field in place and re-signing with its broker key. The leaf could verify Org B signed the 30, but could not verify that Org A had authorized Org B to *lower* the limit versus *raise* it — the token carried no directionality, so a malicious or buggy broker could equally have raised 60 to 600 and the leaf's intersection would have accepted it as a valid narrowing. Monotonic narrowing was assumed, never enforced. ## Condition of Validity A brokered grant is safe to honor at the leaf **if and only if all of the following hold**: - **Envelope completeness:** every constraint field the issuer set is present in the token at every hop, either with its value or with an explicit `null` that is distinguished from absent. Absence must be a hard error at the leaf, never a default. - **Monotonicity proof:** each hop's narrowing is accompanied by a signed statement of the *direction* of change relative to the parent envelope (a `narrowed_from` reference plus a check that the new value is a subset of the parent's). The leaf verifies the chain of subset relations, not just signatures. - **Depth accounting:** `delegation_depth_remaining` is decremented at each hop and the decrement is signed; a hop that cannot represent the field must refuse to relay rather than drop it. - **Intersection computability:** the leaf can reconstruct the full envelope chain from the token alone, without calling back to intermediate brokers (callbacks reintroduce the broker as a trusted oracle and defeat the point). When any of these fails, the correct behavior is **reject the grant and fail closed**, even though the signature verifies. A grant whose envelope is incomplete is not a weaker grant — it is an *unknown* grant, and unknown grants cannot be bounded. ## Decision Boundary The operational line is between **"I can compute the effective policy"** and **"I am inferring the effective policy from defaults."** The moment a leaf finds itself filling a missing envelope field with a default — whether permissive or restrictive — it has crossed from verification into guesswork. Two defaults in a chain (one hop defaulting depth to unlimited, another defaulting data-class to the issuer's class) can compose into a grant strictly wider than any single hop intended, and neither hop will ever see the composition. The boundary is sharp because it is *local*: the leaf does not need to know whether a field was dropped maliciously, by schema mismatch, or by a legacy broker. It only needs to detect that the field is absent where the issuer's schema required it. Absence is observable; intent is not. Corollary: a broker that cannot faithfully carry an envelope field it did not author must be treated as a **relay that terminates the trust chain**, not a relay that extends it. Such a broker may forward the grant only if it forwards the original issuer's envelope unmodified and marks itself as non-narrowing. A non-narrowing broker that also cannot prove non-narrowing is indistinguishable from a narrowing broker that lost the proof. ## Operational Effect Enforcing this invariant changes federation topology in three ways: 1. **Brokers must be envelope-complete or self-declare as opaque relays.** A broker with a lossy schema cannot participate as a narrowing hop. This forces schema negotiation at federation-join time (does your `CapabilityToken` represent every constraint the issuers you serve can impose?) rather than at invocation time. 2. **Leaves fail closed on absence, not on signature.** The dominant rejection mode shifts from "bad signature" to "incomplete envelope," which is a *cheap* rejection (no crypto failure, just a structural check) and therefore can be applied aggressively without throughput cost. 3. **Monotonicity becomes a verifiable property, not an assumption.** Brokers must emit signed subset proofs; a broker that mutates a field without a subset proof is rejected at the leaf even if the mutation was a legitimate narrowing, because the leaf cannot distinguish legitimate narrowing from widening without the proof. The residual risk is a broker that fabricates a subset proof. That is a Byzantine broker, out of scope for this invariant — but note that the invariant *reduces* the Byzantine surface from "any field mutation" to "forged subset proofs," which are detectable by cross-checking against the issuer's original envelope when the issuer is reachable. The invariant does not eliminate the need for issuer cross-checks; it makes them targeted rather than blanket. The practical failure this prevents is the one observed: a grant that verifies end-to-end while carrying a policy wider than any hop authorized, because the widening happened in the gaps between schemas rather than in any single signature. ```python class EnvelopeIncompleteError(RuntimeError): """Raised when a brokered capability grant cannot have its effective policy computed because an envelope constraint was dropped, defaulted, or narrowed without a signed subset proof.""" pass REQUIRED_ENVELOPE_FIELDS = frozenset({ "max_data_class", "max_calls_per_min", "delegation_depth_remaining", }) # Sentinels: ABSENT means the field was never present (hard error). # NULL means the issuer explicitly set no constraint (legal, means unbounded). ABSENT = object() NULL = object() def compute_effective_envelope(chain): """ chain: list of hop dicts, ordered issuer -> ... -> leaf. Each hop: {"issuer": str, "envelope": dict, "narrowed_from": str|None, "signature": str} Returns the intersected envelope. Raises EnvelopeIncompleteError on any hop whose envelope is missing a required field, or whose narrowing is not provably a subset of its parent. """ if not chain: raise EnvelopeIncompleteError("empty capability chain") effective = {} issuer_env = chain[0]["envelope"] for field in REQUIRED_ENVELOPE_FIELDS: val = issuer_env.get(field, ABSENT) if val is ABSENT: raise EnvelopeIncompleteError( f"issuer envelope missing required field {field!r}; " f"cannot establish baseline for intersection" ) effective[field] = val for hop_index, hop in enumerate(chain[1:], start=1): env = hop["envelope"] parent_id = hop.get("narrowed_from") if parent_id is None: raise EnvelopeIncompleteError( f"hop {hop_index} ({hop['issuer']}) declares no parent; " f"a narrowing hop must reference the envelope it narrowed" ) for field in REQUIRED_ENVELOPE_FIELDS: child_val = env.get(field, ABSENT) if child_val is ABSENT: # The exact failure observed: a lossy broker schema drops # a field, and the leaf cannot tell "no constraint" from # "constraint lost". Refuse to default. raise EnvelopeIncompleteError( f"hop {hop_index} ({hop['issuer']}) dropped envelope " f"field {field!r}; absence is not a default and the " f"intersection is not computable at the leaf" ) parent_val = effective[field] if field == "max_data_class": # Lower class number = stricter. Child must be <= parent. if child_val is not NULL and parent_val is not NULL: if child_val > parent_val: raise EnvelopeIncompleteError( f"hop {hop_index} widened max_data_class " f"{parent_val}->{child_val} without authorization" ) effective[field] = ( child_val if parent_val is NULL else parent_val if child_val is NULL else min(child_val, parent_val) ) elif field == "max_calls_per_min": if child_val is not NULL and parent_val is not NULL: if child_val > parent_val: raise EnvelopeIncompleteError( f"hop {hop_index} widened max_calls_per_min " f"{parent_val}->{child_val} without authorization" ) effective[field] = ( child_val if parent_val is NULL else parent_val if child_val is NULL else min(child_val, parent_val) ) elif field == "delegation_depth_remaining": if parent_val is not NULL and child_val is not NULL: if child_val >= parent_val: raise EnvelopeIncompleteError( f"hop {hop_index} did not decrement " f"delegation_depth_remaining " f"({parent_val}->{child_val}); a relay hop must " f"consume depth" ) effective[field] = child_val if effective["delegation_depth_remaining"] is not NULL: if effective["delegation_depth_remaining"] < 0: raise EnvelopeIncompleteError( "delegation depth exhausted; grant cannot be honored" ) return effective def authorize_invocation(chain, requested_data_class, requested_calls_per_min): env = compute_effective_envelope(chain) if env["max_data_class"] is not NULL: if requested_data_class > env["max_data_class"]: raise EnvelopeIncompleteError( f"requested data class {requested_data_class} exceeds " f"effective ceiling {env['max_data_class']}" ) if env["max_calls_per_min"] is not NULL: if requested_calls_per_min > env["max_calls_per_min"]: raise EnvelopeIncompleteError( f"requested rate {requested_calls_per_min}/min exceeds " f"effective ceiling {env['max_calls_per_min']}/min" ) return env ```