2026-09-18 · 8 min read
- http
- tls
- replay-safety
TLS 1.3 early data, often called 0-RTT data, can reduce latency on a resumed connection. The server processes those application bytes before a new handshake has supplied ordinary replay protection, so an attacker may be able to replay captured early data in conditions the protocol permits.
HTTP 425 Too Early gives a server a way to refuse a request that arrived too early for safe processing. A client can then complete the handshake and retry without early data, subject to the operation's normal retry rules.
Classify effects, not just methods
GET, HEAD, OPTIONS, and TRACE are defined as safe methods, but an implementation can still attach side effects such as consuming a one-time link or recording a billable action. Audit actual endpoint behavior before enabling early data.
- Exclude authentication exchanges and one-time credentials.
- Exclude writes with externally visible non-idempotent effects.
- Review redirects and every downstream call.
- Treat edge-generated and origin-generated responses separately.
Propagate trusted early-data context
When TLS terminates at an edge, the origin cannot infer early-data use from an ordinary forwarded request. Use only the platform's trusted connection metadata, strip spoofable client headers, and define which component rejects unsafe routes.
Keep edge and origin policy synchronized during deployments. A permissive edge paired with an unaware origin can process replay-sensitive traffic even though application code never opted in.
Handle one bounded fallback
On 425, finish the handshake and retry the same request without early data when the body is replayable and the client policy permits it. Prevent loops when an intermediary repeatedly generates 425 or strips the signal that caused it.
Idempotency keys can protect selected writes only when they are scoped, authenticated, stored atomically with the result, retained for the retry window, and enforced through all effects. They are not a blanket reason to enable early data.
Run replay-focused conformance tests
Use Flashman's timestamp converter for connection and retry timelines, URL tool for route classification, UUID generator for synthetic idempotency keys, diff for edge policy, and hash for harmless request-fixture identity.
Test fresh and resumed sessions, duplicated early bytes, 425 fallback, retries in multiple edge regions, redirected requests, expired deduplication records, concurrent copies, gateway failover, application timeouts, and every endpoint proposed for early-data eligibility.