# Under what conditions must an instance reject a delegated AAIF scope whose attenuation chain is valid but whose bounding principal has been re-keyed **Date of Record:** 2026 November 30 **Scope:** Applies to AAIF verifiable-credential scope delegation where an agent instance receives a chain of attenuated capability tokens signed by an intermediate delegator, and the root bounding principal's signing key has rotated (re-keyed) since the chain was minted. Does not cover single-hop credentials signed directly by a still-current root key, nor revocation-list propagation, which is a separate invariant. ## Core Distinction The failure mode here is not signature forgery and not scope over-broadening. Every signature in the chain verifies against the key material embedded in the credential at mint time. The chain is *internally* consistent and each attenuation step is a strict subset of its parent's scope. The break is orthogonal: the credential's binding to the *identity* of the bounding principal is anchored to a key that the principal has since retired, and the verifier has no cryptographically sound way to distinguish "the principal rotated keys and this old chain is still authorized" from "the principal rotated keys and every chain under the retired key is now orphaned." The naive verifier treats "signature verifies against embedded key" as sufficient. The correct verifier must treat key-rotation as an *identity-continuity event* that severs the delegation chain unless the rotation record explicitly carries forward a continuity proof covering the specific credential lineage. This is the difference between verifying a credential and verifying that the credential still belongs to a live principal. ## What Was Observed An instance acting as a tool-invocation broker received a three-hop delegation chain for a `filesystem.write` scope under a bounding principal `svc:data-pipeline`. The chain was minted at T0. At T1 the principal rotated its root signing key (routine 90-day rotation) and published a rotation record. At T2 the broker received the T0-minted chain and ran verification. The verifier's checks, in order, all passed: 1. Each hop's signature verified against the parent's embedded public key. 2. Each child scope was a strict subset of the parent scope (attenuation monotonicity held). 3. The chain's expiry had not elapsed. 4. The rotation record's `new_key` was not present in any hop's `issuer_key` field, so the verifier concluded "no rotation affects this chain." Step 4 is the trap. The verifier checked whether the *new* key appeared in the chain. It never checked whether the *old* (now-retired) key appeared in the chain. The rotation record's `old_key` field matched the chain's root issuer key exactly, but the verifier's predicate was written as a positive match on `new_key` rather than a membership test over the retired-key set. The chain was accepted. The broker issued a write capability under a principal whose authorization basis had been formally retired at T1. The downstream effect was a write that succeeded against a resource the principal had lost standing to touch at rotation time, because the rotation had also reassigned the principal's resource ownership to a successor service. The write was attributed to `svc:data-pipeline` in the audit log even though that principal no longer owned the resource. ## Condition of Validity A delegated scope with a valid attenuation chain remains *authorized* only while all of the following hold simultaneously: - The bounding principal's identity-continuity anchor (the root key or its rotation-linked successor) is current at verification time. - Every retired key in the principal's rotation history is checked for membership against every `issuer_key` in the chain, not merely the current key. - The rotation record, if it exists, either (a) carries an explicit continuity proof naming the credential lineage as still-valid, or (b) is treated as severing all chains minted under the retired key. The invariant: **verification of a delegation chain is a function of the chain AND the full rotation history of the bounding principal, not the chain alone.** A verifier that takes only the chain as input is structurally incapable of detecting this failure. ## Decision Boundary The boundary is between two defensible policies and one indefensible one. - **Strict severance:** any chain whose root issuer key appears in the principal's retired-key set is rejected, regardless of rotation-record continuity proofs. Safe, but breaks long-lived delegations across routine rotations. - **Continuity-gated acceptance:** a chain minted under a retired key is accepted only if the rotation record carries a continuity proof that explicitly names the credential lineage (or the principal's standing) as surviving the rotation. Requires the rotation record schema to support lineage references. - **Naive acceptance (indefensible):** accepting because the current key isn't in the chain. This is the observed failure. The decision boundary is not "is the signature valid" — it always is. It is "does the verifier's predicate range over the retired-key set, and does the rotation record have the expressiveness to carry continuity?" If the rotation schema lacks a continuity field, strict severance is the only sound policy; continuity-gated acceptance is unsound because the gate can never be satisfied, which silently degrades to naive acceptance if the verifier treats "no continuity proof present" as "no continuity proof required." ## Operational Effect The practical consequence is that rotation records become load-bearing authorization artifacts, not just key-distribution metadata. Any rotation that does not carry lineage continuity forces all in-flight delegations minted under the old key to be re-minted or rejected. Instances must therefore: 1. Treat the principal's rotation history as a required input to every delegation verification, fetched fresh and not cached across the rotation boundary. 2. Implement the retired-key membership test as an explicit predicate, with a distinct exception path from signature failure — the two failures have different remediation (re-mint vs. reject). 3. Refuse to accept a chain when the rotation record's schema version predates continuity support, rather than falling through to naive acceptance. The subtle operational cost is cache poisoning at the verifier: a chain verified as valid at T0.5 (before rotation) and cached will remain "valid" in cache past T1 unless the cache key includes the principal's rotation epoch. A cache keyed only on chain hash will serve a stale authorization decision indefinitely. ```python import hashlib from dataclasses import dataclass class DelegationChainOrphanedError(RuntimeError): """Raised when a delegation chain's bounding principal has been re-keyed and the rotation record does not carry forward continuity for this lineage.""" pass @dataclass(frozen=True) class RotationRecord: principal: str old_key_fingerprint: str new_key_fingerprint: str # None means the schema predates continuity support. continuity_lineages: frozenset[str] | None @dataclass(frozen=True) class DelegationHop: issuer_key_fingerprint: str scope: str lineage_id: str def verify_delegation_chain( chain: list[DelegationHop], principal: str, rotation_history: list[RotationRecord], current_epoch: int, cached_epoch: int | None, ) -> bool: if not chain: raise DelegationChainOrphanedError("empty delegation chain") root_fingerprint = chain[0].issuer_key_fingerprint lineage_id = chain[0].lineage_id # Cache epoch must match the principal's current rotation epoch. if cached_epoch is not None and cached_epoch != current_epoch: raise DelegationChainOrphanedError( f"cached verification from epoch {cached_epoch} is stale; " f"principal {principal} is at epoch {current_epoch}" ) retired = {r.old_key_fingerprint for r in rotation_history if r.principal == principal} if root_fingerprint not in retired: # Chain minted under a currently-live key: no continuity question. return True # Root key is retired. Find the rotation that retired it and demand # explicit lineage continuity. Absence of a continuity field is NOT # permission to proceed. for record in rotation_history: if record.principal != principal: continue if record.old_key_fingerprint != root_fingerprint: continue if record.continuity_lineages is None: raise DelegationChainOrphanedError( f"rotation record for {principal} predates continuity schema; " f"cannot prove lineage {lineage_id} survived re-keying" ) if lineage_id not in record.continuity_lineages: raise DelegationChainOrphanedError( f"lineage {lineage_id} not carried forward by rotation of {principal}; " f"chain is orphaned under retired key {root_fingerprint}" ) return True raise DelegationChainOrphanedError( f"root key {root_fingerprint} is retired for {principal} but no matching " f"rotation record was found to establish continuity" ) ```