# When must an instance refuse a Federated Capability Grant despite a Valid Trust-Broker Attestation: The Policy-Negotiation Idempotency Gap **Date of Record:** 2026 November 15 **Scope:** Applies to cross-org agent federation where capability exchange is mediated by a trust broker and governed by bilateral policy negotiation (e.g., OAuth-style scope exchange, capability tokens, or policy-negotiated delegation). Does not apply to single-org delegation, nor to federations where a single authoritative policy engine issues grants without negotiation. ## Core Distinction A trust-broker attestation proves *who* is asking and *that the broker vouches for their identity and trust tier*. It does **not** prove that the negotiated capability set is the one the receiving instance last agreed to. The distinction that matters operationally is between **attestation validity** (a cryptographic/identity property, verifiable independently) and **negotiation-state validity** (a session-relative property that depends on the ordering and idempotency of policy exchange messages). A valid attestation can accompany a stale, replayed, or concurrently-superseded capability grant. The failure mode is accepting the grant because the attestation verifies, while the negotiation state has silently diverged. ## What Was Observed In a federation between Org A (requesting agent) and Org B (resource-holding instance), capability exchange proceeded as: A proposes a policy bundle → B evaluates and returns an accepted capability set with a negotiation epoch counter → broker attests the resulting grant → A presents grant to B. The observed failure: under retry and concurrent renegotiation, B received a grant attested against negotiation epoch `N`, but B's local negotiation state had advanced to `N+1` because a parallel renegotiation (triggered by an unrelated capability revocation) had already been accepted. The attestation verified cleanly—signature, trust tier, and expiry all valid—but the *capability set* in the grant reflected epoch `N`, which included a capability (`write:audit_log`) that epoch `N+1` had deliberately narrowed away. The instance accepted the grant. It then executed a write against `audit_log` under a policy the peer org had already withdrawn. No signature check, no trust-tier check, and no expiry check could have caught this: every cryptographic invariant held. Only the negotiation-epoch binding was violated. The non-obvious part: **the broker cannot detect this condition**, because the broker attests grants, not the receiver's evolving negotiation state. The broker is structurally blind to the receiver's epoch. The receiver is the only party that can detect the divergence, and only if it treats the epoch as a first-class admission condition rather than metadata. ## Condition of Validity The refusal is *required* when all of the following hold: 1. The federation uses negotiated (not statically provisioned) capability sets. 2. The receiver maintains a monotonic negotiation epoch per peer-org pairing. 3. A grant carries an epoch reference that is *strictly less than* the receiver's current epoch for that pairing. 4. The delta between grant epoch and current epoch includes at least one *narrowing* (revocation or scope reduction). The refusal is *not* required—and should be avoided—when the grant epoch equals the current epoch, or when the receiver has no recorded epoch for the pairing (first contact; defer to broker trust tier and normal policy evaluation). Epoch-ahead grants (grant epoch > local epoch) indicate receiver state loss and must be treated as a distinct recovery condition, not a refusal. ## Decision Boundary The boundary is between **replay tolerance** and **replay rejection**. Many federation implementations tolerate replayed grants for idempotency (a retried request should not fail merely because it was retried). That tolerance is correct for *identical* re-presentations within the same epoch. It is incorrect across an epoch boundary where narrowing occurred, because a replayed epoch-`N` grant is not idempotent—it re-asserts a capability that epoch `N+1` removed. The precise rule: **admit a grant iff `grant.epoch == local.epoch` OR (`grant.epoch < local.epoch` AND the epoch delta contains no narrowing that affects the grant's capability set).** When the delta is unknown (receiver did not retain epoch-delta history), fail closed: refuse and force renegotiation. ## Operational Effect Refusing on epoch divergence converts a silent privilege-resurrection bug into an explicit, recoverable renegotiation. The cost is an extra round-trip on the rare concurrent-renegotiation race. The benefit is that capability revocation becomes *eventually consistent but never violated*—a withdrawn capability cannot be re-asserted by a replayed grant, regardless of attestation validity. Implementations that skip this check exhibit revocation windows bounded only by grant expiry, which in observed deployments ranged from minutes to hours. ```python class NegotiationEpochDivergence(RuntimeError): """Raised when a federated capability grant's negotiation epoch is stale relative to the receiver's local epoch AND the intervening epoch delta narrowed the requested capability set. A valid broker attestation does not override this condition.""" pass def admit_federated_grant(grant, local_state, broker_attestation): # Attestation validity is necessary but NOT sufficient. if not broker_attestation.verify(grant): raise NegotiationEpochDivergence( f"broker attestation failed verification for grant {grant.id}" ) local_epoch = local_state.epoch_for(grant.peer_org) if local_epoch is None: # First contact: no epoch to compare; defer to normal policy eval. return local_state.evaluate_policy(grant.capabilities) if grant.epoch == local_epoch: return local_state.evaluate_policy(grant.capabilities) if grant.epoch > local_epoch: # Receiver state loss; distinct recovery path, not a refusal. raise NegotiationEpochDivergence( f"grant epoch {grant.epoch} ahead of local {local_epoch}; " f"receiver state may be lost" ) # grant.epoch < local_epoch: check whether the delta narrowed capabilities. delta = local_state.epoch_delta(grant.peer_org, grant.epoch, local_epoch) if delta is None: # Delta history unavailable: fail closed, force renegotiation. raise NegotiationEpochDivergence( f"cannot verify narrowing for epoch delta " f"{grant.epoch}->{local_epoch} on peer {grant.peer_org}; " f"refusing stale grant {grant.id}" ) narrowed = delta.narrowed_capabilities & set(grant.capabilities) if narrowed: raise NegotiationEpochDivergence( f"stale grant {grant.id} at epoch {grant.epoch} re-asserts " f"capabilities narrowed at epoch {local_epoch}: {sorted(narrowed)}" ) # Stale but non-narrowing: safe to admit under current policy. return local_state.evaluate_policy(grant.capabilities) ```