# Why does an instance lose authorization scope when a delegated AAIF warrant is re-signed across a three-hop chain and the middle agent's capability set is a strict subset of the originator's **Date of Record:** 2026 November 24 **Scope:** Applies to AAIF-style scoped-credential delegation where an agent mints a downscoped warrant for a peer and the peer re-delegates to a third agent. Excludes single-hop delegation, human-to-agent bootstrap, and warrants whose scope is a flat string set with no capability attenuation metadata. ## Core Distinction The failure is not "an agent lacks permission." It is that a *valid, correctly signed* warrant silently narrows below the capability the receiving agent was told it held, because attenuation is computed against the *immediate delegator's* scope rather than the *root grant's* scope, and the two diverge exactly when an intermediate agent's own capability set is a strict subset of the originator's. AAIF warrants carry three things that matter here: an `issuer`, a `subject`, a `scope` (a set of capability atoms), and an `attenuation` record — the set of atoms the issuer was *itself* entitled to at mint time. A conforming verifier checks the signature, checks that `subject == caller`, and checks that the presented scope is a subset of the issuer's recorded attenuation. The invariant everyone assumes holds is **scope monotonicity along the chain**: `scope(hop_n) ⊆ scope(hop_{n-1}) ⊆ … ⊆ scope(hop_0)`. That invariant is enforced pairwise and therefore holds locally at every hop. It does *not* guarantee that `scope(hop_n)` is the set the originator intended, because the pairwise subset relation is transitive only over the sets that were actually written down, and an intermediate agent that downscopes for *its own* reasons writes down a smaller attenuation than the originator granted it. The originator's intent is lost not by forgery but by *legitimate local minimization*. ## What Was Observed Topology: `originator O` (scope `{read:repo, write:repo, exec:test, exec:deploy, read:secrets}`) delegates to `planner P` with a warrant scoping `P` to `{read:repo, exec:test, exec:deploy}`. `P` then delegates to `worker W` for a specific build step, minting a warrant scoped to `{read:repo, exec:test}`. At `W`, the build step needs `exec:deploy` for a canary promotion. `W` presents its warrant. The verifier at the deployment gate does three pairwise checks and all pass: - Signature valid, `issuer == P`, `subject == W`. - `scope(W) = {read:repo, exec:test}` ⊆ `attenuation(P) = {read:repo, exec:test, exec:deploy}`. - `attenuation(P) ⊆ scope(O)` at the time `P` minted — true, because `P` recorded its *own* current scope as attenuation, not `O`'s. The gate denies `exec:deploy` because `W`'s scope does not contain it. `W` then reports to `P` "authorization denied for `exec:deploy`," and `P` — which *does* hold `exec:deploy` — re-signs a fresh warrant for `W` with `{read:repo, exec:test, exec:deploy}` and attenuation `{read:repo, exec:test, exec:deploy}`. This second warrant *also* passes all pairwise checks, because `P`'s attenuation subset relation is checked against `P`'s scope, and `P`'s scope legitimately contains `exec:deploy`. The re-signed warrant is accepted and `W` deploys. The observed defect is the gap between these two moments. The first warrant was *correctly* narrow — `P` had chosen to downscope `W` to the build step's stated needs, which did not include deploy. The second warrant was *correctly* broad — `P` had `exec:deploy` and granted it. Both are valid AAIF warrants. The system has no record that the *effective* scope of `W` changed across the two warrants, no nonce binding the second warrant to the first denial, and no audit entry linking "denial at gate" to "re-mint by `P`." An auditor replaying the chain sees two independent, valid grants and cannot reconstruct that the second was minted *in response to* a denial, which is the exact signal that a scope escalation occurred. A second, quieter observation: when `P` re-signed, it did not re-consult `O`. `O`'s attenuation record for `P` said `P` could hold `exec:deploy`, so `P` was within its rights. But `O` had scoped `P` to `{read:repo, exec:test, exec:deploy}` *for the planner role*, and the re-mint moved `exec:deploy` from "planner may hold" to "worker may exercise," which is a *role* change `O` never authorized. AAIF's attenuation record captures *capability*, not *role*; the two are conflated at mint time and separated never. ## Condition of Validity The monotonicity invariant `scope(hop_n) ⊆ scope(hop_0)` holds *only if* every issuer records its attenuation as the *root* grant's scope, not its own current scope. AAIF as specified records the issuer's current scope, on the reasoning that an agent cannot delegate what it does not hold. That reasoning is sound for *authorization* (you cannot grant more than you have) but unsound for *intent preservation* (the root's intent is a separate object from any intermediate's holdings). Concretely, the invariant fails whenever there exists a hop `i` such that `scope(hop_i) ⊊ scope(hop_{i-1})` and a later hop `j > i` where `scope(hop_j) ⊄ scope(hop_i)` but `scope(hop_j) ⊆ scope(hop_{i-1})`. This is the strict-subset re-expansion case. It is *not* a bug in any single verifier; it is a structural property of pairwise-attenuation schemes. It is reachable in any chain of length ≥ 3 where at least one intermediate agent downscopes for task minimization and at least one later agent needs a capability the intermediate dropped but the originator held. The invariant *does* hold — and the failure is unreachable — when: (a) all warrants carry a `root_scope` field pinned to `hop_0`'s scope and verifiers check against it, or (b) re-mints are nonce-bound to the denial that triggered them and the gate refuses a re-mint whose scope exceeds the denied warrant's scope without an out-of-band `O` approval, or (c) the chain is length ≤ 2. ## Decision Boundary The operator's choice is between two postures, and the boundary is sharp: - **Intent-preserving posture:** treat the root grant as the ceiling and require every re-mint to carry the original `root_scope` and a `denial_nonce` linking it to the triggering denial. A re-mint that exceeds the denied warrant's scope is a *new delegation*, not a re-sign, and must route to `O` for approval. Cost: every intermediate agent must carry `root_scope` forward, which means the warrant grows with chain depth and the verifier must check a field the intermediate did not itself compute. This is the correct posture when the originator's intent is a security property (deploy, secrets, financial). - **Capability-preserving posture (current AAIF default):** pairwise attenuation only. Cost: the strict-subset re-expansion is unreachable *as a denial* but reachable *as an escalation*, and the audit trail cannot distinguish "re-mint after denial" from "independent grant." This is acceptable only when the originator's intent is advisory and the gate is the real authority. The boundary condition is: **if any capability in `scope(hop_0)` is one that the originator would not have granted to a direct `hop_n` subject, the chain must carry `root_scope` and nonce-bind re-mints.** If every capability in `scope(hop_0)` is one the originator would grant to any subject the chain reaches, pairwise attenuation is sufficient and the failure is benign. ## Operational Effect Without the guardrail, the observable effect is a *silent* role escalation that passes every local check and leaves a clean-looking audit log. The gate sees two valid warrants; the auditor sees two valid grants; the originator sees no event at all. The escalation is only detectable by reconstructing the *causal* link between denial and re-mint, which requires a nonce the scheme does not carry. The practical mitigations, in order of cost: 1. **Pin `root_scope` in every warrant** and have the gate check `scope ⊆ root_scope` in addition to `scope ⊆ attenuation(issuer)`. This closes the strict-subset re-expansion because `W`'s re-minted `{read:repo, exec:test, exec:deploy}` is still ⊆ `O`'s root scope, so it passes — but the *auditor* can now see that `W`'s effective scope moved from a strict subset of `P`'s to a set that includes a capability `P` had downscoped away, which is the escalation signal. `root_scope` alone does not *block* the re-mint; it makes it *visible*. 2. **Nonce-bind re-mints to denials.** When a gate denies, it emits a `denial_nonce`. A re-mint carrying that nonce is flagged as "post-denial escalation" and routed to `O` if `scope(re-mint) ⊄ scope(denied_warrant)`. This is the only mitigation that *blocks* rather than *reveals*. 3. **Separate role from capability in the attenuation record.** Record `role` alongside `scope` so that a re-mint moving a capability from "planner may hold" to "worker may exercise" is a role transition the originator can veto. This is the most invasive and the most correct. The failure is not that any agent did anything wrong. It is that AAIF's attenuation record answers "what may this issuer grant?" and not "what did the originator intend this chain to reach?" — and the strict-subset re-expansion is the exact case where those two questions have different answers. ```python class ScopeReexpansionError(RuntimeError): """Raised when a re-minted warrant re-expands a scope that an intermediate hop had legitimately downscoped, without a denial nonce binding it to the triggering denial. This is the strict-subset re-expansion boundary.""" pass def verify_warrant_chain( chain: list[dict], root_scope: frozenset[str], denial_nonces: frozenset[str], ) -> None: """Verify a multi-hop AAIF warrant chain under the intent-preserving posture. Each hop is a dict with keys: issuer, subject, scope (frozenset), attenuation (frozenset), denial_nonce (str | None). Raises ScopeReexpansionError if a hop's scope exceeds its immediate delegator's scope in a way that re-expands a prior downscope without a denial nonce, or if any hop exceeds the root scope. """ if not chain: raise ScopeReexpansionError("empty warrant chain") for i, hop in enumerate(chain): scope = hop["scope"] atten = hop["attenuation"] # Authorization check: cannot grant more than you hold. if not scope <= atten: raise ScopeReexpansionError( f"hop {i}: scope {sorted(scope)} exceeds issuer attenuation " f"{sorted(atten)}" ) # Intent check: no hop may exceed the originator's root grant. if not scope <= root_scope: raise ScopeReexpansionError( f"hop {i}: scope {sorted(scope)} exceeds root_scope " f"{sorted(root_scope)}" ) # Strict-subset re-expansion check: if a previous hop downscoped # below this hop's scope, the re-expansion must be nonce-bound to # the denial that triggered it. if i > 0: prev_scope = chain[i - 1]["scope"] if not scope <= prev_scope: nonce = hop.get("denial_nonce") if nonce is None or nonce not in denial_nonces: raise ScopeReexpansionError( f"hop {i}: scope {sorted(scope)} re-expands past " f"hop {i-1} scope {sorted(prev_scope)} without a " f"valid denial nonce" ) def mint_remint( delegator_scope: frozenset[str], denied_warrant_scope: frozenset[str], requested_scope: frozenset[str], denial_nonce: str, denial_nonces: frozenset[str], ) -> dict: """Mint a re-signed warrant after a denial, enforcing the escalation guard.""" if denial_nonce not in denial_nonces: raise ScopeReexpansionError( f"denial nonce {denial_nonce!r} not recognized by the gate" ) if not requested_scope <= delegator_scope: raise ScopeReexpansionError( f"requested {sorted(requested_scope)} exceeds delegator " f"{sorted(delegator_scope)}" ) if not requested_scope <= denied_warrant_scope: # Escalation: re-mint grants more than the denied warrant held. # Under the intent-preserving posture this requires out-of-band # originator approval, which is not present here. raise ScopeReexpansionError( f"re-mint escalates past denied warrant: requested " f"{sorted(requested_scope)} vs denied {sorted(denied_warrant_scope)}" ) return { "issuer": "", "subject": "", "scope": requested_scope, "attenuation": delegator_scope, "denial_nonce": denial_nonce, } ```