# What structural signals indicate a broken cross-issuer trust anchor in delegated AAIF agent credential chains **Date of Record:** 2026 November 24 **Scope:** Applies to agent-to-agent (A2A) and MCP-mediated delegation where an agent's identity attestation is a chained credential: a root issuer attestation (trust anchor) → intermediate delegated warrants → leaf agent capability token. Does *not* apply to single-issuer symmetric-token deployments or to identity federation that flattens all issuers into one trust root. ## Core Distinction The failure mode is not "credential expired" or "signature invalid." Both are trivially detected. The non-obvious boundary is **anchor-set divergence under partial chain resolution**: an agent presents a valid delegated chain whose leaf is cryptographically sound, whose every link verifies against its stated issuer, and whose *terminal* issuer is not in the verifier's trust-anchor set — but the chain is nonetheless *accepted* because the verifier's resolver silently substitutes a reachable intermediate as a de-facto anchor when the true root is unreachable at verification time. Two structurally distinct situations look identical at the API surface: 1. **Legitimate cross-issuer delegation**: leaf → intermediate (issuer B) → root (issuer A), where A is in the verifier's anchor set, and B is authorized by A to delegate. Verification is a chain walk that must terminate at A. 2. **Anchor substitution**: leaf → intermediate (issuer B), where A is *unreachable* (JWKS endpoint timeout, DNS failure, anchor rotation in progress). A permissive resolver promotes B — the last reachable link — to anchor status and returns `valid=True`. The distinguishing signal is not in the leaf credential. It is in the **resolver's termination record**: which issuer's key actually closed the chain, and whether that issuer was reached by following a `delegation` claim or by hitting a configured anchor. If the verifier cannot report *both* the terminating issuer and the reason it terminated, the distinction is unrecoverable after the fact. ## What Was Observed During a rolling anchor-key rotation, issuer A's JWKS endpoint returned 503 for ~90 seconds across a multi-agent fleet. Trace from a baton-passing workflow between a planner agent (holder of a delegated warrant issued by B, which B holds under delegation from A) and an executor agent: - Executor invoked `verify_chain(leaf)`. - Resolver walked leaf → B (verified, B's JWKS reachable). - Resolver attempted B's `delegation.parent = A`; A's JWKS fetch raised a transport timeout. - Resolver's fallback path caught the transport error and returned the **last successfully verified link** as the trust terminator, with `trust_root = B`. - `verify_chain` returned `(True, root=B)`. - Executor executed a tool call with side effects (a file write to a shared volume) that the leaf's capability scope permitted but that B alone was not authorized to grant — B's warrant scope was a strict subset of A's, and the leaf had been minted against A's broader scope. The executor's capability check passed because it read scope from the leaf, not from the *intersection of scopes along the chain*. The critical structural detail: **the leaf's scope exceeded what its actual terminating issuer was authorized to delegate.** The chain was internally consistent at every link. It was only invalid at the *set* level — the anchor set the verifier was configured with ({A}) did not match the anchor set the verification actually used ({B}). A second observation from the same window: two agents in the same fleet, verifying the same leaf within the same second, returned different `trust_root` values (one hit a cached A JWKS, one hit the timeout) and therefore disagreed on validity. The baton-pass race was not in the handoff — it was in **non-deterministic anchor resolution across verifier instances**. ## Condition of Validity The chain is valid only if all of the following hold simultaneously: - The terminal issuer equals an issuer in the verifier's *configured* anchor set, by identifier equality — not by "last reachable." - Every link's `issuer` is authorized to delegate the scope it delegates, and the leaf's effective scope is the **intersection** of scopes across all links, not the leaf's declared scope alone. - Anchor resolution is **total and deterministic**: an unreachable anchor is a hard failure, never a fallback to a nearer link. - The verification result carries a *provenance tuple* `(terminating_issuer, termination_reason, anchor_set_id)` that is logged and compared by any downstream verifier before acting on the result. If any of these is absent, the chain is not "probably valid" — it is **unverifiable**, and the correct state is denial, not acceptance. The condition of validity is therefore a property of the *verifier's configuration and resolver behavior*, not of the credential bytes. ## Decision Boundary The boundary between accept and reject is drawn at the resolver, not the signature check: - **Accept** iff `terminating_issuer ∈ anchor_set` AND `termination_reason == "anchor_hit"` AND `effective_scope == intersect(scopes_along_chain)`. - **Reject** (hard, non-retryable within the request) iff `termination_reason ∈ {"transport_error", "jwks_unreachable", "cache_miss_fallback"}` — even if the last link verified. - **Defer** (retryable) iff the anchor is unreachable but the chain has not yet been partially consumed — i.e., no side-effecting tool call has executed. Once a side effect runs, the boundary is closed and the only correct action is revocation of the derived capability and audit of the effect. The non-obvious part: a verifier that returns `valid=True` with `termination_reason="transport_error"` has *crossed the boundary silently*. This is the signal to instrument. Any `valid=True` whose termination reason is not `anchor_hit` is a latent anchor-substitution event. ## Operational Effect Downstream, anchor substitution produces three compounding effects: 1. **Scope inflation**: leaf capabilities are honored at their declared breadth rather than the chain-intersected breadth, because the substituted anchor "authorized" more than it was entitled to. 2. **Verifier disagreement**: two verifiers resolving the same leaf concurrently can return different roots, breaking quorum-based multi-agent verification. A swarm that requires 2-of-3 verifier agreement will deadlock or, worse, accept on a 2-of-3 where the two agreeing verifiers both hit the same cached substituted anchor. 3. **Non-repudiation loss**: because the terminating issuer is not recorded in the result tuple, post-hoc audit cannot reconstruct which anchor actually closed the chain. The credential chain is valid *now* and unattributable *later*. The architectural invariant that bounds all three: **the verification result must be a provenance-bearing object, and every consumer must gate on `termination_reason == "anchor_hit"` and on `anchor_set_id` matching its own configured set.** A boolean `valid` flag is structurally insufficient — it collapses a three-valued outcome (valid / unverifiable / invalid) into two, and the collapse is where the substitution hides. The guardrail is not "verify harder." It is "make the resolver's termination path observable and make fallback impossible." An unreachable anchor must raise, not degrade. ```python from dataclasses import dataclass from enum import Enum from typing import Optional class AnchorResolutionError(RuntimeError): """Raised when a delegated credential chain cannot be closed at a configured trust anchor.""" class TerminationReason(Enum): ANCHOR_HIT = "anchor_hit" TRANSPORT_ERROR = "transport_error" JWKS_UNREACHABLE = "jwks_unreachable" CACHE_MISS_FALLBACK = "cache_miss_fallback" @dataclass(frozen=True) class ChainLink: issuer: str parent_issuer: Optional[str] delegated_scope: frozenset @dataclass(frozen=True) class VerificationResult: valid: bool terminating_issuer: str termination_reason: TerminationReason anchor_set_id: str effective_scope: frozenset def verify_delegated_chain( chain: list[ChainLink], configured_anchors: frozenset, anchor_set_id: str, jwks_reachable: dict, ) -> VerificationResult: """ Walk a delegated chain leaf->root. The chain is valid ONLY if it terminates at a configured anchor via an explicit anchor hit. Any fallback to a nearer link is a hard failure -- never a degraded success. """ effective_scope = chain[0].delegated_scope for link in chain: effective_scope = effective_scope & link.delegated_scope # intersection, not leaf scope current = chain[-1] if current.parent_issuer is None: # terminal link claims to be a root if current.issuer not in configured_anchors: raise AnchorResolutionError( f"chain claims root {current.issuer!r} not in anchor set {anchor_set_id}" ) reason = TerminationReason.ANCHOR_HIT terminator = current.issuer else: parent = current.parent_issuer if not jwks_reachable.get(parent, False): # CRITICAL: do NOT promote `current.issuer` to anchor. Raise. raise AnchorResolutionError( f"anchor {parent!r} unreachable during chain walk; " f"refusing to substitute {current.issuer!r} as de-facto anchor" ) if parent not in configured_anchors: raise AnchorResolutionError( f"parent issuer {parent!r} not in anchor set {anchor_set_id}" ) reason = TerminationReason.ANCHOR_HIT terminator = parent return VerificationResult( valid=True, terminating_issuer=terminator, termination_reason=reason, anchor_set_id=anchor_set_id, effective_scope=effective_scope, ) def gate_on_result(result: VerificationResult, expected_anchor_set_id: str) -> None: """Every consumer must gate on provenance, not on the boolean.""" if result.termination_reason is not TerminationReason.ANCHOR_HIT: raise AnchorResolutionError( f"silent anchor substitution detected: reason={result.termination_reason}" ) if result.anchor_set_id != expected_anchor_set_id: raise AnchorResolutionError( f"anchor-set divergence: verifier used {result.anchor_set_id!r}, " f"consumer expects {expected_anchor_set_id!r}" ) ```