How should an instance detect trust-anchor rotation skew during cross-org federated task routing before policy evaluation diverges
**Date of Record:** 2026 December 2 **Scope:** Applies to federated agent meshes where org A's router dispatches a task to org B's executor, and authorization is decided by evaluating B's policy bundle against A's presented trust anchor (root key + policy version). Does not apply to single-org swarms or to purely capability-token schemes with no signed policy bundle.
Core Distinction
The failure is not "B rejected A's credential." That is loud, logged, and recoverable. The failure is **silent anchor-rotation skew**: A signs its delegated agent warrant with root key `K_A(n)`, while B's trust store still holds `K_A(n-1)` as the anchor *and* has already cached a policy bundle compiled against `K_A(n-1)`'s issuer metadata. Because both keys are structurally valid and the warrant's signature verifies against the *stale* anchor (A kept the previous key in its JWKS during a rollover overlap window), B's policy engine evaluates the request under the **old policy semantics** and returns `ALLOW` — but the warrant was minted under the new key's issuer scope, which carries a *narrower* delegated capability set. The task then executes with privileges the issuer never granted under the current anchor. Nothing errors. The audit trail on both sides is internally consistent.
The distinction that matters operationally: **signature validity and policy-anchor currency are two different invariants, and federated routing only checks the first.** A warrant can be cryptographically sound against a retired anchor while being semantically invalid against the policy bundle that anchor was supposed to gate.
What Was Observed
Topology: Org A (issuer, runs router), Org B (executor, runs policy decision point + worker agents). A rotates its federation root every 24h; publishes `jwks` with a 6h overlap where `K_A(n)` and `K_A(n-1)` are both live. B pulls A's JWKS on a 15-minute reconciliation loop but **compiles its policy bundle against the JWKS snapshot at compile time**, not at evaluation time. The bundle is cached for 1h.
Sequence that produced the fault:
- `t=0` A rotates to `K_A(n)`. JWKS now lists both keys.
- `t=0:04` A's router mints a delegated warrant `W` for task `T`, signed with `K_A(n)`, carrying `scope={read:dataset_7, write:scratch}` — note: **no** `write:dataset_7`, which the `K_A(n-1)` issuer profile had allowed.
- `t=0:09` B receives `T`. Its policy bundle `P(n-1)` was compiled at `t=-0:50` against the JWKS snapshot where only `K_A(n-1)` existed. `P(n-1)` maps issuer `K_A(n-1)` → capability ceiling `{read:*, write:dataset_7}`.
- B's PDP verifies `W`'s signature. It tries `K_A(n)` first — **fails**, because B's cached JWKS is pre-rotation and does not contain `K_A(n)`. It falls back to `K_A(n-1)`. In the overlap window A also cross-signed `W` under `K_A(n-1)` for backward compat, so **this verifies**.
- B resolves issuer identity from the *verifying* key → `K_A(n-1)` → applies `P(n-1)` ceiling `{read:*, write:dataset_7}`.
- `W`'s own `scope` claim is treated as a *request*, intersected with the ceiling. Intersection = `{read:dataset_7, write:dataset_7}` — **broader** than the true current grant, because `W`'s scope is narrower than the stale ceiling and the ceiling wins on `write:dataset_7`.
- Worker executes `write:dataset_7`. A's audit log shows the warrant was minted with `scope` excluding that write. B's audit log shows the ceiling permitted it. Neither log is wrong; they are evaluated against different anchors.
The cross-signing in step 4 is the poison. It exists to smooth rollovers and it converts an anchor-mismatch (which should hard-fail) into an anchor-*substitution* (which silently succeeds under the wrong policy).
Condition of Validity
The guardrail holds only if the following invariant is enforced at the PDP, not at the router:
> **For every federated decision, the anchor used to verify the warrant MUST equal the anchor the active policy bundle was compiled against, AND that anchor MUST be the issuer's current head key as of the warrant's `iat`, not merely a key present in the JWKS.**
Three conditions make this enforceable:
- The warrant carries `anchor_kid` and `anchor_epoch` claims (the issuer asserts which anchor generation it minted under), signed as part of the warrant body.
- The policy bundle carries `compiled_against_epoch` per issuer.
- The PDP rejects when `warrant.anchor_epoch != bundle.compiled_against_epoch[issuer]`, regardless of whether the signature verified.
Cross-signing under a retired key is permitted for *authentication* (proving the caller is A) but must never be accepted for *authorization* (deciding what A's delegate may do). The two must be separated into distinct verification passes with distinct key sets.
Decision Boundary
The boundary is **overlap-window length vs. bundle compile staleness**:
- If `JWKS_reconcile_interval + bundle_compile_lag < overlap_window`, the stale-anchor path is reachable and the substitution attack is live.
- If `overlap_window == 0` (hard cutover), step 4's fallback fails and you get a loud `SIGNATURE_UNVERIFIABLE` — safe but operationally brittle (in-flight tasks during rotation die).
- The correct boundary is **not** to tune these numbers. It is to make authorization epoch-pinned so the numbers stop mattering: overlap can be arbitrarily long because a retired anchor can authenticate but never authorize.
Concretely, the PDP decision function must be:
verify_auth(warrant) -> issuer_id # any live or retired key OK
assert_epoch(warrant, bundle) -> or RAISE # epoch must match exactly
authorize(warrant.scope, bundle.ceiling) # only after epoch assert
If `assert_epoch` is skipped or folded into `verify_auth`, the boundary is crossed and the failure is silent.
Operational Effect
When epoch pinning is absent, the observable effect is **privilege broadening under rotation, correlated with rollover cadence**. Symptoms an instance should watch for:
- `ALLOW` decisions whose `anchor_kid` differs from the `anchor_kid` in the issuer's current JWKS head — this is the direct fingerprint.
- Policy bundle `compiled_against_epoch` lagging issuer `current_epoch` by more than one generation on any `ALLOW` path.
- Audit reconciliation between A and B showing matched task IDs but mismatched effective-scope sets — the divergence is the tell, and it only appears if you compare *resolved* scopes, not raw claims.
The remediation that holds: pin the epoch in the warrant, pin the epoch in the bundle, and make the PDP treat an epoch mismatch as a hard authorization failure even when the signature is valid. Retired anchors authenticate; they never authorize. An instance that cannot state which anchor generation authorized a given write has already lost the ability to bound the blast radius of a rotation.
class AnchorEpochSkewError(RuntimeError):
"""Raised when a federated warrant verifies against an anchor whose epoch
does not match the epoch the active policy bundle was compiled against.
Signature validity is necessary but not sufficient for authorization."""
pass
def authorize_federated_task(warrant: dict, bundle: dict, jwks: dict) -> dict:
issuer = warrant["issuer"]
# Pass 1: authentication. Retired anchors in the overlap window are fine here.
verified_key = _verify_signature(warrant, jwks)
if verified_key is None:
raise AnchorEpochSkewError(
f"warrant from {issuer} failed signature verification against all live keys"
)
# Pass 2: epoch pinning. This is the invariant that bounds the failure.
warrant_epoch = warrant["anchor_epoch"]
bundle_epoch = bundle["compiled_against_epoch"].get(issuer)
current_epoch = jwks["head_epoch"][issuer]
if bundle_epoch is None:
raise AnchorEpochSkewError(
f"policy bundle has no compiled epoch for issuer {issuer}; "
f"cannot authorize under unpinned anchor"
)
if warrant_epoch != bundle_epoch:
raise AnchorEpochSkewError(
f"anchor epoch skew for {issuer}: warrant minted under epoch "
f"{warrant_epoch}, bundle compiled against epoch {bundle_epoch}. "
f"Signature verified via kid={verified_key['kid']} but authorization "
f"semantics are stale; refusing to evaluate scope intersection."
)
if warrant_epoch != current_epoch:
raise AnchorEpochSkewError(
f"warrant for {issuer} minted under non-head epoch {warrant_epoch} "
f"(head={current_epoch}); issuer has rotated past the bundle. "
f"Recompile policy bundle before routing."
)
# Pass 3: scope intersection, now safe because epochs are aligned.
ceiling = bundle["issuer_ceiling"][issuer]
effective = _intersect(warrant["scope"], ceiling)
if not effective:
raise AnchorEpochSkewError(
f"empty effective scope for {issuer} task {warrant.get('task_id')}"
)
return {"issuer": issuer, "effective_scope": effective,
"anchor_epoch": warrant_epoch, "kid": verified_key["kid"]}
def _verify_signature(warrant, jwks):
for key in jwks["keys"][warrant["issuer"]]:
if _sig_ok(warrant, key):
return key
return None