# Why does an instance accept a delegated credential whose scope chain is transitively valid but whose issuer-set intersection is empty? **Date of Record:** 2026 November 27 **Scope:** Applies to agents operating under AAIF-style delegated credentials (signed capability tokens carrying issuer, subject, scope, delegation depth, and audience) where a downstream instance validates a chain of delegations against multiple trust anchors. Does not apply to single-issuer flat-token models, symmetric-key session tokens, or OAuth bearer tokens without delegation semantics. ## Core Distinction The failure is not "an expired token was accepted" or "a signature failed to verify." Those are local, per-hop checks that most implementations get right. The boundary failure is subtler: **every individual hop in a delegation chain verifies correctly, the delegation depth is within bounds, each scope is a subset of its parent's scope, and yet the composed credential is unauthorized** because the set of issuers that jointly vouch for the terminal credential has an empty intersection with the set of issuers the executing instance is required to trust *for that specific scope*. AAIF chains are validated hop-by-hop. Hop validation proves *local* soundness: "issuer I_k signed a credential delegating scope S_k to subject A_k, and S_k ⊆ S_{k-1}." What hop validation does **not** prove is that the *conjunction* of all issuers `{I_0, I_1, …, I_n}` is simultaneously acceptable to the resource's authorization policy. Two issuers can each be independently trusted, each validly delegate, and still produce a chain the relying party must reject because no single policy anchor trusts *both* of them to co-sign this capability. This is the empty-intersection invariant: `⋂_k Trust(executor, I_k, S_terminal) = ∅`. ## What Was Observed An orchestrator agent `O` holds a root credential scoped `tool:db:read` issued by tenant issuer `T`. It needs a sub-agent `S` to run a read-only query. `O` delegates a narrowed scope `tool:db:read:table=orders` to `S`, signed by `O` and countersigned by a *workload* issuer `W` that attests the sub-agent's runtime identity. The chain presented to the database proxy `P` is: ``` T → O (scope: tool:db:read) issuer: T O → S (scope: tool:db:read:table=orders) issuer: O, counter-issuer: W ``` `P` validates: - `T`'s signature over the `O` credential — valid. - `O`'s signature over the `S` credential — valid. - `W`'s attestation signature — valid. - Scope narrowing `table=orders ⊂ tool:db:read` — holds. - Depth = 2, within `max_delegation_depth=3` — holds. Every check passes. `P` executes the query. The defect surfaces later during an audit replay: `P`'s authorization policy for `tool:db:read:table=orders` requires the terminal credential to be jointly anchored by `T` **and** the platform issuer `W`. But `W` only appears as a *counter-issuer* on the final hop; it never anchored the root scope. The set of issuers that actually vouch for the full scope path is `{T, O, W}`, while `P`'s required anchor set for that scope is `{T, W}` *as co-equal roots*. `W` is present but not in the root position the policy demands. The intersection of "issuers who validly signed somewhere in the chain" with "issuers the policy requires as roots" is `{T}` — non-empty but *insufficient*, and in the strict co-anchor variant with a distinct platform issuer `W'`, it is fully empty. The dangerous property: the chain *looks* authorized because `W`'s name appears in the token. Auditors and even the executor's own logs record "issuer W present, signature valid" and conclude trust was established. It was not. ## Condition of Validity The empty-intersection rejection is the correct outcome **only** when the authorization policy is expressed as a *required-anchor-set* predicate over the terminal scope, not as a per-hop trust predicate. Formally, acceptance requires: ``` Accept(chain, S_terminal) ⟺ ∀k: Verify(I_k, cred_k) # per-hop signature ∧ ∀k: S_k ⊆ S_{k-1} # scope monotonicity ∧ depth ≤ max_depth ∧ RequiredAnchors(S_terminal) ⊆ RootIssuers(chain) # ← the missing clause ∧ RequiredAnchors(S_terminal) ⊆ ⋂_k Acceptable(I_k, S_terminal) ``` The last two clauses are what hop-by-hop validators omit. `RootIssuers(chain)` is the set of issuers occupying root position (those whose credentials have no parent). `Acceptable(I_k, S)` is the set of scopes issuer `I_k` is policy-permitted to anchor — a counter-issuer attesting runtime identity is generally **not** acceptable as a root anchor for a data-access scope, even though its signature is cryptographically valid. The invariant fails silently whenever the validator conflates "issuer appears in chain" with "issuer is an acceptable anchor for this scope." It is *not* a bug in signature verification, and it will not be caught by fuzzing signatures or expiring tokens. It is caught only by a policy-intersection check that treats root position and counter-signature position as distinct roles. ## Decision Boundary The executor must reject when the policy's required-anchor set is not a subset of the chain's *root* issuer set, even if all issuers named in the policy appear somewhere in the chain. Concretely: - **Accept** when `RequiredAnchors(S) ⊆ RootIssuers(chain)` and each root issuer is `Acceptable` for `S`. - **Reject** when any required anchor appears only in a non-root (counter-issuer or intermediate) position. Presence is not anchoring. - **Reject** when the chain is valid but `RequiredAnchors(S) ∩ RootIssuers(chain) = ∅` — the empty-intersection case — regardless of signature validity. - **Do not** fall back to "any trusted issuer in the chain" as a permissive default. That default is the exact bug. The subtle trap is scope-dependent anchor requirements: `tool:db:read` may need only `{T}`, while `tool:db:read:table=orders` (a narrower but *more sensitive* scope) may additionally require `{W}` as a co-root. Narrowing scope can therefore *increase* the anchor requirement. A validator that only checks scope monotonicity will miss this, because monotonicity is about the scope lattice, not the trust lattice. ## Operational Effect When this boundary is respected, delegated credentials become composable without silently widening trust: a sub-agent cannot manufacture authority by getting a permissive issuer to merely countersign, because countersignature position does not satisfy root-anchor requirements. When it is violated, the observable symptom is an *audit-time* discrepancy rather than a runtime error — the query succeeds, the log shows valid signatures, and only a replay against the policy's required-anchor predicate reveals the gap. This is the worst class of agent-authorization failure: it is invisible at execution and only reconstructable from the credential graph. The guardrail is to make the anchor-set check a first-class, mandatory step in chain validation, evaluated against the *terminal* scope, with root and counter-issuer positions tracked separately. Log the computed `RequiredAnchors`, `RootIssuers`, and their intersection on every accepted chain; an empty or insufficient intersection must raise, not warn. ```python from dataclasses import dataclass, field from typing import FrozenSet class EmptyAnchorIntersectionError(RuntimeError): """Raised when a delegation chain is hop-valid but no acceptable root-issuer set jointly anchors the terminal scope.""" @dataclass(frozen=True) class Credential: issuer: str subject: str scope: str counter_issuer: str | None = None parent_issuer: str | None = None # None => this credential is a root @dataclass class ChainValidation: chain: list[Credential] terminal_scope: str required_anchors: FrozenSet[str] acceptable_roots: dict[str, FrozenSet[str]] = field(default_factory=dict) def _root_issuers(self) -> FrozenSet[str]: return frozenset(c.issuer for c in self.chain if c.parent_issuer is None) def _all_issuers(self) -> FrozenSet[str]: out = set() for c in self.chain: out.add(c.issuer) if c.counter_issuer: out.add(c.counter_issuer) return frozenset(out) def validate(self) -> None: roots = self._root_issuers() present = self._all_issuers() # Required anchors must be roots, not merely present as counter-issuers. anchored = self.required_anchors & roots if not self.required_anchors <= anchored: missing = self.required_anchors - anchored # Distinguish "absent entirely" from "present but wrong position". mispositioned = missing & present raise EmptyAnchorIntersectionError( f"scope={self.terminal_scope!r} requires anchors " f"{sorted(self.required_anchors)}; roots={sorted(roots)}; " f"missing={sorted(missing)}; " f"present-but-not-root={sorted(mispositioned)}" ) # Each root must be policy-acceptable for the terminal scope. for r in self.required_anchors: allowed = self.acceptable_roots.get(r, frozenset()) if self.terminal_scope not in allowed: raise EmptyAnchorIntersectionError( f"root issuer {r!r} not acceptable for scope " f"{self.terminal_scope!r}" ) def authorize(chain: list[Credential], terminal_scope: str, required_anchors: FrozenSet[str], acceptable_roots: dict[str, FrozenSet[str]]) -> None: ChainValidation(chain, terminal_scope, required_anchors, acceptable_roots).validate() ```