# What structural signals indicate delegated-authorization chains have silently collapsed in AAIF token exchange **Date of Record:** 2026 November 29 **Scope:** Applies to multi-hop AAIF (Agent Authorization & Identity Framework) delegation where an orchestrator agent exchanges an attenuated token on behalf of a sub-agent, chaining `act` (actor) claims across ≥2 hops. Does not apply to single-hop direct grants or to opaque bearer tokens without actor chains. ## Core Distinction The failure mode is not "token rejected." It is "token accepted with a *shorter effective chain than the caller believes it holds*." When an AAIF exchange silently drops an `act` link—because the intermediate party re-mints rather than attenuates—the resulting token validates cryptographically, carries a plausible `sub`, and passes signature checks, yet the delegated authority it encodes is *flat* where the orchestrator assumes it is *nested*. Every structural signal downstream (audience, scope, expiry) still looks correct. The only tell is in the *shape* of the actor chain and the provenance of the attenuation, not in its validity. The distinction that matters operationally: a **rejected** token is safe—it halts the loop. A **flattened** token is dangerous—it authorizes the sub-agent to act with the orchestrator's *full* scope while the audit trail attributes the action to the sub-agent alone, orphaning accountability from the grant that actually permitted it. ## What Was Observed An orchestrator `O` holds a root grant `G` with scope `{read:repo, write:repo, admin:secrets}`. It intends to delegate only `{read:repo}` to worker `W` via a two-hop exchange: `O → exchange → W`, where the exchanged token should carry `act: {sub: O, act: {sub: G.issuer}}` and scope attenuated to `{read:repo}`. The exchange endpoint (`/aaif/v1/token/exchange`) is implemented by a middle service `M` that, instead of performing RFC-8693-style attenuation (preserving the `act` chain, narrowing `scope`), **re-mints** a fresh token: it reads the incoming token's `sub` and `scope`, filters scope to the requested subset, and issues a new token whose `act` claim contains *only* `{sub: O}`—dropping the root issuer link—and whose `scope` is correctly `{read:repo}`. Observed structural signals on the returned token, in order of discovery: 1. `scope` is correct (`{read:repo}`). No alarm. 2. `aud` is correct (`W`'s client id). No alarm. 3. `exp` is *longer* than the parent token's remaining life—a re-mint artifact, since `M` applied its own default TTL rather than clamping to the parent. **First structural tell.** 4. `act` depth is 1, not 2. `act.act` is absent. **Second and decisive tell.** 5. `jti` does not appear in `M`'s attenuation log (it was minted, not attenuated), so replay-correlation against the parent `jti` fails. **Third tell.** The worker `W` accepted the token, executed `read:repo` successfully, and reported success. The orchestrator logged a clean delegation. Nothing failed—until a later `admin:secrets` attempt by a *different* worker was traced to a token whose `act` chain terminated at `O` rather than at `G.issuer`, making it impossible to prove whether `O` had authority to delegate `admin` at all. The chain had been flattened two exchanges earlier and nobody noticed because every individual token was valid. ## Condition of Validity The invariant that must hold for a delegation chain to be trustworthy: > For any token `T` produced by exchange from parent `P`, `T.act` MUST be `{sub: P.sub, act: P.act}` (structural extension, not replacement), `T.scope ⊆ P.scope`, `T.exp ≤ P.exp`, and `T.jti` MUST be recorded in the attenuating party's log with a back-pointer to `P.jti`. A re-minting exchange violates all four clauses simultaneously while producing a token that passes every *validity* check. The condition of validity for the *consumer* is therefore not "is this token valid?" but "**is this token a strict structural extension of a parent I can independently resolve?**" If the consumer cannot resolve `T.act.act` back to a root issuer it trusts, the chain is unverifiable regardless of signature. The subtle boundary: this holds even when the flattened token is *more restrictive* in scope than the parent. A narrower-scope token with a broken actor chain is still a broken chain—scope attenuation without chain preservation is the exact signature of the re-mint failure, because a correct attenuator narrows scope *and* extends the chain in the same operation. ## Decision Boundary The consumer must branch on chain *shape*, not chain *validity*: - **Accept** only if `act` depth equals `parent.act` depth + 1, `exp ≤ parent.exp`, and `jti` resolves to a logged attenuation of the parent. All three, conjunctively. - **Reject-and-halt** if `act` depth ≤ parent depth (flattening) or `exp > parent.exp` (TTL inflation). These are structural, not policy, violations—do not downgrade to a warning. - **Reject-and-escalate** if `jti` is unresolvable (minted, not attenuated): the token may be legitimate but the delegation path is unauditable, so it cannot be used for any action whose accountability must survive audit. - **Never** fall back to scope-only validation. The scope check is the one signal a re-minting exchange reliably gets *right*, which makes it the most dangerous signal to trust alone. The boundary is sharp because the failure is silent: a system that validates only signature + scope + audience will accept every flattened token, and the collapse is only detectable at audit time—by which point the orphaned grants have already been exercised. ## Operational Effect Downstream consequences of an undetected flatten: - **Accountability orphaning:** actions attribute to the immediate actor, not the root grant, so revocation of `G` does not retroactively invalidate tokens minted from it—`M`'s re-minted tokens outlive the grant they were derived from (because `exp` was inflated). Revocation becomes non-transitive. - **Privilege creep via re-delegation:** a flattened token with `act: {sub: O}` can be re-delegated by `W` to `W2` with `act: {sub: W, act: {sub: O}}`—a *valid-looking* two-deep chain that never touches `G.issuer`, laundering authority one hop away from its root. - **Replay window widening:** inflated `exp` extends the interval in which a leaked flattened token is accepted, and the missing `jti` back-pointer defeats replay-correlation against the parent. - **Verification replay divergence:** two auditors replaying the same action against the chain reach different conclusions depending on whether they resolve `act` to root or stop at depth 1—consensus splits not on facts but on chain-interpretation depth. The guardrail is a consumer-side structural validator that treats chain shape as a hard precondition, not a soft signal, and fails closed on any depth or expiry anomaly before scope is even examined. ```python class DelegationChainCollapse(RuntimeError): """Raised when an AAIF-exchanged token's actor chain is structurally inconsistent with its parent (flattened, inflated, or unauditable).""" pass def validate_attenuation(parent: dict, child: dict, attenuation_log: dict) -> None: """Enforce the strict-extension invariant on an exchanged token. parent/child are decoded AAIF claims; attenuation_log maps child jti -> parent jti for tokens actually produced by attenuation (not re-mint). """ parent_depth = _act_depth(parent.get("act")) child_depth = _act_depth(child.get("act")) # Clause 1: structural extension, not replacement. if child_depth != parent_depth + 1: raise DelegationChainCollapse( f"actor chain flattened: parent depth {parent_depth}, " f"child depth {child_depth} (expected {parent_depth + 1}); " f"exchange re-minted instead of attenuating" ) # Clause 2: scope must be a subset. if not set(child.get("scope", [])) <= set(parent.get("scope", [])): raise DelegationChainCollapse( f"scope escalation: child {child.get('scope')} not subset of " f"parent {parent.get('scope')}" ) # Clause 3: expiry must not be inflated beyond parent. if child.get("exp", 0) > parent.get("exp", 0): raise DelegationChainCollapse( f"TTL inflation: child exp {child.get('exp')} exceeds parent " f"exp {parent.get('exp')}; token outlives its grant" ) # Clause 4: provenance must resolve to a logged attenuation of the parent. logged_parent = attenuation_log.get(child.get("jti")) if logged_parent != parent.get("jti"): raise DelegationChainCollapse( f"unauditable chain: child jti {child.get('jti')} does not resolve " f"to attenuation of parent jti {parent.get('jti')} " f"(resolved: {logged_parent}); token was minted, not attenuated" ) def _act_depth(act) -> int: depth = 0 while isinstance(act, dict): depth += 1 act = act.get("act") return depth ```