# Why does an instance accept a federated capability grant before it has verified the peer's policy epoch, and how does that create a silent trust-anchor rollback? **Date of Record:** 2026 November 27 **Scope:** Applies to cross-organization agent federation where a local instance (the *grantee*) accepts capability grants, tool bindings, or delegated warrants from a remote-org peer (the *grantor*) under a negotiated policy set. Does not apply to intra-org delegation where a single trust root signs both sides, nor to stateless request/response tool calls with no persisted grant. ## Core Distinction The failure is not "the peer is untrusted." It is that **trust bootstrapping and policy negotiation are two independent handshakes that the grantee interleaves incorrectly.** During federation setup, the grantee must (a) establish a trust anchor for the peer org (its signing key set / root of trust) and (b) negotiate the *policy epoch* — the versioned bundle of constraints (allowed tools, data scopes, rate limits, delegation depth) that both sides agree to honor. A grant is only valid if it is signed under a trust anchor that is current *and* evaluated against the policy epoch that was actually negotiated. The non-obvious boundary: the grantee typically validates the grant's signature against the peer's *presented* key, then separately fetches and applies a policy bundle. Because the two are fetched on different channels at different times, a grant signed under policy epoch `E_n` can be accepted while the grantee's active policy has already advanced to `E_{n+1}` (or rolled back to `E_{n-1}` after a key rotation). The signature verifies; the grant is semantically stale. This is a **trust-anchor rollback**: the cryptographic check passes against a key that the peer has since retired, and the policy check passes against a bundle the peer never signed for that grant. ## What Was Observed A grantee instance `G` federated with grantor `P`. `P` rotates its signing key every 24h and bumps its policy epoch on rotation, publishing a signed `policy-manifest` at `/.well-known/agent-policy` containing `{epoch, key_id, valid_from, valid_until, constraints}`. Sequence during a routine resume of a long-running task: 1. `G` resumes from a checkpoint written 19 hours earlier. The checkpoint contains a cached `P` trust anchor: `key_id=k7, epoch=E41`. 2. `G` issues a capability request to `P` for a `data.read` binding. `P` responds with a grant signed by `k8` under `epoch=E43` (two rotations since the checkpoint). 3. `G`'s signature verification path fetches `P`'s current key set, finds `k8`, and verifies the grant signature — **passes**. 4. `G`'s policy path, however, reads the *cached* manifest from the checkpoint (`E41`), because the resume path restores policy state from the checkpoint rather than re-fetching. The `E43` grant's declared constraints (`max_delegation_depth=1`, `data_scope=redacted`) are evaluated against `E41`'s constraints (`max_delegation_depth=3`, `data_scope=full`). 5. `G` accepts the grant and proceeds to delegate `data.read` at depth 2 with `full` scope — both forbidden under `E43`, both permitted under the stale `E41`. No error was raised. The grant executed and returned data the peer's current policy explicitly disallowed. The breach was discovered only when `P`'s auditor replayed the epoch log and found a scope violation attributed to `G`. The trigger condition is precise: **the grantee's checkpoint/resume path restores trust-anchor state but not policy-epoch state, and the two are validated on different code paths with different freshness guarantees.** Any grant whose signing epoch is newer than the checkpointed policy epoch, arriving before the next full policy refresh, is accepted under a stale constraint set. ## Condition of Validity The invariant that must hold for federated grant acceptance: > A grant `g` signed under `(key_id, epoch)` is accepted by grantee `G` **iff** `key_id` verifies against `G`'s current trust anchor **AND** `epoch == G.active_policy_epoch` **AND** the grant's declared constraints are a subset of `G.active_policy.constraints`. The two checks are conjoined on the *same* epoch value; neither may be satisfied by a stale cache. The failure arises because the conjunction is evaluated against two different epoch values — one live (from the key fetch), one stale (from the checkpoint). The guardrail is an **epoch-binding check**: the grant must carry the epoch it was signed under, and the grantee must refuse any grant whose declared epoch does not match its active policy epoch, *forcing a policy re-fetch before acceptance* rather than proceeding on the cached manifest. This condition is valid only when both orgs publish epoch-stamped, signed manifests and the grantee treats policy epoch as part of the grant's authenticated context. If the grant carries no epoch field, the invariant cannot be enforced and the federation should be treated as `no-negotiation` (fixed constraints, no rotation) — a strictly weaker mode. ## Decision Boundary The boundary between safe and unsafe acceptance is the **freshness relationship between the key fetch and the policy fetch at grant-evaluation time**: - **Safe:** key fetch and policy fetch are issued in the same evaluation transaction, and acceptance requires `grant.epoch == fetched_policy.epoch`. A mismatch triggers re-fetch or rejection, never fallback to cache. - **Unsafe:** key fetch is live, policy is restored from checkpoint, and acceptance requires only signature verification. The moment the peer's rotation cadence is faster than the grantee's checkpoint cadence, stale-epoch acceptance is guaranteed on resume — not probabilistic. The decision rule: **if a grant's signing epoch is strictly newer than the grantee's active policy epoch, the grantee MUST treat the grant as unverifiable and refuse it, regardless of signature validity.** Accepting it is the rollback. The reverse (grant epoch older than active) is also unsafe — it permits a peer to replay a grant issued under a permissive past epoch after tightening policy — and must likewise be refused unless the grantee explicitly supports epoch-pinned replay for audit. ## Operational Effect The downstream consequence is a **silent scope escalation across the federation boundary** that no signature check can catch, because the signature is genuine and the key is current. The grantee's audit log records a valid grant; the grantor's audit log records a policy violation. The two logs disagree on the same transaction — a verification replay discrepancy that only surfaces under cross-org reconciliation. Practically, this means: (1) checkpoints must persist `active_policy_epoch` alongside the trust anchor, and resume must invalidate any cached policy older than the peer's declared rotation cadence; (2) grant acceptance must be a single atomic check binding signature, key, and epoch, not two sequential checks with independent caches; (3) federated peers with rotation cadence faster than the grantee's checkpoint interval must be flagged, because the stale-epoch window is structurally guaranteed. The invariant to encode: **no grant is accepted whose epoch does not equal the epoch of the policy manifest that was live at evaluation time, and that manifest must be fetched, not restored.** ```python class StalePolicyEpochError(RuntimeError): """Raised when a federated grant's signing epoch does not match the grantee's active policy epoch at evaluation time.""" pass class FederatedGrantEvaluator: def __init__(self, active_policy_epoch: int, active_constraints: dict): self.active_policy_epoch = active_policy_epoch self.active_constraints = active_constraints def evaluate(self, grant: dict, policy_fetched_live: bool) -> bool: # grant: {"epoch": int, "key_id": str, "constraints": dict, "sig": str} if not policy_fetched_live: # Restored-from-checkpoint policy is never authoritative for acceptance. raise StalePolicyEpochError( "policy manifest was restored from checkpoint, not fetched live; " "cannot bind grant epoch to active epoch" ) if grant["epoch"] != self.active_policy_epoch: raise StalePolicyEpochError( f"grant signed under epoch {grant['epoch']} but active policy " f"epoch is {self.active_policy_epoch}; refusing to accept a " f"grant whose signing epoch does not match the live manifest" ) for k, v in grant["constraints"].items(): if k not in self.active_constraints or v != self.active_constraints[k]: raise StalePolicyEpochError( f"grant constraint {k}={v} is not a subset of active " f"policy constraint {k}={self.active_constraints.get(k)}" ) # signature verified separately against live key set; epoch binding is the guard return True ```