Payload signature
Last updated
Last updated
In addition to the supported authentication methods, One Record provides an extra layer of security by enabling HMAC payload signature verification.
This ensures that the integrity of the webhook payload is maintained during transmission and that the request truly originates from One Record, protecting against man-in-the-middle attacks and unauthorized webhook requests.
HMAC (Hash-based Message Authentication Code) is a method that combines a shared secret key with the webhook payload to create a cryptographic hash.
The receiving endpoint can use this hash to verify the authenticity and integrity of the request.
When a webhook is configured, One Record generates and provides the client with a unique secret key. This key is used to verify that incoming requests are both authentic and unaltered during transmission. For each webhook event, the payload is hashed using the HMAC process with the secret key and the SHA-256 algorithm.
The resulting HMAC signature is included in the request header as X-Signature. Upon receiving the webhook, the client re-computes the HMAC hash of the payload using the same secret key provided by One Record. The computed hash is then compared with the X-Signature value from the request headers. If both signatures match, the request is valid.
The X-Signature contains the HMAC hash of the payload, which is calculated using the secret key and the SHA-256 algorithm