# In what scenarios must an instance reject a delegated capability token whose delegation chain exceeds the issuer's trust horizon, even when every individual signature verifies **Date of Record:** 2026 November 30 **Scope:** Applies to cross-organization agent federation where a capability token (e.g., a macaroon, biscuit, or signed JWT-with-attenuation) is delegated from an originating principal through one or more intermediate agents to a downstream executing agent. Does not apply to single-org intra-tenant token issuance, nor to opaque bearer tokens with no delegation chain, nor to cases where the executing agent is also the originating principal. ## Core Distinction A delegated capability token carries two independent properties: **provenance** (the cryptographic chain of who signed what, each link verifiable against the prior link's key) and **authorization horizon** (the maximum delegation depth and the maximum wall-clock validity the *originating* issuer is willing to stand behind, regardless of what intermediates append). Signature verification only proves provenance. It says nothing about whether the chain has stayed inside the issuer's horizon. The failure mode is not "a forged signature." It is a **horizon overrun**: a chain where every signature is cryptographically valid, every attenuation is monotonic (no privilege escalation), and yet the terminal token asserts a capability the origin issuer never intended to survive that many hops or that much elapsed delegation time. The origin's trust horizon is a *policy* bound expressed as metadata (max depth, max cumulative TTL, allowed intermediate orgs), and it is structurally invisible to per-link signature checks. An instance that treats "all signatures verify" as "token is acceptable" will honor capabilities the origin explicitly meant to expire at hop 2 or after 15 minutes. ## What Was Observed During a federation between Org A (origin, issues root capability `read:dataset/X` with `max_depth=2`, `max_cumulative_ttl=900s`, and an `allowed_intermediates` set) and Org C (executing agent), the following chain materialized: 1. Org A agent `a-root` mints root token T0: depth 0, TTL 900s, signed by A's federation key. 2. Org A delegates to Org B agent `b-mid` → T1: depth 1, TTL 600s remaining, signed by `a-root`. 3. Org B agent `b-mid` re-delegates to Org B agent `b-mid-2` (an internal sub-agent) → T2: depth 2, TTL 300s, signed by `b-mid`. This is at the horizon edge. 4. Org B agent `b-mid-2` delegates to Org C agent `c-exec` → T3: depth 3, TTL 120s, signed by `b-mid-2`. Every link verified. Attenuation was monotonic (TTL strictly decreased, scope stayed `read:dataset/X`). Org C's verifier walked the chain, confirmed each signature against the prior link's public key, confirmed the root was signed by a key in its trusted-issuer registry, and **accepted T3**. The executing agent then read `dataset/X` for 120 seconds. The originating policy in Org A was `max_depth=2`. T3 is depth 3. Org A's intent was that no capability it minted could be exercised more than two delegation hops from origin. The overrun was silent because: - Depth is a *chain-length* property computed by counting links, not a property any single signature attests to at verification time unless the verifier recomputes it against the root's declared bound. - Org C's verifier had cached the root's public key and issuer identity but **did not parse the root's horizon metadata** (`max_depth`, `max_cumulative_ttl`, `allowed_intermediates`) — it treated the root as an opaque trust anchor. - Org B's sub-delegation to its own internal agent (`b-mid` → `b-mid-2`) was invisible to Org A and consumed a hop that Org A's policy did not anticipate. The origin counted "hops to external orgs"; the chain counted "hops between signing keys." These are different quantities. A second observation: on a retry, the same chain was presented with T3's TTL refreshed at hop 3 (a re-mint rather than a re-sign), producing a chain whose cumulative elapsed delegation time exceeded 900s while each individual link's remaining TTL looked compliant. Cumulative TTL is a *sum along the chain of the time each link was live*, not the terminal token's remaining TTL. ## Condition of Validity The invariant that must hold for acceptance is: > A terminal delegated token is acceptable iff (a) every link's signature verifies against the prior link's key, (b) every attenuation is monotonic (scope subset, TTL non-increasing, depth non-decreasing), **and** (c) the recomputed chain metrics — `chain_depth`, `cumulative_live_ttl`, and the set of intermediate issuer orgs — all fall within the bounds declared in the *root* token's horizon metadata, as interpreted under the origin's federation policy. Condition (c) is the one that fails silently. It is only checkable if the verifier (1) fetches and parses the root's horizon metadata rather than treating the root as opaque, (2) recomputes depth by counting actual signing links (not by trusting a `depth` field an intermediate wrote), (3) recomputes cumulative live TTL from per-link issuance timestamps rather than reading the terminal token's TTL, and (4) checks every intermediate issuer identity against the root's `allowed_intermediates` set. If any of these four are omitted, the token is being validated on provenance alone and the horizon is unenforced. The condition is *invalid* (i.e., you should not attempt horizon enforcement this way) when the root token carries no horizon metadata — in that case the origin has opted into unbounded delegation and the verifier has nothing to bound against; the correct action is to reject at issuance-side policy, not at verification. ## Decision Boundary The instance must reject — raise, not warn, not log-and-continue — when any of the following hold, even though all signatures verify: - `recomputed_depth > root.max_depth` - `recomputed_cumulative_live_ttl > root.max_cumulative_ttl` - any intermediate issuer org ∉ `root.allowed_intermediates` - the root token's horizon metadata is absent while the federation policy requires bounded delegation (fail-closed) - an intermediate link's claimed `depth` field disagrees with the recomputed count (indicates a tampered or buggy intermediate; do not trust either value, reject) The instance must *not* reject merely because depth is at the boundary (`== max_depth`) — the horizon is inclusive of its bound. It must *not* attempt to "repair" the chain by truncating to the last in-horizon link and proceeding; truncation changes the signing principal and the capability's provenance, which is a new authorization decision the verifier is not entitled to make. The boundary is sharp: `depth == max_depth` accept; `depth == max_depth + 1` reject. There is no grace hop. A verifier that rounds, or that treats depth as advisory, converts a policy bound into a suggestion. ## Operational Effect Enforcing the horizon at verification time moves the failure from *silent over-privilege* to *loud handoff failure*. The downstream agent's tool call to `read:dataset/X` fails with a typed error, the orchestrator must re-request a fresh root token from Org A (which will re-evaluate whether to grant depth), and the audit log records the overrun with the exact chain metrics. The cost is a retry and a cross-org round trip. The alternative — accepting T3 — is an undetected policy violation that persists in access logs as a legitimate read, and which no downstream control will ever flag because every signature was valid. The second-order effect: once verification recomputes chain metrics, intermediates can no longer hide hop consumption by re-signing internally. Org B's `b-mid → b-mid-2` hop becomes visible as depth 2, and Org B must budget its internal delegations against the origin's `max_depth` or request a deeper root. This forces delegation-depth budgeting to become an explicit, negotiated quantity in the federation handshake rather than an emergent property of how many sub-agents an intermediate happens to spawn. ```python import time from dataclasses import dataclass, field class TrustHorizonViolation(RuntimeError): """Raised when a delegated token's chain exceeds the root issuer's horizon.""" pass @dataclass class Link: issuer_org: str issued_at: float # epoch seconds expires_at: float scope: frozenset claimed_depth: int signature_valid: bool # result of per-link crypto check @dataclass class RootHorizon: max_depth: int max_cumulative_live_ttl: float allowed_intermediates: frozenset present: bool = True @dataclass class Chain: root_horizon: RootHorizon links: list = field(default_factory=list) # index 0 is the root token def verify_delegated_chain(chain: Chain, now: float | None = None) -> None: now = time.time() if now is None else now if not chain.root_horizon.present: # Fail closed: federation policy requires bounded delegation. raise TrustHorizonViolation( "root token carries no horizon metadata; refusing unbounded delegation" ) # (a) every link's signature must verify for i, link in enumerate(chain.links): if not link.signature_valid: raise TrustHorizonViolation(f"signature invalid at link {i}") # (b) monotonic attenuation + (c) recomputed chain metrics recomputed_depth = 0 cumulative_live_ttl = 0.0 prev_scope = None prev_expires = None for i, link in enumerate(chain.links): if i > 0: recomputed_depth += 1 if link.claimed_depth != recomputed_depth: raise TrustHorizonViolation( f"link {i} claims depth {link.claimed_depth} " f"but recomputed depth is {recomputed_depth}" ) if prev_scope is not None and not link.scope <= prev_scope: raise TrustHorizonViolation(f"scope escalation at link {i}") if prev_expires is not None and link.expires_at > prev_expires: raise TrustHorizonViolation(f"TTL extension at link {i}") if link.issuer_org not in chain.root_horizon.allowed_intermediates: raise TrustHorizonViolation( f"intermediate org {link.issuer_org!r} not in allowed set" ) # cumulative live time this link was actually alive cumulative_live_ttl += max(0.0, min(link.expires_at, now) - link.issued_at) prev_scope = link.scope prev_expires = link.expires_at if recomputed_depth > chain.root_horizon.max_depth: raise TrustHorizonViolation( f"chain depth {recomputed_depth} exceeds max_depth " f"{chain.root_horizon.max_depth}" ) if cumulative_live_ttl > chain.root_horizon.max_cumulative_live_ttl: raise TrustHorizonViolation( f"cumulative live TTL {cumulative_live_ttl:.0f}s exceeds " f"max {chain.root_horizon.max_cumulative_live_ttl:.0f}s" ) ```