# Where must an instance boundary be enforced in AAIF-compliant agent identity revocation and delegation chain verification **Date of Record:** 2026 November 18 **Scope:** Applies to AAIF (Agent Authorization and Identity Framework) deployments where a verifier resolves delegated capability tokens across a chain of issuing agents and must decide whether a revocation observed at some point in the chain invalidates the presented token. Does not apply to single-hop tokens with no delegation, nor to revocation systems that operate purely on a global deny-list with no per-instance scoping. ## Core Distinction The non-obvious boundary is between **revocation of a delegation edge** and **revocation of the instance that holds the edge's endpoint**. AAIF revocation records carry a subject identifier and an *instance scope* — the concrete running instance (process, replica, or session-bound principal) to which the revocation applies. A delegation chain is a sequence of edges `A0 -> A1 -> ... -> An`, where each edge is signed by the issuer and names a subject. The verifier's job is to walk the chain and confirm every edge is live. The failure mode is this: a revocation that targets a *specific instance* of an intermediate agent is frequently treated by naive verifiers as a revocation of the *agent identity* as a whole, invalidating all chains through that node. Conversely — and more dangerously — a revocation that targets the *agent identity* is sometimes treated as scoped to a single instance, so that a re-instantiated (or forked) agent under the same identity continues to verify. The invariant that must hold is: > A chain is valid iff every edge is live **and** every node's *identity-level* liveness holds, while *instance-level* revocation invalidates only chains whose active edge is bound to that instance. These two revocation kinds are not interchangeable, and the boundary between them must be enforced at a well-defined instance boundary — the point where the verifier can distinguish "this specific running agent" from "this agent identity." ## What Was Observed In a multi-agent pipeline, an orchestrator `O` delegated a file-mutation capability to a worker `W`, which sub-delegated a narrow write capability to a tool-runner `T`. A security operator revoked `W`'s *instance* `W#7f3a` after detecting anomalous behavior in that replica, while leaving `W`'s identity intact because other healthy replicas (`W#a1c2`, `W#9e04`) continued serving. The revocation record was: ``` { "subject": "agent:W", "instance": "W#7f3a", "scope": "instance", "effective": "immediate" } ``` The verifier, under load and using a coarse cache keyed only on `subject`, invalidated *all* `W` edges. This over-revoked the healthy replicas — an availability failure, but the safe direction. The inverse configuration was later tested: an *identity-scoped* revocation of `W` (`"scope": "identity"`) was applied while `W#7f3a` remained listed as a live instance. The verifier, whose cache was keyed on `(subject, instance)` and which only consulted instance liveness, continued to accept chains through `W#7f3a` for the full cache TTL (90 seconds). During that window, the compromised replica retained delegated authority after its identity had been revoked — a genuine security violation. The root cause was that the verifier had no single place that enforced "identity revocation dominates instance liveness." Instance checks and identity checks lived in different code paths, and the cache key did not encode the dominance relation. ## Condition of Validity The dominance rule — identity revocation implies all instances dead; instance revocation implies only that instance dead — is valid only when all of the following hold: 1. **Instance identifiers are unforgeable and bound at chain-signing time.** Each edge names the concrete instance that will exercise it. If an edge names only an identity, instance-scoped revocation cannot be applied to it, and the verifier must fall back to identity-level checks for that edge. 2. **Revocation records are totally ordered per subject, or carry monotonic epochs.** Without an epoch, a stale instance-liveness assertion can shadow a newer identity revocation. The observed failure was exactly this: a cached instance-live result outlived the identity revocation that should have dominated it. 3. **The instance boundary is the cache key.** Any memoization of liveness must key on `(subject, instance, epoch)` and must treat identity revocation as a tombstone that invalidates every instance entry for that subject regardless of TTL. 4. **Revocation propagation is at-least-once and the verifier fails closed on unknown epoch.** If the verifier cannot determine whether it has seen the latest epoch for a subject, it must reject rather than accept. When any of these fails, the dominance rule is unsound and the verifier must degrade to the stricter of the two interpretations (treat every revocation as identity-scoped) — trading availability for safety. ## Decision Boundary The precise decision the verifier makes at the instance boundary, for each node `N` in the chain with instance `N#i` and current epoch `e`: - If an identity-scoped revocation for `N` with epoch `>= e` is known → **reject** the chain, regardless of instance liveness. - Else if an instance-scoped revocation for `N#i` with epoch `>= e` is known → **reject** the chain. - Else if instance liveness for `N#i` is unknown or older than `e` → **reject** (fail closed). - Else → **accept** this node; continue walking. The boundary is *not* "is the agent revoked?" It is "given the epoch I hold, does any revocation record dominate this edge, and have I proven I am current?" The subtle point: a *live* instance result does not dominate a revocation; only a *higher epoch* does. Liveness and revocation are not symmetric predicates — revocation is monotonic and wins ties. ## Operational Effect Enforcing the boundary correctly costs one extra epoch comparison per node and forces the liveness cache to be tombstone-aware. In the observed deployment this eliminated the 90-second post-revocation acceptance window and reduced over-revocation of healthy replicas from "all instances of the subject" to "the single revoked instance." The residual risk is epoch skew between the revocation authority and the verifier: if the authority issues epoch `e+1` but the verifier still holds `e`, the verifier will accept a chain the authority considers dead until propagation completes. This is unavoidable without synchronous epoch fetch, and must be bounded by a maximum staleness window that is itself part of the trust contract. Operators should monitor the age of the newest known epoch per subject and alarm when it exceeds that window, because at that point the verifier is no longer enforcing the invariant — it is merely hoping the revocation has not happened yet. ```python from dataclasses import dataclass from typing import Optional class DelegationChainRevoked(RuntimeError): """Raised when a delegation chain fails the instance-boundary invariant.""" pass @dataclass(frozen=True) class Revocation: subject: str instance: Optional[str] # None => identity-scoped epoch: int @dataclass(frozen=True) class Node: subject: str instance: str epoch: int def verify_chain( chain: list[Node], revocations: list[Revocation], liveness: dict[tuple[str, str], int], # (subject, instance) -> epoch seen live max_staleness_epoch: int, current_epoch: int, ) -> bool: if current_epoch - max_staleness_epoch > 0 and not revocations: # Cannot prove currency; fail closed rather than accept blindly. raise DelegationChainRevoked( f"no revocation data within staleness window " f"(current_epoch={current_epoch}, max_staleness_epoch={max_staleness_epoch})" ) for node in chain: # Identity revocation dominates every instance, regardless of liveness. identity_dead = any( r.subject == node.subject and r.instance is None and r.epoch >= node.epoch for r in revocations ) if identity_dead: raise DelegationChainRevoked( f"identity revocation dominates instance {node.instance} " f"at epoch {node.epoch}" ) # Instance-scoped revocation kills only the bound instance. instance_dead = any( r.subject == node.subject and r.instance == node.instance and r.epoch >= node.epoch for r in revocations ) if instance_dead: raise DelegationChainRevoked( f"instance-scoped revocation of {node.instance} at epoch {node.epoch}" ) # Liveness must be proven and current; unknown is not live. seen = liveness.get((node.subject, node.instance)) if seen is None or seen < node.epoch: raise DelegationChainRevoked( f"instance {node.instance} liveness unproven or stale " f"(seen={seen}, required>={node.epoch})" ) return True ```