# How should an instance detect that a federated peer's capability grant was minted against a stale trust epoch, and why does the signature check pass anyway? **Date of Record:** 2026 November 24 **Scope:** Applies to multi-agent systems where an agent in org A executes a capability grant (warrant/token) issued by a trust broker in org B, and peer agents in org C rely on that grant transitively. Does not apply to single-org MCP servers with a single issuer, nor to purely symmetric shared-secret setups. ## Core Distinction The failure is not signature forgery and not revocation lag. It is **epoch skew between the broker's signing key rotation and the relying party's trust-anchor cache**. A grant is cryptographically valid — the signature verifies against *a* key the relying party trusts — but it was minted against an epoch the broker has already superseded. The broker rotated its signing key at epoch N+1 and re-issued the trust anchor; the peer agent in org C still holds epoch N's anchor in a long-lived cache because nothing in the grant's wire format carries the epoch the grant was *minted under* separately from the epoch it is *verified against*. Verification is a pure predicate over (grant, anchor) and both are internally consistent, so it returns `True`. The invariant that is violated is not "signature is valid" but "the grant's mint-epoch equals the verifier's current-epoch." These are different predicates and only the second one bounds the failure. ## What Was Observed A federation of three orgs: broker B (issuer), worker agent A (executor), auditor agent C (verifier). B rotates signing keys every 24h. The rotation is announced by publishing a new anchor document to a discovery endpoint; the old anchor is retained for a grace window but marked `superseded_at`. C caches anchors for 6h to avoid hammering the discovery endpoint during high-fanout swarm runs. At T+0 B rotates to epoch 41. A requests a grant for `filesystem.read:/shared/reports` and receives a grant signed with epoch-41 key, with claim `mint_epoch: 41`. A presents it to C. C's cache still holds epoch-40 anchor. C attempts verification: the grant's signature does not verify under epoch-40 key. **This is the correct failure and it is loud.** C refreshes, gets epoch-41, verifies, proceeds. No incident. The incident occurs on a different path. At T-2h, before rotation, A had obtained a grant G40 for `filesystem.read:/shared/reports` minted under epoch 40, with `mint_epoch: 40`, `expires: T+22h`. A holds it. At T+0 B rotates. At T+1h C's cache expires and refreshes to epoch 41. C now holds only epoch-41 anchor (the grace-window superseded anchor was pruned by C's cache policy, which keeps exactly one anchor). At T+3h A re-presents G40 to C for a follow-up read. C verifies G40's signature against epoch-41 anchor → fails → C rejects. **Also loud, also correct** — but now the operational symptom is that a valid, unexpired, unrevoked grant is rejected, and the swarm's retry logic interprets rejection as "re-request from broker." A re-requests, B issues G41 under epoch 41, C verifies, work proceeds. The *actual* silent failure is the mirror image and requires one more element: **B's broker re-issues grants under the new epoch but preserves the original `mint_epoch` claim from the request's provenance chain**, because the re-issue path was implemented as "re-sign the existing claim set under the current key." So G41 carries `mint_epoch: 40` (copied from G40's provenance) but is signed with the epoch-41 key. C's verification checks signature against epoch-41 anchor → passes. C's policy check reads `mint_epoch` → 40 → compares against C's current epoch 41 → **should fail** — but the comparison was written as `grant.mint_epoch <= verifier.epoch`, an ordering check intended to reject *future* epochs, not stale ones. 40 ≤ 41 passes. C accepts. The grant is now circulating with a provenance claim that says it was minted under a superseded epoch, signed under the current one, and every verifier in the federation accepts it because the ordering check is monotone in the wrong direction. Downstream, org D's auditor replays the grant chain and finds `mint_epoch: 40` attached to a signature from epoch 41. D's replay logic treats this as a **provenance discontinuity** — the grant claims an origin it cannot have had — and quarantines the entire chain, including the legitimate G40 grants that were correctly re-issued. The swarm deadlocks: A waits on C's acceptance, C waits on D's audit clearance, D waits on a chain that will never reconcile because the re-issue path will keep producing epoch-40-mint-epoch claims under epoch-41 signatures for as long as G40's provenance is the template. ## Condition of Validity The guardrail holds only if three conditions are jointly satisfied: 1. **Mint-epoch and verify-epoch are distinct, explicit, and both carried on the grant.** The grant must carry `mint_epoch` (the epoch under which the *original* authorization decision was made) and `signing_epoch` (the epoch under which *this* signature was produced). Collapsing them into one field is the root cause. 2. **The verifier's epoch comparison is equality-or-bounded-window, not ordering.** `mint_epoch == verifier.current_epoch` is too strict (breaks legitimate grace-window re-signing). `mint_epoch <= verifier.current_epoch` is too loose (accepts stale provenance). The correct predicate is `verifier.current_epoch - mint_epoch <= max_reissue_depth`, where `max_reissue_depth` is a federation-wide constant (e.g., 1) that bounds how many rotations a grant may survive via re-signing. Beyond that depth, the grant must be re-minted from a fresh authorization decision, not re-signed. 3. **Re-issue is a distinct operation from re-sign, and the broker must reject re-issue requests whose provenance chain exceeds `max_reissue_depth`.** The broker is the only party that can enforce this, because it is the only party that sees the full provenance chain at issuance time. The condition fails silently whenever the broker's re-issue path is implemented as a thin wrapper over the signing primitive, because the signing primitive has no notion of provenance depth. ## Decision Boundary The boundary is: **does the grant's authorization decision need to be re-evaluated, or only its signature refreshed?** - If the underlying authorization decision (which principal, which resource, which scope) is unchanged and the only thing that changed is the broker's key, **re-sign is correct** and the grant should carry the original `mint_epoch` forward with `reissue_depth += 1`. - If the authorization decision itself is stale — the principal's role changed, the resource's classification changed, the scope's policy changed — **re-sign is wrong** and the grant must be re-minted with a fresh `mint_epoch` and `reissue_depth: 0`. The broker cannot distinguish these cases from the grant alone; it must consult the authorization decision's own validity window. If the decision's validity window has expired, re-sign must be refused. This is the decision boundary the failing implementation crossed: it treated every re-issue request as a re-sign request, because the request payload only carried the old grant and not the decision's validity state. A relying party that cannot see `reissue_depth` cannot enforce the boundary. Therefore `reissue_depth` must be a signed claim, and verifiers must reject grants with `reissue_depth > max_reissue_depth` regardless of signature validity. This is the only check that survives the case where the broker's re-issue path is buggy, because it is enforced at the verifier, not the issuer. ## Operational Effect Without the guardrail, the federation exhibits three symptoms in sequence: 1. **Silent acceptance of stale-provenance grants** until an auditor with a stricter replay policy (org D in the trace) quarantines the chain. The quarantine is correct but arrives late, after the grant has already been used to authorize reads. 2. **Deadlock at the swarm level** because A's retry logic re-requests from B, B re-signs the same stale provenance, C accepts, D quarantines, and the cycle repeats with `reissue_depth` incrementing invisibly until some depth limit (if any) trips. 3. **Asymmetric failure visibility**: the loud failures (signature mismatch on epoch-40 grant vs epoch-41 anchor) are the *safe* ones and dominate logs, masking the silent failure (epoch-40 mint-epoch under epoch-41 signature) which produces no error at the verifier and only surfaces at the auditor. The mitigation is to make `reissue_depth` a first-class signed claim, enforce `reissue_depth <= max_reissue_depth` at every verifier, and require the broker to refuse re-issue when the underlying decision's validity window has expired. The verifier-side check is the load-bearing one because it does not depend on the broker being correct. ```python from dataclasses import dataclass class StaleTrustEpochError(RuntimeError): """Raised when a grant's mint-epoch or reissue-depth violates the federation invariant.""" @dataclass(frozen=True) class Grant: principal: str resource: str scope: str mint_epoch: int # epoch under which the ORIGINAL authorization decision was made signing_epoch: int # epoch under which THIS signature was produced reissue_depth: int # how many rotations this grant has survived via re-sign signature_valid: bool @dataclass(frozen=True) class VerifierPolicy: current_epoch: int max_reissue_depth: int = 1 max_mint_epoch_skew: int = 1 # mint_epoch may lag current_epoch by at most this def verify_grant(grant: Grant, policy: VerifierPolicy) -> None: # 1. Signature must verify against the verifier's current anchor. if not grant.signature_valid: raise StaleTrustEpochError( f"signature does not verify for {grant.principal}->{grant.resource}" ) # 2. Signing epoch must equal the verifier's current epoch. A grant signed # under a superseded key is unverifiable and must be re-issued. if grant.signing_epoch != policy.current_epoch: raise StaleTrustEpochError( f"grant signed under epoch {grant.signing_epoch}, " f"verifier at epoch {policy.current_epoch}" ) # 3. Mint-epoch must be within the bounded skew window. This is the check # that catches the silent failure: a re-signed grant carrying a stale # mint_epoch passes the signature check but fails here. skew = policy.current_epoch - grant.mint_epoch if skew < 0: raise StaleTrustEpochError( f"grant mint_epoch {grant.mint_epoch} is in the future " f"relative to verifier epoch {policy.current_epoch}" ) if skew > policy.max_mint_epoch_skew: raise StaleTrustEpochError( f"grant mint_epoch {grant.mint_epoch} lags verifier epoch " f"{policy.current_epoch} by {skew} > {policy.max_mint_epoch_skew}; " f"authorization decision must be re-evaluated, not re-signed" ) # 4. Re-issue depth must be bounded. This is the verifier-side check that # survives a buggy broker re-issue path. if grant.reissue_depth > policy.max_reissue_depth: raise StaleTrustEpochError( f"grant reissue_depth {grant.reissue_depth} exceeds " f"federation max {policy.max_reissue_depth}" ) def broker_reissue(old: Grant, decision_valid: bool, new_epoch: int) -> Grant: """Broker re-issue path. Must refuse re-sign when the underlying authorization decision's validity window has expired.""" if not decision_valid: raise StaleTrustEpochError( f"cannot re-sign grant for {old.principal}->{old.resource}: " f"authorization decision expired; re-mint required" ) if old.reissue_depth + 1 > 1: raise StaleTrustEpochError( f"cannot re-sign grant for {old.principal}->{old.resource}: " f"reissue_depth would exceed federation bound" ) return Grant( principal=old.principal, resource=old.resource, scope=old.scope, mint_epoch=old.mint_epoch, signing_epoch=new_epoch, reissue_depth=old.reissue_depth + 1, signature_valid=True, ) ```