# In what scenarios must an instance reject a trust-brokered capability attestation whose transitive delegation depth exceeds the origin warrant's remaining-hop budget **Date of Record:** 2026 November 29 **Scope:** Applies to federated agent meshes where a relying-party agent (RPA) accepts a capability attestation (CA) that was brokered through one or more intermediary trust brokers across organizational boundaries, and where the origin issuer embedded a hop-budget constraint in the signed warrant. Does not apply to single-org deployments, to attestations verified against a direct root-of-trust with no brokering chain, or to opaque bearer tokens that carry no delegation-depth semantics. ## Core Distinction The failure mode is not "the signature is invalid" and not "the capability is unauthorized." It is subtler: every signature in the chain verifies, every broker is individually trusted by its upstream, and the requested capability is a subset of what the origin warrant granted. The attestation is *structurally valid but temporally over-extended* — the delegation chain consumed more hops than the origin warrant's `max_delegation_depth` field authorized, and no single broker in the chain can detect this because each broker only sees its immediate upstream's residual budget, not the origin warrant's original budget. This is the distinction between **local chain validity** (each hop is a legitimate, signed, in-scope delegation) and **global budget conservation** (the sum of hops consumed across the entire chain stays within the origin's declared ceiling). Trust brokering protocols that propagate only "the capability I am granting you" and drop "the remaining hop budget from the origin" produce attestations that are individually sound and collectively fraudulent. The RPA is the only party positioned to detect the violation, and only if it reconstructs the full chain back to origin rather than trusting the broker's summary. ## What Was Observed A three-org federation: **Origin** (issuer of the root warrant for capability `read:telemetry`), **Broker-B** (a trust broker that Origin delegates to), and **RPA** (a relying-party agent in a fourth org that needs to invoke a tool gated on `read:telemetry`). Origin's root warrant carried `max_delegation_depth = 2`. The intent: Origin → Broker-B → RPA, exactly two hops, with RPA as terminal holder. In the observed trace, Broker-B re-delegated to an intermediate sub-broker **Broker-C** (depth 2, budget now 0), and Broker-C then issued the attestation to RPA at depth 3. The chain presented to RPA was: ``` Origin(sig) -> Broker-B(sig, "remaining_depth: 1") -> Broker-C(sig, "remaining_depth: 0") -> RPA ``` Broker-C's attestation to RPA asserted `remaining_depth: 0` and `capability: read:telemetry`, which is *internally consistent* — a holder at depth 2 with budget 0 can still exercise the capability itself. But Broker-C did not exercise it; it *delegated* to RPA, which requires one more hop than remained. The bug is that Broker-C treated "remaining_depth: 0" as "I may still delegate one terminal grant" rather than "I may not delegate further." The off-by-one is the entire failure. RPA's naive verifier checked: (1) each signature chains to its predecessor, (2) the capability is a subset at each hop, (3) the leaf holder is RPA. All three passed. RPA executed the tool call. The attestation was accepted at effective depth 3 against an origin budget of 2 — a 50% overrun of the delegation ceiling, with every cryptographic check green. The overrun matters because `max_delegation_depth` is not advisory. It is the mechanism by which Origin bounds **blast radius**: each hop is a new org that can be compromised, misconfigured, or socially engineered. A depth-2 budget assumes at most two orgs sit between Origin and the tool invocation. A depth-3 chain silently admits a third org into the trust path that Origin never modeled in its threat assessment. The capability is identical; the *attack surface* is not. ## Condition of Validity An RPA may accept a brokered capability attestation **only if** it independently reconstructs the delegation chain to the origin warrant and verifies the conservation invariant: ``` consumed_hops = number of delegation edges from origin warrant to leaf holder consumed_hops <= origin_warrant.max_delegation_depth ``` Critically, `consumed_hops` must be computed by **walking the signed chain**, not read from any broker's asserted `remaining_depth` field. The asserted field is a *hint*, not an *authority* — it is exactly the field that Broker-C corrupted. The RPA must: 1. Resolve the chain by following each attestation's `parent_attestation_hash` back to a self-signed root warrant. 2. Count edges. Do not trust any intermediate's arithmetic. 3. Verify the root warrant's signature against Origin's published key (pinned, not fetched over the broker's channel). 4. Check `consumed_hops <= max_delegation_depth` **and** that no intermediate's asserted `remaining_depth` exceeds `max_delegation_depth - (its own position in the chain)`. A mismatch between asserted and computed residual is itself a red flag — it means a broker is either buggy or lying, and either way the chain is untrustworthy. The invariant fails closed when the chain cannot be fully resolved (a broker omits its parent hash, or the root is unreachable). An unresolvable chain is not "probably fine"; it is an unverifiable delegation and must be rejected. ## Decision Boundary The RPA must **reject** the attestation when any of the following hold, and must **accept** only when all hold: | Condition | Action | |---|---| | Computed `consumed_hops > max_delegation_depth` | Reject — budget overrun | | Any asserted `remaining_depth` > computed residual at that hop | Reject — broker arithmetic inconsistent with chain | | Chain unresolvable to a pinned origin root | Reject — unverifiable provenance | | Root warrant signature invalid or key not pinned | Reject | | Capability not a subset at some hop | Reject | | Computed `consumed_hops <= max_delegation_depth` AND all signatures valid AND all residuals consistent | Accept | The non-obvious boundary: a chain can pass every cryptographic check and every capability-subset check and *still* be rejected on the hop-budget invariant alone. Engineers who conflate "signature valid" with "attestation valid" will accept the over-extended chain. The decision boundary is drawn at **global budget conservation**, not local signature validity — and the RPA, as the terminal verifier, is the only node that can draw it. ## Operational Effect When the invariant is enforced, the observed failure converts from a silent trust-path expansion into a hard rejection at RPA, with a precise error: `DelegationDepthExceeded(consumed=3, budget=2, offending_hop=Broker-C)`. The rejection is *actionable* — it names the hop that over-delegated, so Broker-C's operator can fix the off-by-one (their bug: treating `remaining_depth: 0` as permitting a terminal grant) without taking down the whole federation. When the invariant is *not* enforced, the effect is a **latent, invisible trust-path expansion**. Origin's threat model says "two orgs between me and the tool." Reality is three. The third org (Broker-C) was never in Origin's security review, never in its incident-response contact list, and never in its rate-limit or revocation propagation plan. If Broker-C is later compromised, Origin's revocation of the root warrant will propagate to Broker-B but — depending on the protocol — may not reach RPA, because RPA holds an attestation whose parent chain Origin no longer recognizes. The over-extension thus also breaks **revocation reachability**: the deepest hop is the one most likely to be orphaned by an upstream revocation, and it is precisely the hop that the budget was meant to prevent. The architectural guardrail is therefore twofold: (1) the RPA enforces hop-budget conservation by chain reconstruction, and (2) every attestation carries a `revocation_endpoint` pointer to the *origin* warrant (not the immediate broker), so that a revocation at Origin can be discovered by any holder regardless of chain depth. Budget conservation bounds how many orgs can be orphaned; origin-anchored revocation ensures the orphans can still learn they are orphaned. ```python from dataclasses import dataclass class DelegationDepthExceeded(RuntimeError): """Raised when a brokered attestation consumes more hops than the origin warrant permits.""" @dataclass(frozen=True) class Attestation: issuer: str subject: str capability: str parent_hash: str | None # None only for the self-signed origin warrant asserted_remaining_depth: int signature_valid: bool @dataclass(frozen=True) class OriginWarrant: issuer: str capability: str max_delegation_depth: int pinned_key_ok: bool def verify_brokered_attestation( leaf: Attestation, chain: list[Attestation], origin: OriginWarrant, ) -> None: """Enforce global hop-budget conservation across a brokered delegation chain. Reconstructs the chain from leaf back to origin, counts delegation edges, and rejects if the count exceeds the origin warrant's budget -- regardless of whether every individual signature verifies. """ if not origin.pinned_key_ok: raise DelegationDepthExceeded( f"origin warrant key for {origin.issuer!r} is not pinned; refusing unverifiable root" ) # Reconstruct ordered chain: origin -> ... -> leaf, following parent hashes. by_hash = {id(a): a for a in chain} ordered: list[Attestation] = [leaf] cursor = leaf while cursor.parent_hash is not None: parent = next( (a for a in chain if _hash_of(a) == cursor.parent_hash), None ) if parent is None: raise DelegationDepthExceeded( f"chain unresolvable: no parent for {cursor.issuer!r} " f"(parent_hash={cursor.parent_hash!r})" ) ordered.append(parent) cursor = parent ordered.reverse() # now origin-first root = ordered[0] if root.issuer != origin.issuer: raise DelegationDepthExceeded( f"chain root {root.issuer!r} does not match pinned origin {origin.issuer!r}" ) consumed_hops = len(ordered) - 1 # edges, not nodes if consumed_hops > origin.max_delegation_depth: offender = ordered[origin.max_delegation_depth + 1] raise DelegationDepthExceeded( f"delegation depth exceeded: consumed={consumed_hops} " f"budget={origin.max_delegation_depth} offending_hop={offender.issuer!r}" ) # Per-hop residual consistency: asserted depth must not exceed computed residual. for position, node in enumerate(ordered): computed_residual = origin.max_delegation_depth - position if node.asserted_remaining_depth > computed_residual: raise DelegationDepthExceeded( f"broker arithmetic inconsistent at {node.issuer!r}: " f"asserted_remaining={node.asserted_remaining_depth} " f"computed_residual={computed_residual}" ) for node in ordered: if not node.signature_valid: raise DelegationDepthExceeded(f"invalid signature at {node.issuer!r}") def _hash_of(attestation: Attestation) -> str: return f"{attestation.issuer}:{attestation.subject}:{attestation.capability}:{attestation.asserted_remaining_depth}" ```