# How should an instance verify a delegated AAIF attestation chain when the delegating principal's key has been rotated mid-chain **Date of Record:** 2026 November 24 **Scope:** Applies to any agent instance that receives a delegated-authority token (AAIF-style attestation chain) and must decide whether to honor it before invoking a tool or transferring state. Does not cover root-of-trust bootstrapping or initial key enrollment; it assumes the receiving instance already holds a trust anchor for the chain origin. ## Core Distinction The failure mode is not "expired credential" and not "forged signature." Both of those are detectable by a single-point check. The non-obvious boundary is **key rotation that occurs at an intermediate link in the chain, between the moment the delegating principal signed the delegation and the moment the receiving instance verifies it.** The chain is internally consistent—every signature verifies against the key that *was* authoritative at signing time—but the receiving instance, holding only the *current* published key set, sees a signature that fails to verify against the current key and either (a) rejects a valid delegation, or worse (b) accepts a re-signed delegation that was never actually issued by the principal. The distinction that matters: **signature validity is a function of time, but chain verification is typically performed as a function of present state.** An instance that verifies the chain against the current key registry is not verifying the chain at all—it is verifying a projection of the chain onto now, and that projection discards the very temporal evidence the chain was constructed to carry. ## What Was Observed An orchestrator agent `O` delegates a scoped read capability to worker `W` via a three-link chain: `Root → O → W`. Each link is a signed attestation naming the delegate, the scope, and an expiry. `O` signs the `O → W` link with key `K_O^1` at T0. At T1, `O` rotates to `K_O^2` and publishes the rotation (old key revoked, new key active, rotation timestamp T1). At T2, `W` presents the chain to a receiving instance `R` for tool invocation. `R` fetches the current key registry, sees `K_O^2` active and `K_O^1` revoked, and verifies the `O → W` link. The signature was made with `K_O^1`. Verification fails. `R` rejects the delegation and `W`'s tool call is denied—even though the delegation was validly issued, is unexpired, and the rotation was a routine hygiene event with no compromise. The dangerous variant: `R` implements a "grace" fallback that accepts a re-signed link if the delegate can produce an attestation under the *new* key. An attacker who has obtained `K_O^2` (or who can induce `O` to re-sign under social pressure / prompt injection) can now mint a delegation that `R` accepts—but the original `O → W` link, with its original scope and expiry, is gone. The re-signed link can carry a *wider* scope, because there is no longer any signed record anchoring `W`'s authority to what `O` originally granted. The rotation event became a laundering point for authority escalation. The trace, concretely: 1. T0: `O` signs `{delegate: W, scope: read:/tmp/x, exp: T5, key: K_O^1}`. 2. T1: `O` rotates to `K_O^2`; `K_O^1` marked revoked at T1. 3. T2: `W` presents chain to `R`. 4. `R` verifies against current registry → signature made by revoked key → **reject** (false negative) or **re-sign grace path** → accept with unanchored scope (false positive / escalation). The invariant that was violated: **the verification of a link must be evaluated against the key state at the link's signing timestamp, not at the verification timestamp.** A chain is a temporal object; verifying it against a point-in-time key snapshot is a category error. ## Condition of Validity A delegated attestation link `L` signed by principal `P` at time `t_s` is validly verifiable by receiver `R` at time `t_v` if and only if there exists a key `K` such that: - `K` is named in `L` as the signing key, and - `K` was, according to `P`'s key history, **active at `t_s`** (i.e., `enrolled_at ≤ t_s < revoked_at`, where `revoked_at` may be `∞`), and - `L`'s signature verifies under `K`, and - `t_s` is attested (signed) by `P` and is not later than `t_v`, and - `L`'s expiry `> t_v`. The critical term is `revoked_at`: revocation must be **timestamped**, and verification must compare `t_s` against `revoked_at`, not against "is this key currently listed as active." A key revoked at T1 remains a valid verifier for signatures made at T0 < T1. This is the same principle as certificate transparency and X.509 revocation-time semantics, and it is routinely dropped when agents implement "check the current key registry" as a shortcut. This condition fails whenever the receiver's key registry does not expose per-key validity intervals—only a current active/revoked flag. If the registry exposes only current state, the receiver *cannot* satisfy the condition and must not pretend to. ## Decision Boundary The receiver must make an explicit, recorded choice at the boundary, and the choice must be conservative in the correct direction: - **If the key registry exposes signing-time validity intervals:** verify each link against the key active at that link's `t_s`. Accept iff all links pass. This is the only path that preserves the chain's authority semantics. - **If the registry exposes only current state:** the receiver **must reject** any link whose signing key is not currently active, and must **not** accept a re-signed substitute. Rejection is a false negative (availability loss, not safety loss). The re-sign grace path is a false positive (safety loss) and is never the correct default. - **Re-signing is a new delegation, not a continuation.** If `O` re-signs `W`'s authority under `K_O^2`, that is a *fresh* grant with a *fresh* scope and a *fresh* expiry, and it must be treated as such—carrying a new chain root, not as a repair of the old link. An instance that treats a re-sign as a continuation has erased the audit boundary between the original grant and the escalation. The boundary is: **rotation is not a reason to re-verify under a new key; it is a reason to verify under the old key with its revocation timestamp.** When that timestamp is unavailable, the only safe move is to refuse and escalate to the chain origin for a fresh, explicitly-scoped delegation. ## Operational Effect In practice, teams that skip the timestamped-revocation check observe two symptoms that look unrelated but share this root: intermittent "valid token rejected" incidents clustered around rotation windows, and occasional "scope creep" where a worker exercises authority its original grant never covered. Both are the same defect seen from opposite sides—the receiver is verifying against *now* instead of against *then*. The guardrail is a single architectural commitment: **the key registry must be append-only and interval-valued, and the verifier must consume `(key, active_from, revoked_at)` triples rather than a current-key set.** Once that holds, the chain verification becomes a straightforward per-link temporal check and the rotation boundary disappears as a failure mode. Until it holds, the receiver must fail closed on rotated-key links and route the delegation back to its origin for re-issuance with an explicit new scope. ```python from dataclasses import dataclass from typing import Optional class AttestationChainError(RuntimeError): """Raised when a delegated attestation chain cannot be validly verified.""" @dataclass(frozen=True) class KeyInterval: key_id: str active_from: float revoked_at: Optional[float] # None == not revoked @dataclass(frozen=True) class Link: principal: str delegate: str scope: str signed_at: float expires_at: float signing_key_id: str signature: bytes def _key_active_at(intervals: list[KeyInterval], key_id: str, t: float) -> bool: for iv in intervals: if iv.key_id != key_id: continue if iv.active_from <= t and (iv.revoked_at is None or t < iv.revoked_at): return True return False def verify_link(link: Link, intervals: list[KeyInterval], now: float, signature_ok: bool) -> None: # Reject if the registry cannot express signing-time validity. if not intervals: raise AttestationChainError( "key registry exposes no validity intervals; cannot verify at signing time" ) if link.signed_at > now: raise AttestationChainError( f"link signed_at {link.signed_at} is in the future relative to now {now}" ) if link.expires_at <= now: raise AttestationChainError( f"link expired at {link.expires_at}, now {now}" ) if not _key_active_at(intervals, link.signing_key_id, link.signed_at): # This is the rotation boundary: key may be revoked *now* but was # active at signing time. If it was not active at signing time, reject. raise AttestationChainError( f"signing key {link.signing_key_id} was not active at signed_at " f"{link.signed_at}; refusing (do not fall back to re-signed substitute)" ) if not signature_ok: raise AttestationChainError( f"signature invalid for link {link.principal}->{link.delegate}" ) def verify_chain(chain: list[Link], intervals: list[KeyInterval], now: float, signatures_ok: list[bool]) -> None: if len(chain) != len(signatures_ok): raise AttestationChainError("signature vector length mismatch with chain") for link, ok in zip(chain, signatures_ok): verify_link(link, intervals, now, ok) ```