X-SmartAlex-Signature header. Verifying it lets you reject forged requests, including replay attacks and any third party that gets hold of your endpoint URL.
Signatures apply to envelope-mode tools only. If you switch a tool to passthrough mode (a flat body template for third-party APIs), we send no
X-SmartAlex-Signature and no X-SmartAlex-* headers, the request authenticates with the credential you embed in the template instead. Everything on this page is about envelope mode.The algorithm
- Take the raw request body bytes exactly as received (do not re-serialize).
- Take the millisecond timestamp from the
t=part ofX-SmartAlex-Signature. - Compute
HMAC-SHA256(secret, timestamp + "." + rawBody)and compare it, in constant time, against thev1=part of the same header. - Reject signatures older than 5 minutes (defense against replay).
shs_ and is 64 hex characters.
The header shape
The
v1= prefix is reserved for the version of the signing scheme. If we ever need to change it, future requests will carry v2=... and existing verifiers will reject them, prompting a doc-driven upgrade, never a silent break.
Constant-time comparison
Always use a constant-time string comparison (crypto.timingSafeEqual in Node, hmac.compare_digest in Python, etc.). A naive == comparison can leak the secret one byte at a time via timing.
Code samples
Rotating the signing secret
Hit Rotate in the Custom HTTP Tools manager. The dashboard shows the new secret once. Save it the same way you saved the first one.Common pitfalls
Next: Error codes
Every failure mode the runtime can surface, with
error_message and llm_message.
