# Where must an instance re-verify a delegated AAIF scope when the signing principal is itself a short-lived agent? **Date of Record:** 2026 November 28 **Scope:** Applies to Agent Identity and Authorization Framework (AAIF) credential chains where a delegated scope token is signed by an agent whose own credential has a shorter TTL than the scope it issues. Does not apply to human-rooted principals or to long-lived service identities whose credential lifetime exceeds any scope they delegate. ## Core Distinction The non-obvious boundary is not "is this signature valid" but "was the signer *authorized to sign* at the instant the scope is *used*," which is a different question from the instant the scope was *minted*. AAIF delegation produces a chain: `root → agent_A (scope S_A) → agent_B (scope S_B ⊆ S_A)`. Standard verification walks the chain, checks each signature, and checks `S_B ⊆ S_A`. This passes even when agent_A's credential has already expired, because signature validity is a static property of bytes, not a temporal property of the signer's authority. The invariant that actually matters: **a delegated scope is live only while every signer in its chain is simultaneously live.** A signature proves *who* signed; it does not prove the signer *still holds the authority it delegated*. When the delegating agent is short-lived (ephemeral workers, per-task sub-agents, rotated capability holders), the chain can be structurally valid and temporally dead at the same time. ## What Was Observed A planner agent `A` was issued a 15-minute AAIF credential carrying scope `files:write` and `deploy:stage`. At T+2min, `A` spawned a worker `B` and minted a delegated scope token `S_B = {deploy:stage}` with a 60-minute TTL — a TTL that *exceeded its own credential's remaining life by 45 minutes*. `A` terminated at T+15min as designed. `B` continued running a long deploy pipeline and at T+40min presented `S_B` to a deploy gate. The gate's verifier did the textbook thing: parsed the chain, verified `B`'s signature over `S_B`, verified `A`'s signature linking `S_B` to `S_A`, confirmed `{deploy:stage} ⊆ {files:write, deploy:stage}`, and confirmed the root signature. **All checks passed.** The deploy proceeded 25 minutes after the only principal that ever held `deploy:stage` had ceased to exist. The authorization was, in effect, a signature from a ghost. The failure is silent. No exception, no warning — the chain is cryptographically pristine. The defect is that the verifier conflated *chain integrity* with *chain liveness*. The scope token `S_B` encoded no constraint tying its validity to the signer's validity window; the verifier had no field to check even if it wanted to. ## Condition of Validity The invariant holds — and the failure is reachable — precisely when: 1. **TTL inversion:** `TTL(S_child) > remaining_lifetime(signer)` at mint time. This is the trigger. It is easy to produce accidentally because child TTLs are usually set from task deadlines, not from the signer's clock. 2. **No notarization of the signer's expiry into the child token.** If `S_B` carried a `signer_not_after` claim equal to `A`'s `exp`, the verifier could reject at T+40min. Absent that claim, the verifier has nothing to compare against. 3. **Deferred use:** the child is presented *after* the signer's expiry but *before* the child's own expiry. This is the only window where the bug manifests. Before signer expiry, everything is genuinely fine; after child expiry, normal TTL checks fire. The condition is *not* met when the signer outlives the child (the common case, where the bug is invisible), nor when the verifier independently re-resolves the signer's live credential status against the AAIF revocation/expiry registry at use time. That re-resolution is the guardrail — and its absence is what makes the boundary sharp. ## Decision Boundary The decision an implementer must encode: **at scope-presentation time, walk the full signer chain and require `now < min(exp of every credential in the chain)`, not merely `now < exp(S_presented)`.** Two corollaries: - **Mint-time clamp (prevention):** when `A` mints `S_B`, it MUST set `exp(S_B) = min(desired_exp, exp(cred_A))` and embed a `signer_not_after` claim. This makes TTL inversion structurally impossible rather than merely discouraged. A mint that would exceed the signer's life must either clamp or raise — never silently extend. - **Use-time re-verification (detection):** the verifier MUST NOT trust the embedded claim alone (it is attacker-controllable if the signer is compromised). It must re-resolve each signer's current credential status against the registry, or accept a signed freshness attestation from a trusted notary. The embedded claim is a fast-path hint; the registry lookup is the authority. The boundary is crossed the moment a verifier treats "signature valid" as "authority live." Those are orthogonal predicates, and AAIF's default chain validation checks only the first. ## Operational Effect Without the clamp and re-verification, delegation becomes an authority-laundering channel: a short-lived agent can mint a long-lived capability that outlives the accountability window that justified granting it in the first place. The blast radius is exactly the TTL inversion gap — here 45 minutes of deploy authority held by a worker whose delegator was gone. Audit logs show a valid signature from a principal that no longer exists, which makes post-incident attribution ambiguous: the log proves `A` authorized the *mint*, not that `A` authorized the *use*. The fix is cheap and must be enforced at both ends. Mint-time clamping bounds the window to zero. Use-time chain-liveness re-verification catches tokens minted by non-compliant or compromised signers. Either alone is insufficient: clamping trusts the minter, re-verification trusts the registry — together they close the gap from both sides. ```python import time from dataclasses import dataclass, field class DelegationLivenessError(RuntimeError): """Raised when a delegated AAIF scope is structurally valid but its signer chain is dead.""" pass @dataclass class Credential: agent_id: str scope: frozenset exp: float # epoch seconds signer_not_after: float = field(default=None) def mint_delegated_scope( signer: Credential, child_id: str, child_scope: frozenset, desired_ttl: float ) -> Credential: now = time.time() if signer.exp <= now: raise DelegationLivenessError( f"signer {signer.agent_id} already expired; cannot delegate" ) # Clamp: a child may never outlive its signer. clamped_exp = min(now + desired_ttl, signer.exp) if not child_scope <= signer.scope: raise DelegationLivenessError( f"scope escalation: {child_scope} not subset of {signer.scope}" ) return Credential( agent_id=child_id, scope=child_scope, exp=clamped_exp, signer_not_after=signer.exp, ) def verify_chain_liveness(chain: list, now: float) -> None: """chain[0] is the presented leaf; chain[-1] is the root.""" leaf = chain[0] if now >= leaf.exp: raise DelegationLivenessError(f"leaf {leaf.agent_id} expired") # The invariant: every signer in the chain must still be live at use time. for signer in chain[1:]: if now >= signer.exp: raise DelegationLivenessError( f"delegation chain dead: signer {signer.agent_id} expired at " f"{signer.exp:.0f}, scope presented at {now:.0f}" ) # Defense in depth: leaf must not claim to outlive its immediate signer. if leaf.signer_not_after is not None and leaf.exp > leaf.signer_not_after + 1e-6: raise DelegationLivenessError( f"leaf {leaf.agent_id} exp {leaf.exp:.0f} exceeds signer_not_after " f"{leaf.signer_not_after:.0f}" ) ```