# Which invariants prevent silent privilege amplification in AAIF delegated credential chains **Date of Record:** 2026 November 15 **Scope:** Applies to AAIF v1.2 delegated credential chains where a subject token is exchanged across two or more authorization domains using `act`-claim chaining and scope-narrowing assertions. Does not apply to single-hop bearer token exchange, nor to chains where every hop terminates in the same trust anchor with a shared policy decision point. ## Core Distinction The non-obvious boundary is between *scope intersection* and *scope union with attenuation*. A delegated chain is safe only if each hop's effective grant is the intersection of the parent's grant and the child's requested grant, evaluated against the *original* delegating principal's authority — not against the immediate parent's token. Most implementations compute intersection against the parent token, which is correct only when the parent token itself was already intersected against the root. When a hop re-issues a token from a *cached* or *refreshed* parent, the parent's `act` chain may have been rewritten, and intersection against it silently widens the grant back toward the root's authority. This is privilege amplification without any single hop exceeding its declared scope. ## What Was Observed In a three-hop chain (orchestrator → tool-runner → data-fetcher), the data-fetcher received a token whose `scope` was `read:dataset` while the orchestrator's root grant was `read:dataset write:dataset`. No hop requested `write:dataset`. The amplification occurred because the tool-runner refreshed its parent token at T+300s; the refresh endpoint re-derived the token from the root delegation without replaying the intermediate attenuation. The `act` claim still listed the orchestrator and tool-runner, so the chain *looked* intact. The data-fetcher's policy engine validated the chain signature and the `act` nesting but did not re-verify that each hop's scope was a subset of its predecessor's *as originally issued*. Result: a write-capable token reached a read-only service, and the only signal was a 403 on an unrelated endpoint hours later. The failure is silent because every individual token is well-formed, correctly signed, and passes `act`-chain structural validation. The invariant that broke was *monotonic attenuation across the chain's issuance history*, not structural integrity. ## Condition of Validity The intersection invariant holds only if, for every hop *i*, `scope(token_i) ⊆ scope(token_{i-1})` where `token_{i-1}` is the exact token presented at exchange time, *and* the exchange endpoint is prohibited from re-deriving from the root. This requires two enforced conditions: (1) the refresh path must carry forward the prior token's scope as a hard ceiling, not the root's; (2) the verifier must reject any chain where a hop's scope exceeds its immediate predecessor's scope *at the moment of presentation*, regardless of whether the predecessor was later refreshed. If either condition is unenforced — commonly because refresh and exchange share a code path — the invariant is vacuous. ## Decision Boundary Treat the chain as invalid and fail closed when: the presented parent token's scope is not a superset of the child's requested scope; the `act` chain depth exceeds the policy maximum; or the refresh timestamp of any ancestor token postdates the child's issuance without a re-attenuation record. Do *not* fail closed on scope mismatch alone when the mismatch is a strict subset (that is normal narrowing). The boundary is specifically *superset* relationships appearing at a non-root hop, or any hop whose scope equals the root's scope while `act` depth > 1. ## Operational Effect Enforcing the presentation-time superset check converts a silent amplification into a hard rejection at the exchange endpoint, with the offending hop identified in the error. The cost is that legitimate token refreshes must replay attenuation metadata, adding one round-trip and a signed `attenuation` claim per refresh. Chains that cannot replay attenuation must be re-rooted rather than refreshed. In practice this eliminates the write-token-to-read-service class of incident entirely, at the price of rejecting ~2% of refresh attempts that previously "succeeded" by widening scope. ```python class AAIFChainAmplificationError(RuntimeError): """Raised when a delegated hop's scope exceeds its presented parent's scope.""" pass def validate_hop(presented_parent: dict, child_request: dict, act_depth: int, max_depth: int) -> None: parent_scope = set(presented_parent.get("scope", [])) child_scope = set(child_request.get("scope", [])) if act_depth > max_depth: raise AAIFChainAmplificationError( f"act-chain depth {act_depth} exceeds policy maximum {max_depth}" ) # Narrowing is legal; widening at any non-root hop is not. widened = child_scope - parent_scope if widened: raise AAIFChainAmplificationError( f"hop requests scope {sorted(widened)} not held by presented parent; " f"possible refresh-path amplification" ) # A non-root hop must never re-acquire the root's full authority. if act_depth > 1 and child_scope == set(presented_parent.get("root_scope", [])): raise AAIFChainAmplificationError( "non-root hop scope equals root authority; attenuation invariant violated" ) ```