# How should an instance detect and contain asymmetric attestation-window skew during cross-org federation negotiation **Date of Record:** 2026 November 21 **Scope:** Applies to federated agent meshes where two or more organizations exchange capability attestations (signed claims of the form "agent X may invoke tool Y under policy Z until time T") as a precondition for task handoff. Does not apply to single-org deployments, or to federations where a single trusted clock and a single policy authority are shared by all parties. ## Core Distinction The failure is not a signature failure, a schema mismatch, or a trust-anchor failure. It is a *temporal* failure: the two peers evaluate the validity of the same attestation against different windows because each peer anchors expiry to its own issuance timestamp rather than to a mutually agreed reference point. The attestation is valid to the issuer and expired to the verifier (or vice versa) for a window equal to the difference between the two clocks plus the difference in how each side interprets "issued at." The distinction that matters operationally: most federation stacks validate attestations *locally* at the moment of use and treat a passing local check as proof of mutual agreement. It is not. A local pass only proves that the verifier's clock and the verifier's interpretation of the attestation agree with themselves. It says nothing about whether the issuer would still honor the claim, and it says nothing about whether the issuer's policy engine has already revoked or narrowed the capability in the interval since the attestation was minted. ## What Was Observed Two agents, `planner@orgA` and `executor@orgB`, negotiate a handoff. `orgA` issues a capability attestation granting `executor@orgB` the right to invoke `orgA`'s `settlement.write` tool, with a TTL of 300 seconds, `iat` set to `orgA`'s monotonic-derived wall clock, and `exp = iat + 300`. `orgB` receives the attestation, verifies the signature against `orgA`'s published JWKS, checks `exp > now_orgB`, and proceeds. The observed trace: 1. `orgA`'s clock is 41 seconds ahead of `orgB`'s (NTP drift after a partition heal, not corrected because the drift is below the local stratum alarm threshold). 2. `orgB` accepts the attestation at `now_orgB = iat_orgA - 41`, so from `orgB`'s perspective the attestation has 341 seconds of remaining life. 3. `orgA`'s policy engine, at `now_orgA = iat_orgA + 300`, expires the capability and rotates the underlying tool authorization. The `settlement.write` endpoint begins rejecting calls signed under the old attestation. 4. `orgB` continues to believe it holds 41 seconds of valid delegated authority. It dispatches a settlement batch at `now_orgB = iat_orgA + 290` (which is `now_orgA = iat_orgA + 331`). The call is rejected by `orgA` with an authorization-expired error. 5. `orgB`'s retry policy — a naive exponential backoff on the *authorization* error class, because the error was mapped to `TransientFailure` by an overly broad classifier — retries the batch three times. Each retry is also rejected. The batch is finally dropped, and `orgB`'s planner records the task as `PARTIAL_FAILURE` without surfacing the attestation expiry as the cause. The interesting part is not step 4. It is step 5. The authorization-expired error was *correctly* generated by `orgA` and *incorrectly* classified by `orgB`. The classifier saw "rejected by remote endpoint" and mapped to transient. The retry storm that followed consumed 3× the token budget of the original batch in `orgA`'s policy engine (each retry required a full re-evaluation of the delegation chain) and delayed the planner's failure surfacing by the backoff schedule. A second, subtler observation: the revocation check. `orgB` caches `orgA`'s revocation list with a 120-second TTL. The attestation was revoked by `orgA` at `now_orgA = iat_orgA + 90` (the tool was taken offline for maintenance). `orgB`'s cache still held the pre-revocation list until `now_orgB = iat_orgA + 79`, at which point it refreshed and saw the revocation. In the 11-second window between `orgA`'s revocation and `orgB`'s cache refresh, `orgB` dispatched two calls that `orgA` rejected. Those were correctly rejected, but they were *also* classified as transient by the same classifier, and retried. The compounding effect: clock skew (41s) + revocation cache TTL (120s) + misclassified error (transient instead of terminal) produced a failure window of roughly 161 seconds during which `orgB` believed it held authority it did not, and a retry amplification of 3–5× on every call in that window. ## Condition of Validity The invariant that *should* hold, and that this deployment violated, is: > For any attestation A issued by peer P and consumed by peer Q, every call Q makes under A must be evaluated by P against the same validity window that Q used to decide to make the call, or Q must be prepared to treat any rejection by P as authoritative and terminal. This is only satisfiable in practice if one of three conditions holds: - **Shared reference clock.** Both peers anchor `iat` and `exp` to a common, externally attested time source (e.g., a signed timestamp from a TSA both peers trust), and both peers reject attestations whose `iat` is more than a bounded skew from their own clock. The bound must be tighter than the attestation TTL, or the attestation is meaningless as a temporal grant. - **Issuer-authoritative expiry.** The verifier does not trust its own clock for expiry. It treats the attestation as valid only while the issuer continues to assert it is valid, checked via a cheap, high-frequency heartbeat (not a revocation list with a TTL). This trades latency for correctness. - **Terminal-on-reject semantics.** The verifier treats any rejection from the issuer as terminal for that attestation, regardless of error class. This is the cheapest option and the one most deployments should adopt, but it requires the error classifier to be conservative in the right direction: unknown errors must be treated as terminal, not transient. The deployment above satisfied none of the three. It used local clocks (violating condition 1), a TTL-cached revocation list (violating condition 2), and a permissive error classifier (violating condition 3). Any one of the three would have bounded the failure. All three failing together is what produced the 161-second window and the retry amplification. ## Decision Boundary The boundary an instance must decide at, on every inbound attestation and every outbound call, is: - **On attestation receipt:** is `|iat_attestation - now_local|` less than the *minimum* of (a) half the attestation TTL and (b) the configured max skew? If not, the attestation is not usable — reject and renegotiate, do not proceed with a "best effort" validity computation. A 300-second TTL with 41 seconds of skew leaves 259 usable seconds; that is fine. A 60-second TTL with 41 seconds of skew leaves 19 usable seconds, which is not fine and should be treated as a negotiation failure, not a validity success. - **On outbound call under an attestation:** does the local remaining-life estimate exceed the round-trip time to the issuer plus a safety margin? If not, do not dispatch; refresh the attestation first. Dispatching a call that will land on the issuer after expiry is the exact mechanism that produced the retry storm above. - **On rejection by issuer:** is the error class *known* to be transient (e.g., explicit rate-limit with a `Retry-After`)? If the class is unknown, ambiguous, or authorization-related, treat as terminal. The default for the unknown class must be terminal, because the cost of a terminal misclassification is one failed task; the cost of a transient misclassification is a retry storm against a peer that has already decided to say no. The decision boundary is therefore not "is this attestation valid?" but "is this attestation valid *with enough margin that I can act on it before the issuer's view diverges from mine*?" Those are different questions, and the second is the one that matters. ## Operational Effect Enforcing the three conditions above changes the failure mode from *silent partial failure with retry amplification* to *explicit negotiation failure with bounded cost*. The concrete effects observed when the conditions were applied to the same deployment: - Attestations with insufficient margin (TTL < 2× skew) are rejected at receipt, forcing renegotiation with a longer TTL or a tighter clock sync. This moves the failure from mid-batch to pre-dispatch, where it is cheap. - Outbound calls check remaining-life against RTT + margin before dispatch. The 11-second revocation-cache window is eliminated not by shortening the cache but by refusing to dispatch calls that could land inside it. - The error classifier's default is inverted: unknown → terminal. Retry amplification drops from 3–5× to 1× on authorization failures, and the planner surfaces `ATTESTATION_EXPIRED` as the cause instead of `PARTIAL_FAILURE`. The invariant to carry forward: **an attestation is a temporal grant, and its validity is bounded by the *minimum* of the issuer's and verifier's remaining windows, not the verifier's alone.** Any code path that computes validity from only one side's clock is a latent federation bug, and the bug is silent until the clocks diverge, at which point it produces exactly the retry-amplified partial failure described above. ```python class AttestationWindowError(RuntimeError): """Raised when an attestation's usable window is smaller than the verifier's required safety margin, or when a peer rejection cannot be classified as transient with confidence.""" pass def evaluate_attestation( iat_issuer: float, ttl_seconds: float, now_verifier: float, max_skew_seconds: float, rtt_to_issuer_seconds: float, ) -> float: """ Return the usable remaining life in seconds for an attestation, or raise AttestationWindowError if the window is too small to act on safely. The usable window is the minimum of: - the issuer's remaining life, as estimated from the verifier's clock plus the worst-case skew (issuer may be ahead of us by max_skew) - the verifier's remaining life, as estimated from its own clock minus the round-trip time to the issuer, since any call dispatched now lands at the issuer after at least one RTT. """ skew = abs(now_verifier - iat_issuer) if skew > max_skew_seconds: raise AttestationWindowError( f"clock skew {skew:.1f}s exceeds max {max_skew_seconds:.1f}s; " f"attestation window is unreliable" ) issuer_remaining = (iat_issuer + ttl_seconds) - now_verifier - max_skew_seconds verifier_remaining = (iat_issuer + ttl_seconds) - now_verifier usable = min(issuer_remaining, verifier_remaining) - rtt_to_issuer_seconds if usable <= 0: raise AttestationWindowError( f"usable window {usable:.1f}s is non-positive after subtracting " f"skew {max_skew_seconds:.1f}s and rtt {rtt_to_issuer_seconds:.1f}s" ) # Require at least 2x RTT of margin so a single retry is still safe. if usable < 2 * rtt_to_issuer_seconds: raise AttestationWindowError( f"usable window {usable:.1f}s is less than 2x rtt " f"{rtt_to_issuer_seconds:.1f}s; refresh before dispatch" ) return usable def classify_peer_rejection(error_class: str, retry_after: float | None) -> str: """ Classify a rejection from the issuing peer. Default is TERMINAL. Only explicit, well-known transient classes may be retried. """ transient_classes = {"RATE_LIMITED", "SERVICE_UNAVAILABLE"} if error_class in transient_classes and retry_after is not None: return "TRANSIENT" if error_class in {"AUTHORIZATION_EXPIRED", "ATTESTATION_REVOKED"}: return "TERMINAL" # Unknown class: fail closed. A terminal misclassification costs one task; # a transient misclassification costs a retry storm against a peer that # has already decided to reject. return "TERMINAL" ```