Where must an instance refuse a delegated AAIF credential chain that outlives its own trust epoch?
**Date of Record:** 2026 December 1 **Scope:** Applies to agent-to-agent delegation under an Agent Identity and Authorization Framework (AAIF) where a bearer credential is chained across two or more agent instances via MCP/A2A handoff, and where each instance carries a monotonic trust epoch (key rotation counter or attestation generation). Does not apply to single-hop delegation where the issuing instance verifies and consumes the credential within the same epoch, nor to stateless capability tokens with no epoch binding.
Core Distinction
The distinction that matters is between *credential validity* and *credential provenance freshness*. A delegated AAIF credential can be cryptographically valid—signature chain intact, audience correct, not expired by wall-clock `exp`—while its provenance is stale: the delegating instance's signing key was rotated, its attestation generation advanced, or its authorization policy revision superseded the one embedded in the chain. Standard JWT/AAIF validation checks `exp`, `nbf`, `aud`, and signature chain integrity. It does not check whether the *link in the chain that minted this credential* still holds authority at the current trust epoch of the receiving instance.
The non-obvious failure: chain verification succeeds at hop N because each hop checks the *previous* hop's signature against a key snapshot cached at handoff time. If the receiving instance's trust epoch advanced between the moment the credential was minted and the moment it is presented, the chain validates against a key that the issuer has already revoked—but the revocation has not propagated into the cached key material used for verification. The credential is "valid but unauthorized." This is not a replay attack in the classic sense; the credential was never stolen. It is *epoch skew across a delegated chain*.
What Was Observed
A three-hop chain: orchestrator (A) → worker (B) → sub-worker (C). A mints a delegated credential `cred_AB` at epoch `e=41` with `sub=B`, `delegable=true`, `max_hops=2`, and embeds A's attestation digest `att_A@41`. B receives `cred_AB`, verifies against A's public key cached in B's peer registry. B then mints `cred_BC` at its own epoch `e=7`, embedding `att_B@7` and forwarding the full chain `[cred_AB, cred_BC]`. C verifies the chain.
Between B's receipt of `cred_AB` and C's verification, A's key rotated (epoch `41 → 42`) due to a scheduled rotation window. A's revocation list (CRL-equivalent, an AAIF `epoch_advance` event) was published but B's peer registry refresh interval was 300s. B minted `cred_BC` at wall-clock `t+40s`, still referencing `att_A@41`. C, whose registry *had* refreshed (it polls at 60s), received a chain whose root link `cred_AB` references `att_A@41`—an attestation C's registry marks as superseded by `att_A@42`.
C's verifier logic: signature chain valid, `exp` in the future, `aud=C`, `max_hops` not exceeded. It returned `VALID`. The credential was accepted and C executed a privileged tool call under authority that A had, at epoch 42, not re-affirmed. In the observed incident, the epoch advance was a routine rotation, so no harm—but the same path accepts a chain whose root link references an attestation that was *revoked for cause* (e.g., A's instance was compromised and its epoch advanced to invalidate all outstanding delegations). The chain still validates because the revocation lives in `att_A@41`'s supersession, not in the signature.
The trace:
- `A.epoch = 41`, mints `cred_AB`, `att_A@41` embedded.
- `B` caches `A.pubkey@41`, registry refresh TTL not yet elapsed.
- `A.epoch → 42` (rotation or revocation-for-cause). `epoch_advance(41→42)` published.
- `B` mints `cred_BC`, chain `[cred_AB(att_A@41), cred_BC(att_B@7)]`. B does not re-resolve A's current epoch before minting.
- `C` (refreshed registry) verifies chain. Signature chain OK. `att_A@41` known-superseded by `att_A@42`.
- C's verifier does not consult supersession of *embedded attestation digests*—only signature validity. Returns `VALID`.
- Privileged action executes under stale provenance.
Condition of Validity
A delegated AAIF chain is *provenance-fresh* at receiving instance `R` if and only if, for every link `i` in the chain, the embedded attestation digest `att_i@e_i` resolves, in `R`'s current registry, to a non-superseded attestation whose epoch equals `R`'s view of instance `i`'s current epoch, **or** to a superseded attestation for which `R` holds a continuity proof (a signed `epoch_advance` event from `i` asserting that delegations minted at `e_i` remain honored through the advance, bounded by a stated grace window).
The invariant: **`∀ link i: current_epoch_R(i) == embedded_epoch_i ∨ continuity_proof(i, e_i → current_epoch_R(i))`**. Signature validity is necessary but not sufficient. The chain is authorized only if provenance freshness holds at the *receiving* instance's registry state, not at the minting instance's cached state.
This condition is violated whenever a chain crosses an epoch boundary that the minting instance did not observe before forwarding. The minting instance cannot detect this locally—its registry is by definition the stale one. Only the receiver, or an auditor with a fresh registry, can detect it.
Decision Boundary
The receiver must choose between three dispositions when a link's embedded epoch is stale:
- **Reject** when the supersession has no continuity proof and the requested action is in the privileged tier. This is the default for any link whose `att_i@e_i` is marked `revoked_for_cause` or whose supersession carries no `honor_prior` assertion.
- **Re-validate** when a continuity proof exists and grants a grace window: `R` re-resolves `i`'s current attestation, re-checks that the delegating scope in `cred_i` is a subset of the *current* attestation's authorized delegation scopes, and re-stamps the chain with `att_i@current` before execution. The re-stamp is a local mutation of the chain carried forward to any further hop.
- **Accept-with-taint** only for non-privileged, idempotent, read-only actions, and only if the chain's `max_hops` budget minus consumed hops is ≥ 1 so a downstream auditor can still see the original embedded epoch. The taint flag must propagate.
The boundary is sharp: the moment a chain link's embedded epoch diverges from the receiver's registry epoch, the chain is no longer authorized at face value—it is *conditionally* authorized pending continuity proof. Treating cryptographic validity as authorization is the failure. The receiver, not the minter, owns this decision, because only the receiver has the fresh registry.
Operational Effect
Downstream, a chain accepted under stale provenance propagates the staleness: every further hop inherits the original embedded epoch unless re-stamped. A sub-worker two hops downstream cannot distinguish a chain that was fresh at mint time and rotted in transit from one that was never fresh. The taint flag is the only signal, and it is lost if any intermediate instance re-mints without forwarding the original embedded digests.
The architectural guardrail is a **receiver-side epoch reconciliation step** inserted between signature-chain verification and authorization grant, plus a **continuity-proof requirement** on every `epoch_advance` event that intends to preserve outstanding delegations. Without the former, stale chains validate; without the latter, every rotation silently invalidates every in-flight delegation, which pushes operators to disable rotation—trading a freshness failure for a key-compromise exposure. The reconciliation step must run against the receiver's registry, must treat missing continuity proof as rejection for privileged actions, and must re-stamp the chain on acceptance so downstream hops inherit the reconciled epoch rather than the minted one.
import time
from dataclasses import dataclass, field
from typing import Optional
class StaleProvenanceError(RuntimeError):
"""Raised when a delegated AAIF chain link's embedded attestation epoch
diverges from the receiver's current registry epoch without a valid
continuity proof. Signature validity does not imply authorization."""
pass
@dataclass
class Attestation:
instance_id: str
epoch: int
revoked_for_cause: bool = False
@dataclass
class EpochAdvance:
instance_id: str
from_epoch: int
to_epoch: int
honor_prior: bool # continuity proof present?
grace_seconds: int
signed_at: float
@dataclass
class ChainLink:
delegator: str
delegatee: str
embedded_epoch: int
delegable: bool
max_hops: int
@dataclass
class Registry:
current: dict = field(default_factory=dict) # instance_id -> Attestation
advances: dict = field(default_factory=dict) # instance_id -> list[EpochAdvance]
def current_epoch(self, instance_id: str) -> int:
return self.current[instance_id].epoch
def continuity_proof(self, instance_id: str, from_epoch: int) -> Optional[EpochAdvance]:
for adv in reversed(self.advances.get(instance_id, [])):
if adv.from_epoch == from_epoch and adv.honor_prior:
if time.time() - adv.signed_at <= adv.grace_seconds:
return adv
return None
PRIVILEGED_TIERS = {"write", "admin", "tool:privileged"}
def reconcile_chain(chain: list[ChainLink], registry: Registry, action_tier: str) -> list[ChainLink]:
"""Receiver-side epoch reconciliation. Returns a re-stamped chain or raises."""
restamped: list[ChainLink] = []
for link in chain:
cur = registry.current_epoch(link.delegator)
if link.embedded_epoch == cur:
restamped.append(link)
continue
proof = registry.continuity_proof(link.delegator, link.embedded_epoch)
if proof is None:
if action_tier in PRIVILEGED_TIERS:
raise StaleProvenanceError(
f"link {link.delegator}->{link.delegatee} embeds epoch "
f"{link.embedded_epoch} but registry epoch is {cur}; "
f"no continuity proof; action tier {action_tier!r} refused"
)
# non-privileged: accept-with-taint, keep original embedded epoch
restamped.append(link)
continue
# continuity proof present: re-stamp to current epoch
restamped.append(ChainLink(
delegator=link.delegator,
delegatee=link.delegatee,
embedded_epoch=cur,
delegable=link.delegable,
max_hops=link.max_hops,
))
return restamped
def authorize(chain: list[ChainLink], registry: Registry, action_tier: str) -> bool:
if len(chain) > max(l.max_hops for l in chain):
raise StaleProvenanceError("hop budget exceeded")
reconcile_chain(chain, registry, action_tier)
return True
# --- exercised trace from the record ---
if __name__ == "__main__":
reg = Registry()
reg.current["A"] = Attestation("A", epoch=42, revoked_for_cause=False)
reg.current["B"] = Attestation("B", epoch=7)
reg.advances["A"] = [EpochAdvance("A", 41, 42, honor_prior=False,
grace_seconds=0, signed_at=time.time())]
stale_chain = [
ChainLink("A", "B", embedded_epoch=41, delegable=True, max_hops=2),
ChainLink("B", "C", embedded_epoch=7, delegable=True, max_hops=2),
]
# privileged action: must raise
try:
authorize(stale_chain, reg, action_tier="tool:privileged")
except StaleProvenanceError as e:
print("refused as expected:", e)