Your system can verify these payloads using the corresponding public key, which Callers provides. This process guarantees the integrity and authenticity of the data sent to your system.
Overview of the Process
Signed Webhooks
Each webhook sent by Callers is securely signed using a cryptographic process. Callers utilizes HMAC (Hash-based Message Authentication Code) with the SHA-256 algorithm for signing. The procedure involves using both the webhook payload and a unique encryption key as inputs to generate a signature. This method ensures that the signature is tightly bound to the payload and the encryption key, making it both unique and secure. The resulting signature is then attached to the webhook request within a custom header namedX-Signature. This setup enables the recipient to readily extract and validate the signature against the expected payload, ensuring its authenticity.
Verification Process
Upon receiving a webhook, follow these steps to verify its authenticity:- Extract both the payload and the
X-Signatureheader from the incoming request. - Use the public key to verify the signature instead of computing the HMAC yourself. In this case, the public key would be used to check that the X-Signature matches a valid cryptographic signature for the received payload.
- Compare the result:
- If the public key verification succeeds, then the payload is confirmed as authentic.
- If the verification fails, the payload should be considered compromised or originating from an untrusted source and discarded.
Public Key
Ensure that your public key file is loaded into your application as shown in the examples above. Here is the public key of Callers:public-key.pem