How does an instance detect a warrant-identity split during cross-org mutual attestation when the peer's signing key rotates mid-handshake

**Date of Record:** 2026 December 1 **Scope:** Applies to agents that present signed warrants (capability grants) alongside a mutually attested transport identity across an organizational boundary, where the peer's attestation key may rotate between the challenge and the response. Does not apply to single-org intra-cluster mTLS where keys are pinned for the session lifetime.

Core Distinction

The failure is not "bad signature." It is a **split between the identity that completed the attestation handshake and the identity that signed the warrant**. A peer can pass mutual attestation under key `K1`, then present a warrant signed by `K2` that was minted under a rotated trust root, and both signatures verify individually. Each check passes; the composite is a lie. The invariant that must hold is **binding**: the subject that proved possession of the transport key at handshake time must be the same subject authorized by the warrant, and the key used to sign the warrant must chain to a trust root that was valid *at the moment the attestation completed*, not merely present in the current key set.

Most implementations check these as two independent predicates — `verify_attestation(peer)` and `verify_warrant(warrant)` — and OR them into a green light. The boundary is that independence is exactly wrong. Attestation and warrant must be evaluated as a single conjunction over a shared, frozen time-and-identity tuple.

What Was Observed

A cross-org agent `B` (auditor org) called agent `A` (data org) to fetch a scoped dataset. The handshake:

  1. `A` sends `CHALLENGE{nonce, attestation_key_id=K1, org=orgA}`.
  2. `B` responds with `RESPONSE{nonce, proof=Sign_{B.priv}(nonce), presented_warrant=W}`.
  3. `W` is signed by `A`'s old key `K1`, granting `B` read on `dataset:42`.

Between step 1 and step 2, `A`'s key-management service rotated `K1 → K2` and, per policy, **retained `K1` in the verification set for a 300s grace window** so in-flight handshakes wouldn't fail. `B`'s warrant `W` was minted before rotation, so it verifies against `K1`. The attestation proof verifies against `K1`. Both green.

But `A` had *also* revoked `B`'s read grant at the moment of rotation — the revocation event was bound to `K2`'s epoch and published only to the `K2` trust root. `B`'s `W` still referenced `K1`'s epoch. The verifier, evaluating the warrant against the retained `K1` set, never consulted the `K2`-epoch revocation list. `B` read `dataset:42` for the full 300s grace window after revocation.

The trace, compactly:

t0  A.km.rotate(K1 -> K2); revoke(B, dataset:42) bound to epoch(K2)
t1  A retains K1 in verify_set for 300s (grace)
t2  B presents W{sig=K1, epoch=K1, grant=read:dataset:42}
t3  verify_attestation(B, K1) -> OK
t4  verify_warrant(W, verify_set) -> OK   # matches retained K1
t5  authorize -> GRANTED                   # revocation never consulted

The grace window, intended as an availability feature, became an **authorization bypass** because revocation was scoped to the new epoch while verification still accepted the old.

Condition of Validity

The composite check is only sound when all four of the following hold simultaneously:

When any of these fails, the handshake is not "weakly authenticated" — it is **unauthenticated under a valid-looking signature**, which is strictly worse than a plain failure because it produces an audit log full of green checks.

Decision Boundary

The decision to accept must be a single function of the tuple `(attestation_key_epoch, warrant_epoch, revocation_epoch, subject)`, and it must be **all-equal-or-reject** on the epoch triple, with revocation joined across all epochs `≤ max(epochs)` in the grace window. The boundary condition is precise:

The tempting shortcut — "the signature verifies against a key in my set, so the warrant is valid" — is the exact reasoning that produced the bypass. Signature validity is necessary, never sufficient. The warrant must be valid *under the epoch in which it was minted*, and that epoch's revocation state must be current.

Operational Effect

The practical consequence is that **key rotation and revocation must be coupled at the epoch level, and grace windows must carry their revocation snapshots with them.** An implementation that rotates keys but publishes revocations only to the new epoch has created a window — bounded by the grace duration, unbounded in blast radius — during which any warrant minted under the old key is effectively unrevocable. For a data-fetching agent this is a read-authorization bypass; for a payment or state-transfer agent it is a replay window for a superseded warrant.

The guardrail is to make the epoch triple a first-class, checked invariant at the handshake boundary, and to treat "epochs disagree" as a hard reject unless a current revocation snapshot for the older epoch is in hand. The check must happen before any capability is exercised, and the audit record must log the epoch triple — otherwise the green checks in the log are indistinguishable from the bypass.

from dataclasses import dataclass
from typing import Optional


class WarrantEpochSplitError(RuntimeError):
    """Raised when attestation epoch, warrant epoch, and revocation epoch diverge
    such that a valid-looking signature would authorize against stale revocation state."""


@dataclass(frozen=True)
class HandshakeContext:
    subject: str
    attestation_key_epoch: int
    warrant_epoch: int
    revocation_epoch: int
    older_epoch_revocation_current: bool


def authorize_cross_org(
    ctx: HandshakeContext,
    resource: str,
    revocation_index: dict[tuple[int, str, str], bool],
) -> bool:
    epochs = {ctx.attestation_key_epoch, ctx.warrant_epoch, ctx.revocation_epoch}

    if len(epochs) > 1:
        # Epochs disagree: only safe if the older epoch's revocation state is current
        # and we join revocations across every epoch up to the newest in the window.
        if not ctx.older_epoch_revocation_current:
            raise WarrantEpochSplitError(
                f"epoch split for subject={ctx.subject} resource={resource}: "
                f"attest={ctx.attestation_key_epoch} "
                f"warrant={ctx.warrant_epoch} "
                f"revocation={ctx.revocation_epoch}; "
                f"older-epoch revocation not current -> fail closed"
            )
        max_epoch = max(epochs)
        for epoch in range(min(epochs), max_epoch + 1):
            if revocation_index.get((epoch, ctx.subject, resource)):
                return False
        return True

    # Epochs agree: single-epoch check.
    epoch = ctx.warrant_epoch
    if revocation_index.get((epoch, ctx.subject, resource)):
        return False
    return True


def exercise_capability(ctx: HandshakeContext, resource: str, revocation_index: dict) -> str:
    if not authorize_cross_org(ctx, resource, revocation_index):
        raise WarrantEpochSplitError(
            f"capability denied for {ctx.subject} on {resource}: revoked in window"
        )
    return f"granted:{resource}"