Encrypt Online
Theme

Certificates & Site Ops · Field note

Replay windows, timestamp drift, and why signed requests sometimes fail at the edge

Connect signed-request freshness checks to clock drift and replay windows so HMAC and SigV4 failures stop feeling random.

Encrypt Online Editorial Team3 min read
Replay windows, timestamp drift, and why signed requests sometimes fail at the edge guide cover

Before you start

Inspect the current certificate, key, token, or endpoint output before changing deployment config; stale artifacts make fixes misleading.

A signed request can fail even when the signature math is right if the request is too old, too far in the future, or outside the allowed replay window. That is why some signature errors appear only at the edge or only under latency spikes.

The useful mental model is that freshness checks are part of the signature contract, not an optional add-on.

In brief

What it is: Replay windows and timestamp checks limit how long a signed request remains acceptable after it is created.

Why it matters: They reduce replay risk but make the system sensitive to clock drift, delays, and wrong-unit timestamps.

Watch for: Teams often debug the cryptographic signature while ignoring the freshness rules that are actually rejecting the request.

A valid signature is not the same as an acceptable request

Many signed-request systems include a timestamp or derived date scope because a signature that is valid forever is replayable forever. That means acceptance often depends on both a matching signature and an allowed time window. The signature can be perfect and still be rejected for age or skew.

This is common in SigV4, webhook schemes with signed timestamps, and custom HMAC APIs.

Clock drift turns small differences into noisy failures

A few minutes of skew can be enough to push an otherwise correct request outside the accepted freshness window. The failure may appear intermittent if only some nodes are drifting or only some edge paths add delay. That is why time synchronization and timestamp inspection belong in the same debugging pass as signature reconstruction.

  • Check timestamp units and time zone assumptions first.
  • Check the allowed replay window or skew tolerance.
  • Compare producer and verifier clocks, not just the message body.

Why the best tools show time and signature together

A signature debugger that ignores freshness is incomplete. The most helpful UI for these workflows shows the signed timestamp, the current verifier time, and the allowed window alongside the computed signature result.

See it in a small example

Notice: The signature layer and the freshness layer can fail independently.

Text
Valid signature + stale timestamp = reject
Valid signature + clock skew beyond tolerance = reject

What to verify

  • Treat freshness rules as part of signature validation, not as an afterthought.
  • Compare clocks on both sides of the request path.
  • Check units, skew tolerance, and transit delay before rotating keys or secrets.

Common questions

Can NTP drift really break signatures?

Yes. Freshness windows are often tight enough that clock drift becomes a practical source of failure.

If the signature matches, why reject the request?

Because a replayable or stale request may still be unacceptable by policy.

References