Skip to main content
When signing is enabled for an endpoint, every request includes an X-Rolla-Signature header. Verifying it lets you confirm the request came from Rolla and was not tampered with in transit.
Signing is optional and enabled per endpoint. If you disable it, requests are sent without the X-Rolla-Signature header. We strongly recommend keeping it on for production.

The signature header

How the signature is computed

Rolla builds a signed string by concatenating the timestamp, a literal ., and the raw request body:

Verifying

1

Read the raw body

Verify against the exact raw bytes of the request body, before any JSON parsing or re-serialization.
2

Recompute the HMAC

Concatenate t, ., and the raw body, then compute HMAC_SHA256 with your endpoint’s signing secret.
3

Compare in constant time

Compare your computed value against v1 using a constant-time comparison.
4

(Recommended) Check the timestamp

Reject requests whose t is too old (for example, more than 5 minutes) to mitigate replay.

Node.js (Express)

Python (Flask)

Always verify against the raw request body. If your framework parses JSON and you re-serialize it, the bytes may differ (key order, whitespace) and the signature will not match.