webhook signature
A signature, usually an HMAC of the request body made with a shared secret, that proves a webhook delivery came from the real provider and was not altered.
Without it anyone can send forged events to your endpoint.
In more detail
The receiver recomputes the HMAC over the exact raw body and compares it in constant time; a mismatch is rejected with 401. Include a timestamp in what is signed to limit replays.
Related terms
- webhook — An HTTP request a provider sends to an address you registered, to tell you an event happened, instead of you polling for it.
- HMAC — A way of combining a secret key with a hash function to produce a tag that shows a message came from someone holding the key and was not changed.
- digital signature — A value computed from data and a secret key that lets anyone with the matching verification key confirm the data came from the key holder and was not changed.
Taught in
- Webhooks Versus Polling — Modern API Architecture: REST, GraphQL & gRPC