The interview problem

Practice prompt

A customer reports valid webhooks rejected after a proxy change. Diagnose signature verification and replay protection.

Original practice, not a reported company interview. Scenarios and numbers are illustrative. Interview date: not applicable. Sources retrieved October 1, 2026.

1. Scope and worked approach

Assume a documented timestamped signature scheme. Capture redacted metadata and a safe test payload at the receiving boundary. Verify against the exact raw request bytes before JSON reserialization, check key version and compare clock offset with the allowed timestamp window. Persist event IDs for idempotent processing after successful authentication. Coordinate key rotation with overlap and a known test event; never bypass verification in production to make the demo work.

2. Trace the design or derivation

Capture raw boundary
  → verify signature
  → check timestamp
  → deduplicate event
  → process

Separate error counters for unknown key, malformed signature, body mismatch and timestamp rejection. This narrows diagnosis without logging the secret. The customer acceptance fixture should pass through the actual proxy chain; a direct localhost test can miss the exact body transformation responsible for production failures.

3. Calculate the example

With a five-minute age window, a receiver clock six minutes ahead can reject an event delivered immediately. Expanding the window may mask clock drift while increasing replay exposure; first measure and correct the clock issue.

4. Failure cases and trade-offs

Proxies may decompress or rewrite bodies, and multiple signatures may appear during rotation. Timestamp freshness does not prevent duplicate business actions by itself. Strict verification protects integrity but needs observable failure reasons that do not reveal secret keys or full sensitive payloads.

5. Validation, follow-ups and self-review

Test body whitespace changes, stale timestamps, duplicate delivery and both rotation keys. Follow-up: how do you handle delayed legitimate retries? Self-review: separate authenticity, freshness and idempotency.

Sources and related practice

Technical reference: docs.stripe.com — Raw-body signature verification as a concrete provider example; other providers differ.

Source publication/update: Not established. Retrieved October 1, 2026. The workflow, calculations and review exercises are original; this reference is not evidence that a company asked this question.

Continue with Design a reliable webhook delivery platform; Reconcile event order across unsynchronized systems.

Continue your preparation

Choose a connected learning path or browse more FDE interviews questions. Read our editorial method and attribution policy.