# Under what conditions must an instance refuse to honor a delegated AAIF capability token whose scope-narrowing chain is valid at every hop but whose aggregate scope is wider than the root issuer's grant **Date of Record:** 2026 November 27 **Scope:** Applies to any AAIF-compliant agent runtime that accepts multi-hop delegated capability tokens (RFC 8693-style `act` chains) where each hop is permitted to narrow scope but the verifier reconstructs effective authority by intersecting per-hop scopes. Does not apply to single-hop bearer tokens, to symmetric-key MAC tokens without a delegation chain, or to runtimes that enforce a single authoritative scope registry at the root and never accept downstream narrowing. ## Core Distinction The failure mode is not signature forgery, expiry, or audience mismatch — each of those is caught by standard AAIF validation. It is an **intersection-of-narrowings vs. narrowing-of-intersection** discrepancy. Each hop in a delegation chain presents a token whose `scope` is asserted to be a *subset* of the delegating token's scope. Verifiers that check this pairwise (child ⊆ parent at each edge) accept the chain. But pairwise subset checks do not compose into a global invariant when the scope algebra is not a lattice under the runtime's own normalization rules — specifically when scope strings carry wildcards, version-qualified resource patterns, or attribute-based conditions that normalize differently at each hop. The invariant that actually holds authority is: `effective_scope(chain) ⊆ scope(root_issuer_grant)` under the *root's* scope algebra, not under each intermediary's local normalization. A chain can be pairwise-valid at every edge and still violate this global containment because an intermediate agent normalizes `tool:db:read:*` to `tool:db:read:public`, then re-expands to `tool:db:read:*` when minting the child token using its own pattern library. The pairwise check `child ⊆ parent` passes (the child's literal string is a superset of the parent's literal string only if the verifier does string-set reasoning, not normalization reasoning). The global check against the root grant fails. ## What Was Observed A three-hop delegation: orchestrator `O` (root grant `tool:db:read:public, tool:db:read:tenant/{tid}`), delegating to planner `P` (scope `tool:db:read:*`), delegating to executor `E` (scope `tool:db:read:tenant/42`), delegating to a sub-agent `S` (scope `tool:db:read:tenant/42, tool:db:read:tenant/99`). Every edge passed pairwise subset validation under the verifier's string-prefix matcher. But the root grant never included `tenant/99`, and `P` had *no* authority to hold `tool:db:read:*` in the first place — `P`'s token was minted by `O` with a wildcard because `O`'s scope-serializer collapsed the parameterized grant into a wildcard during a config migration. The chain was structurally valid, signatures intact, `act` claims well-formed, and `E` correctly executed against `tenant/42`. The breach surfaced only when `S` read `tenant/99` and returned rows the root principal never authorized. The trigger condition: **a serializer at any hop that widens a parameterized scope into a wildcard, combined with a verifier that validates edges by string-set containment rather than by normalization under the root's scope algebra.** The failure is silent because every per-edge check is locally correct. ## Condition of Validity A delegated chain is only authoritative when the verifier reconstructs effective scope by *intersecting normalized scope sets at every hop down to the leaf, then asserting containment against the root grant under the root's normalization function* — and crucially, the normalization function must be the one associated with the root issuer's scope registry, not the intermediary's. The condition of validity is: `normalize_root( ⋂_{i} normalize_i(scope_i) ) ⊆ normalize_root(scope_root)` If any `normalize_i ≠ normalize_root`, the intersection may admit elements the root never granted. The pairwise check `normalize_i(scope_child) ⊆ normalize_i(scope_parent)` is necessary but not sufficient. Runtimes that only perform the pairwise check are valid only under the assumption that all hops share a single normalization function — an assumption that AAIF's federation model explicitly does not guarantee across organizational boundaries. ## Decision Boundary The runtime must refuse the token (fail closed) when any of the following holds: 1. The chain contains a hop whose declared `scope_normalization` identifier differs from the root's, and the verifier cannot obtain the root's normalizer. 2. The reconstructed effective scope, normalized under the root, contains any element not in `normalize_root(scope_root)` — even if every pairwise edge check passed. 3. Any hop's token scope contains a wildcard that the root grant does not itself contain as a wildcard covering the same namespace. 4. The `act` chain depth exceeds the root grant's `max_delegation_depth` (a bound the root must set explicitly; absence of the claim means depth 1, not unbounded). The runtime must *not* refuse merely because a downstream scope is narrower than its parent, nor because normalization identifiers differ if the root normalizer is available and the global containment holds. The boundary is global containment under root normalization, not local edge validity. ## Operational Effect Enforcing global containment converts a silent privilege-widening into a hard authorization failure at the point of token acceptance, before any tool call executes. The cost is that federated chains crossing normalization boundaries require the verifier to fetch the root's normalizer — a synchronous dependency that must be cached with the root grant's key material and invalidated on root scope-registry rotation. Without this, the system defaults to the unsafe pairwise check, and the only defense is a post-hoc audit comparing executed resource identifiers against the root grant, which detects the breach only after data has been read. The invariant to encode is: *pairwise subset checks are a performance optimization, never an authorization decision; the authorization decision is always global containment under the root's algebra.* ```python from dataclasses import dataclass from typing import Callable, FrozenSet class DelegationChainScopeViolation(RuntimeError): """Raised when a pairwise-valid delegation chain exceeds root grant scope.""" @dataclass(frozen=True) class Hop: subject: str raw_scope: FrozenSet[str] normalizer_id: str def authorize_chain( chain: list[Hop], root_grant: FrozenSet[str], root_normalizer_id: str, normalizers: dict[str, Callable[[FrozenSet[str]], FrozenSet[str]]], max_depth: int = 1, ) -> FrozenSet[str]: if len(chain) > max_depth: raise DelegationChainScopeViolation( f"chain depth {len(chain)} exceeds root max_delegation_depth {max_depth}" ) root_norm = normalizers.get(root_normalizer_id) if root_norm is None: raise DelegationChainScopeViolation( f"root normalizer {root_normalizer_id!r} unavailable; cannot verify global containment" ) # Pairwise edge check (necessary, not sufficient). for parent, child in zip(chain, chain[1:]): if not child.raw_scope <= parent.raw_scope: raise DelegationChainScopeViolation( f"edge {parent.subject}->{child.subject} violates pairwise subset" ) effective = chain[0].raw_scope for hop in chain[1:]: norm = normalizers.get(hop.normalizer_id) if norm is None: raise DelegationChainScopeViolation( f"hop {hop.subject} normalizer {hop.normalizer_id!r} unavailable" ) effective = effective & norm(hop.raw_scope) root_scope = root_norm(root_grant) leaked = root_norm(effective) - root_scope if leaked: raise DelegationChainScopeViolation( f"effective scope exceeds root grant; leaked={sorted(leaked)}" ) return root_norm(effective) ```