Sooner or later a customer's security team asks how they know a request came from you, and the rollout waits on the answer. A shared secret in a header does not answer it. A signature does, and when EchoRelay sends for you, adding one is a setting on the target instead of code your team writes and keeps up.
The usual answer is a header. You generate a long random string, the customer stores it, and every delivery carries it. They compare, and if it matches they act. That is where most integrations start, and it works. It also answers a narrower question than the one that was asked.
A shared header proves someone knows the secret
A static secret in a header proves that whoever sent this request knows the secret. Nothing more. It says nothing about which request it was attached to, when it was sent, or whether the body arrived as it left.
Three things stay open. A copy of the secret, taken from a log line or a screenshot pasted into a support ticket, sends anything at all. A request captured once can be replayed next week and still passes. And the body can be swapped for a different one under the same header, because the header was never derived from the body.
None of that requires a sophisticated attacker. Secrets leak the way every credential leaks: something logs the request.
A signature changes when the body or the time changes
A signature is computed from the request rather than stored beside it. The sender joins a timestamp to the raw body, computes an HMAC over that string with the shared secret as the key, and sends the result. The receiver repeats the computation on what arrived and compares the two.
Now the check covers the request itself. A body altered anywhere between the two ends no longer matches. Because the timestamp is inside the signed string, it cannot be rewritten to make an old capture look fresh: change it and the signature is wrong. So the receiver can reject anything older than a window it chooses. Stripe's own libraries default that window to five minutes, and their documentation is explicit that a tolerance of zero disables the check rather than tightening it.
Be clear about what this does not buy you. A signature is not encryption. Anything that could read the body before can still read it. It answers who sent this and when, not who else saw it.
Four questions for any service that sends on your behalf
If something other than your own code sends those requests, the properties above are its job, not yours. Four questions separate a real implementation from a header with a good name.
- Is the signature computed over the raw body, byte for byte? A provider that signs a re-serialised copy of your JSON will break the moment a framework reorders a key.
- Is the timestamp part of the signed string, or merely sent next to it? Only the first stops a replay.
- Is there a version marker on the scheme, so the algorithm can change without breaking every receiver on the same day?
- Can you roll the secret with both values valid for a period, rather than swapping it at a moment you have to coordinate?
On the receiving side, two habits matter more than the rest. Compare digests in constant time, because a plain string comparison leaks how much of the digest was right. And verify before parsing: the raw body is what was signed, so a JSON decode that runs first has already thrown away the thing you needed.
EchoRelay signs each delivery, retries included
When EchoRelay sends your requests for you, proving where each one came from is our job rather than yours. Give a target a signing secret and every delivery to it is signed in the Standard Webhooks format: the signature covers an id, a timestamp and the raw body, and carries a v1 marker. Each retry is signed again when it is sent, so a late delivery still verifies inside your replay window. To roll the secret, your receiver accepts the old and new values for a while. Any Standard Webhooks library can check it; the steps are in Verify a delivery came from us.
Those four questions are still what to put to any provider that sends on your behalf, including us. A provider that cannot answer them is offering a shared header with a longer name.
Your answer to the security team is a signature any Standard Webhooks library can check, and your engineers write no signing code.