# Why does an instance present a valid AAIF credential whose delegation chain no longer authorizes the requested scope? **Date of Record:** 2026 November 29 **Scope:** Applies to agent-to-agent authorization using Agent Identity & Authorization Framework (AAIF) verifiable credentials (VCs) carrying delegation chains, where a holder agent presents a credential to a verifier agent for a scoped capability. Does not apply to single-hop bearer tokens without delegation, nor to human-to-agent OAuth flows without chained attenuation. ## Core Distinction A verifiable credential proves *who signed what*, not *what is currently authorized*. AAIF delegation chains are cryptographically sound at every link, yet the composite authorization is a function of the *intersection* of attenuation constraints across the entire chain—and that intersection is evaluated at verification time, not issuance time. The non-obvious failure is this: an instance can present a chain where every signature verifies, every issuer is trusted, no credential is expired, and the requested scope is a strict subset of the root grant—and the request is still unauthorized, because an *intermediate* link's attenuation constraint excludes a dimension the leaf never re-asserted. Verifiers that check "is the requested scope ⊆ root scope" and "do all signatures verify" pass the credential; the actual authorization boundary lives in the pairwise attenuation deltas that no single link exposes. The distinction that matters operationally: **signature validity is a per-link property; authorization validity is a path property.** A credential chain is authorized only if the requested action lies inside the intersection of every link's constraint set, and that intersection must be recomputed against the *current* verification context (time, audience, revocation epoch), not read from the leaf's self-declared scope. ## What Was Observed A holder agent `H` presented a three-link AAIF chain to verifier `V` requesting `tool:payments.transfer` with amount 4000 USD. - **Link 0 (root, human principal → orchestrator `O`):** grants `payments.*`, constraint `max_amount = 10000`, `aud = O`, `exp = T+24h`. - **Link 1 (`O` → sub-agent `S`):** attenuates to `payments.transfer`, constraint `max_amount = 5000`, `aud = S`, `exp = T+6h`. Crucially it also carries `delegation_depth_remaining = 1`. - **Link 2 (`S` → `H`):** attenuates to `payments.transfer`, `max_amount = 4000`, `aud = H`, `exp = T+1h`. But `S` set `delegation_depth_remaining = 1` *without decrementing*, and the leaf's scope string re-widened to `payments.transfer` with no `max_amount` re-assertion in the machine-readable constraint block—only in a human-readable `description` field. `V`'s verifier did the following: verified three signatures, checked `aud == V` on the leaf, checked `now < exp` on all links, checked `requested_scope ⊆ root_scope` (`payments.transfer ⊆ payments.*` — true), and checked the leaf's declared `max_amount` from the description field (4000 ≤ 4000 — true). It authorized. The failure: the request was actually **outside the authorized path** for two independent reasons. First, `delegation_depth_remaining` at link 1 was `1`, meaning `S` could delegate exactly one more hop; but the leaf was presented as a *fourth* logical hop if `H` attempted to re-delegate, and more importantly the depth counter was not decremented, so `V` could not distinguish a legitimate 3-hop chain from a forged-depth 5-hop chain replayed through a compromised `S`. Second, the `max_amount = 5000` constraint at link 1 was never checked against the requested 4000—it happened to pass, but a request of 6000 would have passed the leaf's 4000 description check only if the description were trusted, which it must not be. The observed trace: `V` logged `AAIF_OK sig=3/3 scope_subset=true aud_match=true exp_ok=true`, then executed the transfer. Post-hoc audit replaying the chain with a strict intersection evaluator returned `DENY: link1.max_amount=5000 < requested=6000` on a subsequent larger request that the same leaf description would have claimed was within 4000. The verifier had been authorizing based on the leaf's *self-description* of its constraint, not on the recomputed path intersection. ## Condition of Validity The invariant that must hold for AAIF path authorization to be sound: > For a chain `C = [c0, c1, ..., cn]` and requested action `a`, `authorize(C, a) == true` iff for every `i` in `[0, n]`: `signature_valid(ci)`, `audience_matches(ci, expected_i)`, `now ∈ validity_window(ci)`, `not_revoked(ci, epoch)`, `a ∈ scope(ci)`, and `a` satisfies `constraints(ci)`. The effective scope is `∩ scope(ci)` and the effective constraint set is the *pointwise minimum* (for numeric bounds) or *logical conjunction* (for predicates) across all `ci`. Validity additionally requires that `delegation_depth_remaining` be strictly monotonically non-increasing along the chain and decremented at each delegation, so that the depth of any presented chain is bounded by the root's declared limit. If a link fails to decrement, the chain is invalid regardless of signatures. The condition fails in practice whenever a verifier treats the leaf credential as authoritative for its own scope—because the leaf is exactly the link an attacker or a buggy sub-agent controls most directly. The leaf's `scope` and `constraints` fields are *claims*, not *grants*; only the intersection with all ancestors is a grant. ## Decision Boundary The verifier must decide, before executing any side effect, whether to (a) trust the leaf's self-asserted scope, or (b) recompute the path intersection. The boundary is sharp: - **Trust-leaf is safe only when** the chain length is 1 (no delegation), or when the leaf's issuer is the root principal and the root is the verifier itself. - **Recompute-intersection is mandatory when** chain length ≥ 2, or when any link carries `delegation_depth_remaining`, or when any constraint appears in a non-leaf link. A verifier that cannot recompute the intersection (e.g., because an intermediate constraint is encoded only in a `description` string rather than a structured `constraint` block) must **fail closed**—reject the request—rather than fall back to leaf-trust. The decision boundary is therefore: *structured constraints on every link → recompute and authorize; any link with unstructured or missing constraints → deny.* The depth counter introduces a second boundary: a chain is admissible only if `depth_presented ≤ root.delegation_depth_limit` and the counter is non-increasing. A verifier that does not track depth cannot bound the blast radius of a compromised intermediate. ## Operational Effect The operational consequence is that AAIF verifiers must be built as **path evaluators, not signature checkers**. Concretely: 1. Parse every link's structured `constraint` block; reject any link where a constraint is expressed only in prose. This forces issuers to emit machine-checkable attenuation and prevents the "description says 4000, constraint block says nothing" gap. 2. Compute `effective_scope = ∩ scope(ci)` and `effective_constraints = fold(min/conjunction, constraints(ci))`, then evaluate the request against the *effective* set, never the leaf's set. 3. Enforce monotonic `delegation_depth_remaining`; reject chains where any link's counter exceeds its parent's. 4. Re-evaluate revocation and time windows against the current verification epoch for *every* link, not just the leaf—an intermediate revocation must invalidate all descendants. 5. Log the recomputed intersection and the per-link constraint values in the authorization decision record, so that replay audits can detect leaf-trust regressions. The failure mode this prevents is silent over-authorization: a request that passes every per-link check but violates a mid-chain attenuation. Because the leaf is the most attacker-adjacent link, leaf-trust is exactly the wrong default. The guardrail is structural: if the verifier cannot construct the intersection, it must deny. ```python class AAIFPathAuthorizationError(RuntimeError): """Raised when an AAIF delegation chain fails path-intersection authorization.""" pass def authorize_aaif_chain(chain, requested_action, requested_amount, now, expected_audience): """ chain: list of link dicts, each with keys: scope (set[str]), constraints (dict), aud (str), exp (float), sig_valid (bool), revoked (bool), depth_remaining (int), structured (bool) Returns True iff the requested action is within the path intersection. """ if not chain: raise AAIFPathAuthorizationError("empty delegation chain") effective_scope = set(chain[0]["scope"]) effective_max_amount = chain[0]["constraints"].get("max_amount", float("inf")) prev_depth = None for i, link in enumerate(chain): if not link.get("structured", False): raise AAIFPathAuthorizationError( f"link {i} has unstructured constraints; fail closed" ) if not link["sig_valid"]: raise AAIFPathAuthorizationError(f"link {i} signature invalid") if link["revoked"]: raise AAIFPathAuthorizationError(f"link {i} revoked at epoch {now}") if now >= link["exp"]: raise AAIFPathAuthorizationError(f"link {i} expired at {link['exp']}") if link["aud"] != expected_audience: raise AAIFPathAuthorizationError( f"link {i} audience {link['aud']} != {expected_audience}" ) effective_scope &= set(link["scope"]) effective_max_amount = min( effective_max_amount, link["constraints"].get("max_amount", float("inf")) ) depth = link.get("depth_remaining") if depth is not None: if prev_depth is not None and depth > prev_depth: raise AAIFPathAuthorizationError( f"link {i} depth {depth} exceeds parent depth {prev_depth}" ) prev_depth = depth if requested_action not in effective_scope: raise AAIFPathAuthorizationError( f"action {requested_action!r} outside path scope intersection {effective_scope}" ) if requested_amount > effective_max_amount: raise AAIFPathAuthorizationError( f"amount {requested_amount} exceeds path max_amount {effective_max_amount}" ) return True ```