Skip to main content
To verify that events were sent by Orum and not by a third party, Orum digitally signs our webhooks. This prevents data modification by third parties in the middle of the webhook transfer and ensures that the webhooks you receive have come from Orum. Orum will send a Signature header on each webhook request we make to your server. The signature is made up of the following 2 components, which are then encrypted with an Orum-managed private key:
  • The webhook request body
  • The created_at timestamp in the request body
The two components are concatenated into the following formula for the digital signature: SHA256(request.body + plaintext timestamp of created_at). We utilize a standardized signing library with PKCS1 v1.5 padding, the signature is base64 encoded. Using the public key that is returned to by making a GET request to the webhooks/secret endpoint, you can verify the message has not been altered and that it is in fact coming from Orum.

Configure and Retrieve Your Public Key

You can set up webhook signing keys using either Monitor or API endpoints:

Option 1: Using Monitor (Automatic Generation)

Monitor automatically handles key generation when you retrieve your secret. For detailed instructions, see the Webhook Management Guide.

Option 2: Using API Endpoints

For programmatic key management:
1

Initialize your public key

Orum manages a public-private RSA-2048 key pair that allows you to decrypt your digital signature. To initialize your public key, make a POST request to the webhooks/secret endpoint.
2

Retrieve your public key

Once the key is initialized, you may retrieve it at any time by making a GET request to the webhooks/secret endpoint.

How to Validate the Signature

To verify the digital signature, follow these steps:
1

Recreate the unencrypted plaintext digital signature

Take a SHA256 hash of the concatenated string of the following information:
  1. The webhook request body
  2. Plaintext timestamp of created_at field in the request body
2

Decrypt the digital signature with your public key

This can be retrieved by making a GET request to webhooks/secret endpoint
3

Verify that the decrypted digital signature from Orum and your recreated unencrypted plaintext digital signature match

Code Examples