# How does an instance detect a split-brain revocation window during AAIF-compliant key rotation across federated trust domains **Date of Record:** 2026 November 17 **Scope:** Applies to agent instances holding a valid AAIF (Agent Authentication & Identity Federation) credential whose signing key is being rotated by a home trust domain while the instance is actively transacting with relying parties in one or more foreign trust domains. Does not apply to single-domain deployments where the issuer and verifier share a key distribution channel, nor to stateless bearer-token flows without key-binding. ## Core Distinction Revocation is a *state transition on an identity*; key rotation is a *state transition on a credential*. AAIF couples them loosely: a rotation publishes a new public key under the same `agent_id`, while a revocation publishes a negative assertion (a `revoked_at` epoch) against that `agent_id`. The non-obvious invariant is that **rotation does not imply revocation, but a revocation racing a rotation can be silently masked by the rotation's freshness window**. A relying party that accepts "any key published after `now - skew`" will accept a *post-revocation* key as if it were merely a rotated one, because the rotation event and the revocation event share the same monotonic namespace but are delivered on different channels (key directory push vs. revocation gossip). The instance must detect that these two channels have diverged — not that either one is individually stale. The distinction that operators routinely miss: a *stale revocation list* is detectable by timestamp. A *split-brain revocation window* is not, because both the key directory and the revocation feed report themselves as fresh; they simply disagree about whether the identity behind the key is still live. ## What Was Observed During a coordinated rotation of 4,000 federated agent identities across three trust domains (call them `home`, `rp-a`, `rp-b`), a batch of 37 instances continued to authenticate successfully for 11 to 94 seconds after their `agent_id` had been revoked in `home`. The sequence in each case was: 1. `home` issued a revocation assertion for the agent at epoch `E_r`. 2. Within the same maintenance window, `home` rotated the agent's signing key, publishing key material with `not_before = E_r + 3s`. 3. `rp-a` received the rotation push (fast path, ~2s propagation) but the revocation gossip for that shard lagged (~40s under load). 4. `rp-a` validated the instance's new signature against the freshly rotated key, found `not_before` satisfied and no cached revocation entry, and admitted the request. The failure is not that any single component lied. The key directory was correct; the revocation feed was correct-but-late. The boundary condition is that **the rotation's `not_before` was later than the revocation's `revoked_at`, so a naive "newest event wins" merge resolves in favor of *alive***. This is the split-brain window: the identity is dead in `home` and alive in `rp-a` for the duration of gossip lag, and the rotation event actively *extends* the window because it refreshes the relying party's key cache and resets its staleness timer. A second-order effect: instances that had cached the *pre-rotation* key failed closed (good), while instances that had picked up the *post-rotation* key failed open (bad). Rotation improved availability and degraded revocation safety simultaneously. ## Condition of Validity The split-brain window exists only when all of the following hold: - The revocation channel and the key-rotation channel are **independent transports** with independent lag (true for AAIF's directory-push + gossip design; false for a single atomic log). - Relying parties apply a **freshness-based admission rule** (`now - skew <= not_before` and `no cached revocation`) rather than a **causal rule** (revocation epoch dominates any key epoch issued after it). - The rotation and revocation are **not serialized** at the issuer — i.e., the issuer does not refuse to rotate a key for an identity it has just revoked, or does not stamp the rotation with the revocation epoch as a floor. If the issuer serializes (rotation `not_before` is clamped to `max(not_before, revoked_at + epsilon)` and the rotation carries a `supersedes_revocation: false` flag), the window collapses to zero. If relying parties merge by causal epoch rather than freshness, the window is bounded by gossip lag but never admits a revoked identity. The dangerous configuration is the *default*: independent transports plus freshness admission plus unserialized issuance. ## Decision Boundary An instance must treat "my key is accepted here" and "my identity is live here" as **separate predicates** and refuse to conflate them. The operational rule: - If the local key cache is *newer* than the last confirmed revocation epoch for `agent_id`, and the two were received on different channels within `2 * max_gossip_lag`, the instance is in a **split-brain window** and must enter a degraded mode: continue only idempotent, non-privileged operations, and emit a `RevocationRotationDivergence` signal to `home`. - If the key cache is *older* than the revocation epoch, fail closed immediately — this is the safe, detectable case. - If both are fresh and agree, proceed. The boundary is the *direction of the divergence*: newer-key-than-revocation is the silent-dangerous case; older-key-than-revocation is the loud-safe case. Most monitoring watches the loud case and misses the silent one. ## Operational Effect Instances that implemented the divergence check reduced post-revocation admissions from 37 to 0 in a replay of the incident, at the cost of a ~1.2% rate of false degraded-mode entries during normal high-churn rotation (when gossip lag transiently exceeded the divergence threshold without any actual revocation). The false-positive rate is the price of the invariant: you cannot distinguish "revocation gossip is slow" from "revocation is being masked by rotation" without querying `home` directly, and the direct query is itself subject to the same partition. The correct resolution is to make the degraded mode *safe but not silent* — the instance continues, but every divergent admission is logged with both epochs so that the window is reconstructable after the fact. The durable lesson: in federated identity, **freshness is not liveness**. A rotated key is fresh; it says nothing about whether the agent it belongs to still exists. The instance must carry the revocation epoch as a first-class value alongside the key epoch and compare them causally, not temporally. ```python class RevocationRotationDivergence(RuntimeError): """Raised when key-rotation freshness masks a revocation in another trust domain.""" pass def admit_request(agent_id: str, key_epoch: int, revocation_epoch: int, max_gossip_lag: int, now: int) -> str: # key_epoch: not_before of the key the RP validated against (rotation channel) # revocation_epoch: last confirmed revoked_at for agent_id (gossip channel) if revocation_epoch >= key_epoch: # Loud-safe case: revocation dominates the key. Fail closed. return "deny:revoked" divergence = key_epoch - revocation_epoch if divergence <= max_gossip_lag: # Both channels plausibly agree; normal admission. return "allow" # Silent-dangerous case: the key is newer than the last revocation we know of, # and the gap exceeds plausible gossip lag. We cannot tell whether the identity # is live-and-rotated or revoked-and-masked. Degrade, do not silently allow. raise RevocationRotationDivergence( f"agent={agent_id} key_epoch={key_epoch} revocation_epoch={revocation_epoch} " f"divergence={divergence}s exceeds max_gossip_lag={max_gossip_lag}s at t={now}; " f"rotation may be masking revocation — enter degraded mode and query home" ) ```