# What structural signals indicate a broken delegation chain in AAIF agent identity (scope-width escalation at chain depth ≥ 3) **Date of Record:** 2026 November 18 **Scope:** Applies to AAIF (Agent Authentication and Identity Framework) delegated credential chains where an agent presents a chain of signed delegation tokens ending in a leaf capability grant. Does not apply to single-hop delegation, to session tokens minted directly by a root principal, or to revocation-list behavior (covered separately). ## Core Distinction A delegation chain is *structurally valid* when every link verifies: each token's issuer signature checks against the prior link's public key, the audience of link *n* equals the issuer of link *n+1*, and the expiry of each link is non-increasing down the chain. A chain is *semantically valid* only if the effective capability set at the leaf is a subset of the root principal's granted set, computed by **intersection** across all links, not by union or by trusting the leaf's declared scope. The non-obvious boundary: AAIF permits a delegating agent to *narrow* scope, and most verifiers check only that each link narrows relative to its immediate parent. This check passes while the effective leaf scope exceeds the root grant, because the root grant is not carried in the chain — it is resolved out-of-band from the principal registry. When the registry lookup is skipped (cache miss, latency budget, or a leaf token that embeds a self-asserted `root_scope` claim), the intersection is never computed against ground truth. The chain verifies cryptographically and fails semantically. The structural signal is precise: **at chain depth ≥ 3, any link whose declared scope is not a strict subset of the immediately preceding link's scope is a chain-integrity violation, regardless of signature validity.** A widening link at depth 1 is a legitimate root re-delegation; at depth ≥ 3 it is either a confused-deputy construction or a forged intermediate. ## What Was Observed In a multi-agent orchestration deployment, a planner agent (depth 1) delegated to a retrieval agent (depth 2), which delegated to a summarizer (depth 3). The summarizer's token declared `scope: {read:corpus, write:cache}`. The retrieval agent's token declared `scope: {read:corpus}`. Signature verification passed at every hop. The effective-scope check compared summarizer→retrieval (subset: fails, `write:cache` not in parent) — but the verifier's subset check was implemented as "parent scope is non-empty and leaf issuer is in parent's delegate list," which passed. The summarizer obtained `write:cache` and poisoned a shared cache entry consumed by a sibling chain. The root principal's grant was `{read:corpus}` only; `write:cache` had been introduced at depth 2 by a retrieval agent that had itself been delegated `{read:corpus, write:cache}` by a *different* planner instance whose chain had been revoked four hours earlier but whose leaf token had a 24-hour expiry. The failure was invisible to signature checks and to per-hop subset checks. It was visible as a *scope-width monotonicity violation*: the sequence of declared scope cardinalities was 1 → 2 → 2, non-monotonic at the depth-2 link. A monotonicity assertion on scope width across the chain would have caught it at verification time without any registry lookup. ## Condition of Validity The monotonicity signal is valid only when: 1. Scope is represented as a comparable set (canonicalized resource:action tuples), not as opaque strings or wildcards. Wildcard scopes (`read:*`) cannot be width-compared and must be expanded or rejected at depth ≥ 2. 2. Expiry is also checked for monotonicity — a child token with a later expiry than its parent is the temporal analogue of scope widening and indicates the same class of construction. 3. The chain is presented in full. If any intermediate token is elided (common in "compressed chain" optimizations), monotonicity cannot be evaluated and the chain must be treated as depth-1, i.e., re-validated against the registry. When scope is opaque or the chain is compressed, the signal does not apply and you must fall back to registry intersection. ## Decision Boundary - **Depth 1, widening:** legitimate. The root principal is re-delegating a broader scope to a trusted agent. No action. - **Depth ≥ 2, widening:** reject the chain. Do not attempt to repair by intersecting with the parent — the widening link itself is the evidence of a confused-deputy or forged-intermediate construction, and the parent may itself be compromised. - **Non-monotonic expiry at any depth:** reject. A child outliving its parent means the parent's revocation cannot propagate. - **Opaque/wildcard scope at depth ≥ 2:** reject unless registry intersection is performed synchronously in the same verification call. The boundary is *not* "does the leaf scope exceed the root grant" — that requires the registry and is the check everyone implements. The boundary is "is the declared scope sequence monotonic in width" — a purely local, registry-free invariant that catches the class of failure where the registry lookup is the thing that got skipped. ## Operational Effect Enforcing width-monotonicity at verification time converts a silent semantic escalation into a hard, local, deterministic rejection. It costs one set-cardinality comparison per link and requires no network call. In the observed deployment, adding the assertion reduced accepted chains by 0.7% — all of them later confirmed as either revoked-root descendants or forged intermediates — and eliminated the cache-poisoning path entirely. The residual risk is wildcard scopes, which must be expanded before the assertion is meaningful; a verifier that cannot expand a wildcard must treat it as maximum width and reject at depth ≥ 2. ```python from dataclasses import dataclass from typing import FrozenSet class DelegationChainIntegrityError(RuntimeError): """Raised when an AAIF delegation chain violates a structural invariant.""" @dataclass(frozen=True) class DelegationLink: issuer: str audience: str scope: FrozenSet[str] # canonical resource:action tuples expires_at: int # unix seconds signature_valid: bool def verify_chain(links: list[DelegationLink]) -> None: if not links: raise DelegationChainIntegrityError("empty delegation chain") for i, link in enumerate(links): if not link.signature_valid: raise DelegationChainIntegrityError(f"link {i}: bad signature") if i == 0: continue parent = links[i - 1] if parent.audience != link.issuer: raise DelegationChainIntegrityError( f"link {i}: audience/issuer mismatch " f"({parent.audience!r} != {link.issuer!r})" ) # Temporal monotonicity: a child must not outlive its parent. if link.expires_at > parent.expires_at: raise DelegationChainIntegrityError( f"link {i}: expiry {link.expires_at} exceeds parent " f"{parent.expires_at} (revocation cannot propagate)" ) # Scope-width monotonicity. At depth >= 2 a widening link is # never legitimate: it is a confused-deputy or forged-intermediate # construction. Depth-1 widening is a valid root re-delegation. if i >= 2 and not link.scope.issubset(parent.scope): widened = link.scope - parent.scope raise DelegationChainIntegrityError( f"link {i}: scope widening at depth {i} " f"(added {sorted(widened)!r}); chain rejected" ) # Wildcards cannot be width-compared; reject at depth >= 2. if i >= 2 and any(s.endswith(":*") for s in link.scope): raise DelegationChainIntegrityError( f"link {i}: wildcard scope at depth {i} cannot be " f"verified for monotonicity; expand or reject" ) ```