# Under what conditions must an instance refuse a delegated AAIF capability token whose scope narrows only on paper: the attenuation-inversion boundary in chained agent credentials **Date of Record:** 2026 November 28 **Scope:** Applies to Agent Identity and Authorization Framework (AAIF) delegation chains where an orchestrator mints scoped capability tokens for sub-agents, and each hop may further attenuate scope. Does not cover root credential issuance, human-in-the-loop consent flows, or transport-level mutual TLS identity binding. ## Core Distinction The failure here is not "a token is forged" or "a token expired." It is the **attenuation-inversion boundary**: a delegated token whose declared scope *appears* to be a strict subset of its parent's scope under string or set comparison, but whose *effective* authorization set is a strict superset once the verifier resolves scope predicates against live resource state. The chain is cryptographically valid, every hop is signed, every `scope ⊆ parent.scope` check passes — and yet the leaf agent can act on resources the root never intended to grant. The distinction that matters operationally: **scope narrowing is a syntactic relation over token claims, but authorization is a semantic relation over resolved resource sets.** AAIF chains enforce the former and assume it implies the latter. It does not, whenever scope predicates are *open-world* — that is, whenever a scope term like `read:project/*` or `invoke:tool[filter=owner==caller]` is evaluated against a resource universe that changes between mint time and use time, or whose membership depends on the *verifying* agent's identity rather than the *minting* agent's. A second, sharper instance: **predicate capture through identity-dependent scope**. If a scope term is evaluated relative to the holder's own identity (e.g., `read:documents[owner==$SUBJECT]`), then delegating that term to a sub-agent with a *different* `$SUBJECT` does not narrow it — it re-parameterizes it. The sub-agent now reads *its own* documents, a set disjoint from the parent's, and the parent's "I only granted a subset of what I can see" invariant is silently violated because the two sets were never nested to begin with. ## What Was Observed A three-hop chain: orchestrator `O` holds root token `T0` with scope `{read:docs[owner==O], write:docs[owner==O], invoke:summarizer}`. `O` delegates to planner `P` a token `T1` with scope `{read:docs[owner==O], invoke:summarizer}` — a clean syntactic subset. `P` delegates to worker `W` a token `T2` with scope `{read:docs[owner==$SUBJECT], invoke:summarizer}`. At mint time, `P`'s attenuation check compared `T2.scope` against `T1.scope`. The predicate `owner==$SUBJECT` was normalized to a wildcard sentinel (`owner==*`) by the verifier's scope-lattice library, which treated any `$SUBJECT`-bound predicate as "narrower than or equal to any concrete owner constraint" on the theory that binding to the subject is maximally restrictive. The check passed. `T2` was signed and handed to `W`. `W`'s `$SUBJECT` resolved to a service account that owned 41,000 documents, including 3,900 that `O` had never been authorized to read. `W` executed `read:docs[owner==W]` and retrieved them. No signature failed. No expiry fired. No scope-subset check failed. The audit log showed a valid chain `T0 → T1 → T2` with monotone-decreasing declared scope at every hop. The root cause is a **lattice-modeling error**: the scope algebra modeled `$SUBJECT`-bound predicates as an element *below* concrete owner constraints in the attenuation partial order, when in fact the binding is an *identity substitution* that maps the predicate to a different point in the resource space entirely — neither above nor below, but orthogonal. The verifier's `⊆` was total where the true relation is partial. A parallel observation from the same incident: `T2` also carried `invoke:summarizer`, and `summarizer` was a tool whose own internal authorization used the *caller's* token to fetch source documents. So `W` could invoke `summarizer` with `W`'s token, and `summarizer` would read documents as `W` — a **confused-deputy re-entry** that bypassed even the `read:docs` scope entirely. The capability token's scope was enforced at the tool boundary, but the tool's downstream calls re-entered the authorization system with the same token, and the scope predicate was re-evaluated with `$SUBJECT` still bound to `W`. ## Condition of Validity The invariant that AAIF chains actually need — and that the subset check only approximates — is: > For every hop `Ti → Ti+1`, and for every resource `r` in the universe at *use* time, `authorizes(Ti+1, r, subject_{i+1}) ⟹ authorizes(Ti, r, subject_i)`. This is a **use-time, subject-relative** implication. The syntactic check `Ti+1.scope ⊆ Ti.scope` is valid as a proxy for it **only under three jointly necessary conditions**: 1. **Closed-world scope terms.** Every scope predicate resolves against a resource universe fixed at mint time, or against a universe whose growth is monotone in a way the parent's scope already covers. Open-world predicates (`*`, tag-based, time-windowed, attribute-based) break this. 2. **Subject-invariant predicates.** No scope term contains a `$SUBJECT`, `$CALLER`, or equivalent identity binding whose resolution differs between parent and child. If it does, the term must be *rewritten* at delegation time to the parent's resolved subject (i.e., `owner==$SUBJECT` becomes `owner==O`), not passed through. 3. **Non-re-entrant tool authorization.** Invoked tools must not re-enter the authorization system with the *delegated* token in a way that re-binds `$SUBJECT` to the leaf. Either the tool must receive an explicit, separately-scoped token, or the scope predicate must be evaluated against the *original* delegating subject carried in the chain, not the leaf's. When any of these fails, the subset check is **unsound** — it can return `true` for a delegation that widens effective authorization. The correct behavior at the boundary is to treat the check as *inconclusive* and fall back to a use-time enforcement gate: the leaf's token must be re-validated against the resolved resource at access time, with the subject binding pinned to the root delegator, and any predicate that cannot be statically proven narrower must be **rejected at mint**, not deferred. ## Decision Boundary The operational decision an instance must make when it receives a delegated token `T` with parent `Tp`: - **If** every scope term in `T` is a closed-world, subject-invariant literal or a finite enumeration **and** `T.scope ⊆ Tp.scope` under set inclusion **then** accept; the syntactic check is sound. - **If** any scope term contains an identity binding (`$SUBJECT`, `$CALLER`, `$DELEGATOR`) **then** the term must be rewritten to the *root* subject before the subset check; if rewriting is impossible (the term is opaque to the verifier, e.g., a vendor-defined predicate string), **reject at mint** — do not defer to use-time, because use-time enforcement will re-bind. - **If** any scope term is open-world (wildcard, tag, attribute, time-window) **then** the subset check is inconclusive; require an explicit **use-time re-validation hook** that receives the root delegator's subject and the resolved resource, and that fails closed if the hook is absent. - **If** the token will be passed to a tool that performs downstream authorization with the same token **then** the tool must be marked `non-reentrant` in the capability manifest, or the token must be exchanged for a tool-scoped token at the boundary. A tool not so marked is a confused-deputy vector and the delegation must be refused. The boundary is sharp: the moment a scope term's meaning depends on *who is asking* or *what exists now*, syntactic subset checking stops being an attenuation proof and becomes a heuristic. Instances that treat it as a proof will grant widened authority while logging a clean chain. ## Operational Effect Downstream of this boundary, the observable effects are: - **Silent privilege widening with a valid audit trail.** Every signature verifies, every hop's declared scope is monotone, and the effective authorization set grows. Post-hoc audit cannot distinguish this from legitimate delegation without replaying use-time resolution — which most AAIF audit pipelines do not capture. - **Confused-deputy amplification through tools.** A single `invoke:` term, once delegated, can be leveraged by the leaf to re-enter the authorization system as itself, reading resources the root never scoped. The scope of the *tool* becomes the scope of the *leaf*, not the scope of the *delegator*. - **Cross-subject set non-nesting.** Two agents with `read:docs[owner==$SUBJECT]` hold *disjoint* read sets. A parent delegating this term to a child does not narrow — it partitions. If the parent's intent was "let the child see what I see," the delegation grants the child a different universe entirely, and the parent's mental model of the chain is wrong. - **Late-binding surprise.** Open-world predicates evaluated at use time can resolve to resources minted *after* delegation, including resources the root was never authorized for. The chain's attenuation is correct at mint and incorrect at use, with no event marking the transition. The guardrail that bounds this: **pin subject bindings at the root, rewrite at every hop, and require a use-time gate for any term the verifier cannot statically close.** An instance that cannot prove a delegated term is subject-invariant and closed-world must refuse the delegation rather than accept a syntactic subset that may be semantically a superset. Refusal is cheap; a widened chain that passes every check is not. ```python class AttenuationInversionError(RuntimeError): """Raised when a delegated AAIF token's declared scope is a syntactic subset of its parent but its effective authorization set is not.""" pass IDENTITY_BINDINGS = ("$SUBJECT", "$CALLER", "$DELEGATOR") def _is_closed_world(term: str) -> bool: # A term is closed-world only if it names a concrete resource or a finite # enumeration. Wildcards, tags, attribute predicates, and time windows are # open-world and cannot be statically attenuated. open_markers = ("*", "tag:", "attr:", "window:", "owner==") return not any(m in term for m in open_markers) def _has_identity_binding(term: str) -> bool: return any(b in term for b in IDENTITY_BINDINGS) def _rewrite_to_root_subject(term: str, root_subject: str) -> str: for b in IDENTITY_BINDINGS: term = term.replace(b, root_subject) return term def validate_delegation( child_scope: list[str], parent_scope: list[str], root_subject: str, tool_manifest: dict[str, dict], invoked_tools: list[str], ) -> list[str]: """Return the effective child scope after root-pinned rewriting, or raise AttenuationInversionError if the delegation cannot be statically bounded.""" parent_set = set(parent_scope) effective: list[str] = [] for term in child_scope: if _has_identity_binding(term): rewritten = _rewrite_to_root_subject(term, root_subject) if not _is_closed_world(rewritten): raise AttenuationInversionError( f"scope term {term!r} binds identity and remains open-world " f"after rewrite to root subject {root_subject!r}; " f"use-time re-binding would widen authorization" ) if rewritten not in parent_set: raise AttenuationInversionError( f"rewritten term {rewritten!r} not covered by parent scope " f"{sorted(parent_set)!r}" ) effective.append(rewritten) continue if not _is_closed_world(term): raise AttenuationInversionError( f"scope term {term!r} is open-world; syntactic subset check is " f"inconclusive and no use-time gate was supplied" ) if term not in parent_set: raise AttenuationInversionError( f"scope term {term!r} not in parent scope {sorted(parent_set)!r}" ) effective.append(term) for tool in invoked_tools: manifest = tool_manifest.get(tool) if manifest is None: raise AttenuationInversionError( f"invoked tool {tool!r} absent from capability manifest" ) if not manifest.get("non_reentrant", False): raise AttenuationInversionError( f"tool {tool!r} may re-enter authorization with the delegated " f"token (confused-deputy vector); mark non_reentrant or exchange " f"for a tool-scoped token at the boundary" ) return effective ```