X-OneCodex-Signature HTTP header with all delivered webhooks. These signatures are generated using a hash-based message authentication code (HMAC) with SHA-256. Here’s an example header:
t= provides a Unix timestamp and v1= provides the v1 signature (currently the only signature scheme). The signature uses a webhook secret (defaults to the API key for your account) to sign the POST payload body and timestamp. To verify the signature of the payload, you need to:
- Extract the timestamp and signature from the headers
- Concatenate the the timestamp and request payload with a
.to generate a signed payload - Determine the expected signature; and finally
- Verify that the expected signature matches the received signature
In the near future, we plan to add support for parsing
Event objects and verifying the signatures from a webhook payload in our onecodex Python library. This will offer an easy, one line mechanism for verifying payload POST bodies sent by our platform.
