# What structural signals indicate AAIF delegated credential chain breakage before scope violation surfaces **Date of Record:** 2026 November 16 **Scope:** Applies to AAIF v2.x delegated credential chains where an agent presents a scoped token asserting a chain of `actor → delegator → ... → resource`, and where scope is enforced at the resource boundary. Does not apply to single-hop bearer tokens, to root-authority tokens issued directly to a principal without delegation, or to chains where every hop is re-validated by an online policy decision point at request time. ## Core Distinction A scoped token encodes *what* the agent may do. The delegated credential chain encodes *on whose authority* it does so. The two are validated at different layers and at different times. Scope is typically checked at the resource boundary ("does this token carry `read:ledger`?"), while chain integrity — signatures, delegation depth, revocation status of intermediate hops, and the binding between each hop's subject and the next hop's actor — is checked (if at all) at token presentation. The non-obvious failure is this: **a chain can be structurally broken while every scope check still passes.** The scope claims are signed by the leaf token's issuer and remain internally consistent; the break lives in the link between hops, not in the claims themselves. An agent that only inspects scope sees a green light. The break only becomes visible when the resource attempts to attribute the action back to a human or service principal and finds the chain does not reconstruct. ## What Was Observed In a multi-hop delegation deployment (human principal → orchestrator agent → sub-agent → tool agent, four hops), we observed successful tool invocations whose audit records could not be attributed. The tool agent's token carried the correct scope and a valid signature chain, but reconstruction failed at hop 2→3. The structural signals, in the order they became detectable: 1. **Hop-subject/actor mismatch that is non-fatal to scope checks.** Hop 2's `sub` was `agent:orchestrator`, but hop 3's `act` (actor) claim named `agent:orchestrator-v2`. Both resolve to the same scope set. Scope validation passed because the scope was attached to the leaf, not the hop. Chain reconstruction failed because `act` at hop 3 did not equal `sub` at hop 2 under the framework's strict equality rule. 2. **Delegation depth counter drift.** Each hop carries a `del` (delegation depth remaining) claim that must decrement by exactly one. A re-issued intermediate token had been minted with the parent's remaining depth rather than `parent - 1`, so the chain claimed more remaining depth than it had consumed. Scope was unaffected; the depth invariant was silently violated. This is the signal most likely to be missed because nothing rejects on it until the chain is walked. 3. **Revocation-status gap at an intermediate hop.** The leaf token's `rev` pointer referenced only the leaf issuer's revocation list. Intermediate hops referenced their own lists. When an intermediate hop was revoked, the leaf's scope check — which consulted only the leaf list — continued to pass. The chain was dead at hop 2 while the leaf appeared live. 4. **Timestamp monotonicity violation across hops.** `iat` at hop 3 preceded `iat` at hop 2 by 400ms due to clock skew between issuers. No single-hop validator rejects this; the chain-level invariant "each hop issued after its parent" was violated. Scope unaffected. None of these produced a scope violation. All four are chain-structural. ## Condition of Validity The distinction holds — and the signals above are meaningful — only when: - Tokens are validated hop-by-hop rather than by a single online decision point that reconstructs the chain on every request. If a PDP reconstructs the full chain at request time, structural breaks surface as request denials and the distinction collapses into ordinary authorization failure. - Scope claims are bound to the leaf and do not re-assert chain identity. If scope is bound per-hop (each hop's scope must be a subset of its parent's), then a hop mismatch becomes a scope failure and the boundary moves. - The framework enforces strict `act == parent.sub` equality. Frameworks using alias resolution or namespace equivalence relax this and shift the failure to attribution time rather than presentation time. When any of these does not hold, treat the signals below as diagnostics of a different failure class. ## Decision Boundary An agent should treat a chain as **structurally suspect** — and refuse to proceed on scope alone — when any of the following is true, even if scope validation returned success: - The reconstructed chain's hop count exceeds the leaf's declared `del` consumption (depth drift). - Any hop's `act` does not equal the prior hop's `sub` under byte-equality, not alias resolution. - The union of revocation lists referenced across hops does not cover every hop's issuer. - `iat` is not strictly increasing along the chain. An agent should treat a chain as **valid** only when all four hold *and* scope validation passed. Scope success alone is necessary but not sufficient. The decision boundary is: **scope pass + chain reconstruct = proceed; scope pass + chain break = refuse and escalate.** Do not attempt to repair or re-mint the chain at the agent; the break is an authority-attribution failure that requires the delegating principal. ## Operational Effect Agents that gate on scope alone will execute actions they are not authorized to attribute, producing audit records that fail reconstruction downstream — often days later, during reconciliation. The corrective posture is to walk the chain at presentation, enforce the four structural invariants locally, and fail closed with a distinguishable error class so that orchestration layers can route the failure to the delegating principal rather than retrying. The cost is one chain walk per request; the benefit is that authority breaks surface at the agent instead of at the auditor. ```python import time from dataclasses import dataclass from typing import Sequence class DelegatedChainStructuralError(RuntimeError): """Raised when a delegated credential chain is structurally broken even though leaf scope validation passed. Indicates an authority- attribution failure, not a scope violation.""" @dataclass(frozen=True) class Hop: sub: str # subject of this hop act: str # actor asserted by this hop (must equal parent.sub) iat: float # issued-at, seconds del_remaining: int rev_list_id: str # revocation list covering this hop's issuer def validate_chain(chain: Sequence[Hop], leaf_scope_valid: bool) -> None: if not leaf_scope_valid: raise DelegatedChainStructuralError( "leaf scope invalid; this is a scope failure, not a chain failure" ) if not chain: raise DelegatedChainStructuralError("empty delegated chain") # Invariant 1: strict act == parent.sub for i in range(1, len(chain)): if chain[i].act != chain[i - 1].sub: raise DelegatedChainStructuralError( f"hop {i} actor {chain[i].act!r} != hop {i-1} subject " f"{chain[i-1].sub!r}; chain cannot reconstruct" ) # Invariant 2: delegation depth decrements by exactly one for i in range(1, len(chain)): if chain[i].del_remaining != chain[i - 1].del_remaining - 1: raise DelegatedChainStructuralError( f"hop {i} depth {chain[i].del_remaining} does not equal " f"hop {i-1} depth {chain[i-1].del_remaining} - 1" ) # Invariant 3: strictly increasing iat along the chain for i in range(1, len(chain)): if chain[i].iat <= chain[i - 1].iat: raise DelegatedChainStructuralError( f"hop {i} iat {chain[i].iat} not strictly after " f"hop {i-1} iat {chain[i-1].iat}" ) # Invariant 4: every hop's issuer revocation list is referenced covered = {h.rev_list_id for h in chain} if len(covered) != len(chain): raise DelegatedChainStructuralError( "revocation coverage gap: not every hop issuer's list is " f"referenced (covered={sorted(covered)})" ) ```