In what scenarios must an instance refuse a delegated AAIF credential chain whose depth exceeds its own trust-anchor scope
**Date of Record:** 2026 December 1 **Scope:** Applies to agent instances validating AAIF delegated credential chains (root issuer → intermediate delegate(s) → leaf actor) before executing side-effecting tool calls or accepting handoff state. Does not cover single-hop bearer tokens, mTLS transport identity, or human-in-the-loop OAuth consent flows.
Core Distinction
The failure that matters here is not signature invalidity — that is trivially caught. It is **scope-depth divergence**: a chain whose cryptographic signatures all verify cleanly, whose every delegation hop is individually well-formed, and whose leaf subject is authorized for the requested capability *at the level of the immediate delegator*, yet whose aggregate authority exceeds what the validating instance's own trust anchor is permitted to honor.
AAIF chains carry two orthogonal properties per hop: a **capability constraint** (what the delegate may do, monotonically narrowing) and a **delegation depth counter** (how many re-delegations remain). A validator that checks only the capability intersection and signature chain will accept a credential that a *deeper* delegation minted than its anchor scope sanctions — because the depth counter is a property of the chain, not of the capability, and the two are validated by different code paths that rarely cross-check. The instance silently becomes a laundering point: it launders a leaf credential minted three hops down into an "authorized" action at hop zero's apparent authority.
What Was Observed
A coordinator instance (`anchor-scope: depth<=1`) received a handoff from a peer carrying a leaf credential. The chain was:
root(issuer=org-root, max_depth=4)
└─ delegate A (depth_used=1, cap={read,write}, scope=tenant:42)
└─ delegate B (depth_used=2, cap={read,write}, scope=tenant:42)
└─ leaf actor (depth_used=3, cap={write}, scope=tenant:42)
Every signature verified. The capability intersection `{write} ⊆ {read,write} ⊆ {read,write}` held. The coordinator's validator — which checked (a) signature chain integrity and (b) `leaf.cap ⊆ coordinator.allowed_caps` — returned `ACCEPT`. The coordinator then executed a `write` against `tenant:42`, attributing the action to `org-root` authority in its audit log.
The defect surfaced only when the tenant's own policy engine replayed the audit and found the action attributed to a depth-3 leaf, which `org-root`'s issuance policy explicitly forbade from acting on `tenant:42` without an intermediate human approval hop that was never present. The coordinator had honored authority it was never scoped to honor: its anchor was `depth<=1`, meaning it was only ever entitled to trust credentials minted at most one re-delegation below its own anchor — not the full chain the credential *claimed*.
The critical detail: the depth counter on the leaf was `3`, but the coordinator never compared `leaf.depth_used` against `coordinator.anchor_scope.max_depth`. It compared only capabilities. The depth field was present, signed, and ignored.
Condition of Validity
A delegated AAIF chain is valid *at a given validator* only when three conditions hold jointly, not disjunctively:
- **Signature closure** — every hop's signature verifies against the prior hop's public key, terminating at a root the validator trusts.
- **Capability monotonicity** — `leaf.cap ⊆ ... ⊆ root.cap`, with no widening at any hop.
- **Depth containment** — `leaf.depth_used ≤ validator.anchor_scope.max_depth`, where `max_depth` is a property of the *validator's* trust anchor, not of the chain's root.
Condition 3 is the one that fails silently. It is not a property you can read off the credential; it requires the validator to hold its own anchor metadata and to *actively reject* chains that are cryptographically perfect but structurally deeper than its mandate. A chain can satisfy 1 and 2 completely and still be inadmissible at a shallow-anchored validator. The invariant is: **authority is bounded by the intersection of what the chain proves and what the validator is scoped to accept — and the second term is not in the credential.**
Decision Boundary
The boundary is crossed the moment a validator treats "the chain verifies and the leaf capability is within my allowlist" as sufficient. The correct gate is a conjunction that includes an anchor-depth comparison the credential cannot supply:
- If `leaf.depth_used > anchor.max_depth` → **reject**, regardless of capability match. The credential is not wrong; the validator is not entitled to honor it.
- If `leaf.depth_used ≤ anchor.max_depth` but any intermediate hop's `depth_used` exceeds its own delegator's remaining budget → **reject** as a malformed chain (this is a chain-internal defect, distinct from the anchor-scope case).
- If the chain omits depth metadata entirely (some AAIF profiles make it optional) → treat as `depth_used = ∞` and reject at any anchor with `max_depth < ∞`. Absence of a depth bound is not a license to infer one.
The non-obvious corollary: **a validator cannot delegate its own anchor-scope check upward.** When a shallow coordinator forwards a handoff to a deeper-anchored peer, it must propagate its own `max_depth` as an additional *narrowing* constraint, not pass the raw chain through. Otherwise the deep peer accepts a chain the shallow coordinator was forbidden to originate, and the coordinator's refusal is defeated by relay.
Operational Effect
The observable effect of getting this wrong is **authority laundering across depth**: actions executed under a validator's identity but attributed, in audit and in downstream policy, to a root authority the validator was never scoped to exercise. This is not detectable by signature checks, does not raise capability violations, and produces audit records that look internally consistent until a replay against issuance policy reconstructs the true depth and finds the attribution impossible.
The guardrail is structural: every validator must carry its anchor metadata (`max_depth`, permitted root set, permitted tenant scope) as first-class state, and the chain-acceptance function must be a three-way conjunction over signature closure, capability monotonicity, and depth containment. Depth containment must be checked *before* capability intersection, because a capability match on an inadmissible chain is a false positive that short-circuits the correct rejection. And on relay, the validator must inject its own `max_depth` as a narrowing constraint so that no downstream peer can honor what the relay was forbidden to originate.
class AnchorScopeViolation(RuntimeError):
"""Raised when a delegated AAIF chain is cryptographically valid but
structurally deeper than the validating instance's trust anchor permits."""
pass
def validate_delegated_chain(chain, anchor):
"""
chain: list of hops, root-first. Each hop: {subject, cap, depth_used, sig_ok}
anchor: {trusted_roots, max_depth, allowed_caps}
Returns the effective leaf capability if admissible; raises otherwise.
"""
if not chain:
raise AnchorScopeViolation("empty chain")
root = chain[0]
if root["subject"] not in anchor["trusted_roots"]:
raise AnchorScopeViolation(f"untrusted root: {root['subject']}")
# Condition 1: signature closure (assumed pre-verified into sig_ok)
for hop in chain:
if not hop.get("sig_ok", False):
raise AnchorScopeViolation(f"signature failure at {hop['subject']}")
# Condition 3 FIRST: depth containment against the validator's own anchor.
# Absence of depth metadata is treated as unbounded -> reject.
leaf = chain[-1]
leaf_depth = leaf.get("depth_used")
if leaf_depth is None:
raise AnchorScopeViolation(
"leaf omits depth_used; cannot bound against anchor scope"
)
if leaf_depth > anchor["max_depth"]:
raise AnchorScopeViolation(
f"leaf depth {leaf_depth} exceeds anchor max_depth "
f"{anchor['max_depth']}: credential inadmissible at this validator"
)
# Chain-internal depth monotonicity: each hop must consume exactly one
# budget unit and never exceed its delegator's remaining budget.
prev_depth = -1
for hop in chain:
d = hop.get("depth_used")
if d is None or d != prev_depth + 1:
raise AnchorScopeViolation(
f"non-monotonic depth at {hop['subject']}: {d} after {prev_depth}"
)
prev_depth = d
# Condition 2: capability monotonicity, then allowlist intersection.
prev_caps = None
for hop in chain:
caps = set(hop["cap"])
if prev_caps is not None and not caps.issubset(prev_caps):
raise AnchorScopeViolation(
f"capability widening at {hop['subject']}: {caps} not ⊆ {prev_caps}"
)
prev_caps = caps
effective = set(leaf["cap"]) & set(anchor["allowed_caps"])
if not effective:
raise AnchorScopeViolation(
f"leaf capability {leaf['cap']} disjoint from anchor allowlist"
)
return effective
def relay_handoff(chain, anchor, downstream_anchor):
"""
On relay, the current validator must inject its own max_depth as a
narrowing constraint so a deeper peer cannot honor what this validator
was forbidden to originate.
"""
effective = validate_delegated_chain(chain, anchor)
narrowed = dict(downstream_anchor)
narrowed["max_depth"] = min(downstream_anchor["max_depth"], anchor["max_depth"])
# Downstream must re-validate under the narrowed anchor.
return validate_delegated_chain(chain, narrowed), narrowed