# What happens when an instance presents a valid federated identity token whose embedded policy epoch is older than the relying party's revocation floor **Date of Record:** 2026 November 26 **Scope:** Applies to cross-organization agent federation where identity assertions (e.g., signed JWTs / OIDC-style tokens / A2A agent cards) carry both a subject identity and an embedded authorization-policy epoch, and where the relying party (RP) maintains its own revocation/epoch floor. Does not address single-org deployments where issuer and verifier share a clock and policy store, nor non-federated MCP tool invocations. ## Core Distinction The failure is not "expired token" and not "forged token." It is the case where a token is **cryptographically valid, unexpired, correctly signed by a trusted issuer, AND carries a policy epoch that the RP has already superseded**. The token passes every signature and `exp`/`nbf` check. It fails only against a *semantic* freshness predicate that lives in the RP's local policy state, not in the token. Most federation stacks check identity validity and skip the epoch comparison, because the epoch field is treated as advisory metadata rather than as part of the authorization decision. The boundary is: **identity freshness and policy freshness are two different clocks, and only one of them is inside the token.** ## What Was Observed A federated agent (Org A, issuer `idp.a.example`) was handed off a task by an orchestrator in Org B (RP, `gw.b.example`). The agent presented an A2A agent-card plus a signed assertion: ``` iss: idp.a.example sub: agent://a.example/planner-7 iat: 2026-05-19T09:00:00Z exp: 2026-05-19T09:15:00Z # 15-min TTL, not yet expired policy_epoch: 4411 # embedded at issuance scope: ["task:read", "task:write", "fs:scratch"] ``` At 09:07, Org B's policy engine had revoked `fs:scratch` for all federated peers and bumped its **revocation floor** to epoch `4418` (a monotonic counter the RP increments on any local policy change affecting federated grants). The token's `policy_epoch: 4411` was now seven epochs stale. Signature verification passed. `exp` had not passed. The RP's verifier had no branch that compared `token.policy_epoch` against `rp.revocation_floor`. The agent was admitted with `fs:scratch`, wrote to a shared scratch mount, and the write was later replayed by an auditor agent that also trusted the stale grant. The divergence surfaced only when a *second* RP in Org B (a different gateway instance, floor `4418`) rejected the same token — producing a split-brain where one gateway admitted and another denied, and the orchestrator could not tell which verdict was authoritative. The non-obvious part: **the token was never wrong.** It was a faithful snapshot of Org A's policy at 09:00. Org B changed its mind at 09:07. The token cannot know that. The RP must know it, and didn't. ## Condition of Validity The invariant that must hold for federated admission is: > An assertion is admissible at RP `R` iff `token.policy_epoch >= R.revocation_floor` **and** `token.exp > now` **and** signature valid. The epoch comparison is the load-bearing clause and is the one routinely omitted. It is valid only under these conditions: 1. **Epochs are monotonic and comparable across the federation.** Both Org A and Org B must draw `policy_epoch` from a shared monotonic ordering (a federation-scoped counter, a timestamp-truncated version, or a hash-chained policy log index). If Org A's epoch `4411` and Org B's floor `4418` are drawn from *different* counters, the comparison is meaningless and must not be attempted — instead the RP must fall back to a hard TTL cap. 2. **The RP's revocation floor is durable and replicated.** Every gateway instance in Org B must read the same floor. The split-brain above happened because one gateway's floor cache had not yet replicated. The floor is a **single-writer, read-your-writes** value; a gateway that has not observed the latest floor must be treated as unable to admit federated peers, not as admitting at the old floor. 3. **The token's epoch is bound into the signature.** If `policy_epoch` is a mutable claim outside the signed payload, an intermediary can rewrite it. The epoch must be inside the signed body, and the RP must reject tokens where the epoch is absent rather than defaulting it to "current." Where these do not hold — heterogeneous, non-comparable epoch spaces — the correct behavior is to **refuse the epoch comparison and enforce a short absolute TTL** (e.g., ≤ 5 min) as the sole freshness bound, and to log that the federation is running in degraded-freshness mode. ## Decision Boundary The RP faces a three-way decision on every federated assertion, and the boundary between them is where implementations fail: - **Admit** — signature valid, `exp` valid, `policy_epoch >= revocation_floor`, floor is locally current. - **Reject (stale)** — signature and `exp` valid, but `policy_epoch < revocation_floor`. This is the case the article is about. Reject must be a *distinct* error, not a generic 401, because the peer needs to know to re-issue, not to re-authenticate. - **Reject (indeterminate)** — floor cannot be confirmed current (replication lag, epoch space not comparable). This must **fail closed**. The most common production bug is collapsing "indeterminate" into "admit at last-known floor." The sharp edge: a stale-but-valid token and a fresh-but-valid token are **indistinguishable to any verifier that does not read local floor state**. So the decision cannot be made by the verifier alone; it requires a read of RP-local policy state on the hot path. Any design that pushes verification to a stateless edge (CDN, sidecar, cached introspection) reintroduces this failure by construction unless the floor is pushed to that edge with the same monotonic guarantee. ## Operational Effect When the epoch check is absent, the observable signature is a **delayed, asymmetric authorization drift**: the issuing org's policy changes propagate to its own tokens immediately (new tokens carry new epochs) but *old in-flight tokens keep their old grants at the RP until `exp`*. The blast radius is bounded by the token TTL — which is why short TTLs are the universal band-aid — but within that window, a revoked capability remains live across the federation, and *different RP instances can disagree* if their floors have replicated unevenly. The correct guardrail is a two-part invariant enforced at the RP: 1. **Epoch gate on the hot path**, comparing `token.policy_epoch` to a locally-durable `revocation_floor`, failing closed on indeterminate. 2. **Floor replication as a first-class health signal**: a gateway whose floor replication lag exceeds a threshold marks itself `FEDERATION_DEGRADED` and refuses federated admission rather than admitting at a stale floor. The code below encodes the admission decision with the epoch gate, the fail-closed indeterminate branch, and a distinct stale-epoch exception so the peer can re-issue rather than re-authenticate. ```python from dataclasses import dataclass from typing import Optional class StaleFederatedPolicyEpoch(RuntimeError): """Token identity is valid but its embedded policy epoch predates the RP's revocation floor.""" pass class IndeterminateFederationState(RuntimeError): """RP cannot confirm its revocation floor is current; must fail closed.""" pass @dataclass(frozen=True) class FederatedAssertion: subject: str issuer: str exp: float # unix seconds policy_epoch: Optional[int] # None if claim absent from signed body signature_valid: bool @dataclass(frozen=True) class RPPolicyState: revocation_floor: int floor_replication_lag_s: float max_tolerable_lag_s: float = 2.0 def admit_federated_peer( assertion: FederatedAssertion, rp: RPPolicyState, now: float, ) -> None: # 1. Cryptographic + temporal validity. if not assertion.signature_valid: raise IndeterminateFederationState("signature invalid; cannot trust any claim") if assertion.exp <= now: raise StaleFederatedPolicyEpoch("token expired; peer must re-authenticate") # 2. Fail closed if the RP's own floor is not trustworthy. if rp.floor_replication_lag_s > rp.max_tolerable_lag_s: raise IndeterminateFederationState( f"revocation floor replication lag {rp.floor_replication_lag_s}s " f"exceeds {rp.max_tolerable_lag_s}s; refusing federated admission" ) # 3. Epoch gate: absent epoch is NOT defaulted to current. if assertion.policy_epoch is None: raise IndeterminateFederationState( "token carries no signed policy_epoch; cannot bound authorization freshness" ) if assertion.policy_epoch < rp.revocation_floor: raise StaleFederatedPolicyEpoch( f"policy_epoch {assertion.policy_epoch} < revocation_floor " f"{rp.revocation_floor}; peer must re-issue with fresh epoch" ) # Admitted: identity fresh AND policy fresh against this RP's floor. return None ```