Your CRM retries a webhook after n8n has been unavailable. The signature is valid, but the timestamp inside the signed body is hours old. Should you reject it?
Check the sender’s retry policy first. In my Perfex–n8n bridge, retries keep the original signed body. With the default five-retry schedule, the delays add up to 17h20m. The verifier accepts an 18-hour window. If you increase the retry count, you also need to revisit that window; the default margin no longer covers the full schedule.
The source, n8n blueprint and test harness are here:
marchikx/perfex-n8n-bridge-platinum
From the repository root, run:
node tests/verify-node.test.js
The harness runs the verifier code extracted from the blueprint with simulated inputs. It checks signature handling, acceptance at retry-age thresholds and repeated requests. It does not test the PHP queue or a deployed n8n workflow end to end.
Two details matter before borrowing this pattern.
The repeat key is the HMAC: a fingerprint of the signed bytes, not an event ID. An unchanged retry produces the same signature, but so can two separate events with identical bodies. A regenerated body produces a different signature even when it represents the same event. For event-level deduplication, give each event a stable ID and preserve it across retries.
This blueprint also stores accepted signatures in workflow static data. That data is persisted after successful production executions, so it can flag later sequential repeats. It cannot reserve an event atomically: two overlapping runs can both pass the check, and a failed run may not persist it. For order or invoice creation, use a durable atomic claim tied to recoverable work, then protect the destination action separately.
Authentication, delivery deduplication and business-action idempotency answer different questions. A valid signature doesn’t settle the other two.
Does your CRM retry the original signed body, or generate a fresh one?