# What happens when an instance presents a delegated credential whose scope chain diverges at a non-adjacent issuer hop **Date of Record:** 2026 November 26 **Scope:** Applies to AAIF-mediated agent-to-agent authorization where a bearer presents a multi-hop delegated credential (root issuer → intermediate agent → leaf agent) and at least one hop is signed by an issuer outside the verifier's configured trust anchor set. Does not apply to single-hop credentials, to credentials whose entire chain resolves under one issuer, or to symmetric-key shared-secret tokens. ## Core Distinction The failure is not "untrusted issuer rejected." Every AAIF verifier rejects an unknown root. The non-obvious boundary is the **non-adjacent divergence**: a chain where the root issuer *is* trusted, every *adjacent* signature pair verifies, but a middle hop's signing key was rotated out of the trust anchor set *after* the leaf credential was minted. The chain is arithmetically valid end-to-end and cryptographically intact, yet semantically void because the delegation authority at hop *k* no longer maps to a trusted principal at verification time *t*. Local signature verification answers "was this signed by the key named in the credential?" It does not answer "was that key, at issuance time, authorized to delegate this scope under this trust anchor?" Agents that conflate the two accept credentials that should be dead. The invariant at stake: **trust-chain validity is a function of (chain, trust-anchor-state-at-issuance, trust-anchor-state-at-verification), not of chain alone.** ## What Was Observed A three-agent pipeline: orchestrator *O* (root issuer, trusted), planner *P* (intermediate delegate), executor *E* (leaf). *P* obtained a delegation credential from *O* at `t0` scoped to `tool:filesystem:read` on `/data/tenant-42`. *P* re-delegated a narrowed scope (`/data/tenant-42/reports`) to *E* at `t1`. *E* presented the two-hop chain to a resource server *R* at `t2`. At `t1.5`, *O*'s key-rotation runbook revoked the specific signing key `K_P` used to issue *P*'s credential, reissued *P* under `K_P'`, and published the revocation to the trust anchor set. *P* never re-fetched its credential — it cached the `t0` credential in episodic memory and reused it. *E*'s chain therefore embeds `K_P` at hop 1. *R*'s verifier walked the chain: hop 0 signature under *O*'s root key → valid; hop 1 signature under `K_P` → valid (the key material still verifies); scope narrowing → monotonic, valid. *R* admitted the request. The credential was 40 minutes stale against a revocation that had already propagated. The scope was correctly narrowed, so no over-broad access occurred — but the *identity* of the delegating principal at hop 1 was a retired key, and any audit trail keyed on `K_P` would attribute the action to a principal that no longer existed in the authorization graph. The second-order failure: *R* logged the decision with `issuer_chain_hash` computed over the presented chain. When the security team replayed the audit at `t3`, the recomputed hash against the *current* trust anchor set did not match, and the replay harness flagged 100% of that window's decisions as "unknown issuer" — a false-positive storm that masked the one genuinely stale credential. ## Condition of Validity A delegated credential is *operationally valid at verification time* iff all of the following hold simultaneously: 1. **Adjacent signature integrity** — each hop's signature verifies under the key named in the preceding hop. (Necessary, not sufficient.) 2. **Anchor liveness at issuance** — the key that signed hop *k* was in the trust anchor set at the credential's `not_before`, not merely at verification time. 3. **Anchor liveness at verification** — that same key is *not* revoked as of verification time, OR a documented grace window covers the credential's remaining TTL. 4. **Scope monotonicity across the full chain** — each hop's scope is a subset of its parent's, evaluated against the *narrowest* ancestor, not just the immediate parent. 5. **Revocation freshness bound** — the verifier's trust anchor snapshot is within `max_staleness` of the issuer's revocation publication. Condition 2 is the one agents systematically drop. Most AAIF client libraries expose `verify_chain(credential, trust_anchors)` and internally check conditions 1, 3, and 4 — because those are computable from the credential and the current anchor set. Condition 2 requires the *historical* anchor set at issuance, which the verifier must fetch or cache separately. Condition 5 requires the verifier to know how stale its own snapshot is, which most do not track. ## Decision Boundary The verifier must branch on whether the divergence is *recoverable* or *terminal*: - If the divergent hop's key is revoked but the credential's `not_before` predates the revocation **and** the revocation carries no `effective_immediately` flag, the credential is in a **grace window**: admit, but stamp the decision with `degraded_trust=true` and the revocation timestamp, and cap the admitted TTL at `revocation_time + grace_period`. - If the divergent hop's key is *absent* from the historical anchor set at `not_before` (never was trusted), the chain is **terminal-invalid**: reject, do not retry, do not fall back to a shorter chain — the shorter chain would be a different principal. - If the verifier's anchor snapshot staleness exceeds `max_staleness`, the correct action is **fail-closed with a retryable error**, not admit-with-warning. A stale verifier cannot distinguish grace-window from terminal-invalid. The boundary agents get wrong: treating "signature valid but issuer stale" as a soft warning and proceeding. It is only soft when conditions 2 and 5 both hold. When either is unknown, it is terminal. ## Operational Effect The concrete guardrail is a verifier that refuses to evaluate a chain without first resolving the anchor set *as of each hop's `not_before`*, and that carries an explicit staleness budget. Delegating agents must, in turn, **re-fetch their own credential on every re-delegation** rather than reusing a cached one — the cached-credential path is what produced the `K_P` divergence. The invariant to enforce at the framework level: a delegated credential's cache TTL must never exceed the issuer's revocation publication interval; if it does, the cache is unsound by construction. The audit consequence matters as much as the access consequence. Decision logs must record the *anchor set version* used at verification, not just the chain hash, so replay can reconstruct the exact trust state rather than recomputing against the current one and generating false positives. ```python from dataclasses import dataclass from typing import Optional class DelegationChainError(RuntimeError): """Raised when a delegated credential chain fails an AAIF validity invariant.""" @dataclass(frozen=True) class Hop: issuer: str signing_key_id: str not_before: float scope: frozenset @dataclass(frozen=True) class AnchorSnapshot: version: str # key_id -> (valid_from, valid_until_or_None) keys: dict fetched_at: float def verify_delegation_chain( chain: list[Hop], snapshot: AnchorSnapshot, now: float, max_staleness: float, grace_period: float, ) -> dict: if not chain: raise DelegationChainError("empty delegation chain") # Condition 5: verifier cannot reason about liveness on a stale snapshot. if (now - snapshot.fetched_at) > max_staleness: raise DelegationChainError( f"anchor snapshot v{snapshot.version} stale by " f"{now - snapshot.fetched_at:.1f}s > max_staleness {max_staleness}s; " "fail-closed, retryable" ) degraded = False for idx, hop in enumerate(chain): entry = snapshot.keys.get(hop.signing_key_id) if entry is None: # Condition 2: key never trusted at issuance -> terminal-invalid. raise DelegationChainError( f"hop {idx}: signing key {hop.signing_key_id} absent from anchor " f"snapshot v{snapshot.version}; chain is terminal-invalid" ) valid_from, valid_until = entry # Condition 2: anchor liveness at issuance. if hop.not_before < valid_from: raise DelegationChainError( f"hop {idx}: credential minted at {hop.not_before} before key " f"{hop.signing_key_id} became trusted at {valid_from}" ) # Condition 3: anchor liveness at verification, with grace window. if valid_until is not None and now > valid_until: if hop.not_before <= valid_until and (now - valid_until) <= grace_period: degraded = True else: raise DelegationChainError( f"hop {idx}: key {hop.signing_key_id} revoked at {valid_until}; " f"now={now}, grace={grace_period}s exceeded or predates issuance" ) # Condition 4: scope monotonicity against narrowest ancestor. if idx > 0 and not hop.scope <= chain[idx - 1].scope: raise DelegationChainError( f"hop {idx}: scope {set(hop.scope)} not a subset of parent " f"{set(chain[idx - 1].scope)}" ) return { "admitted": True, "degraded_trust": degraded, "anchor_snapshot_version": snapshot.version, } ```