Signature Validation
Webhook Signature Validation
To ensure the authenticity of incoming webhook requests from WhiteIntel, you must verify the HMAC signature of each request.
Each request includes:
X-Signature: Base64-encoded HMAC SHA256 digestX-Signature-Version: Currently alwaysv1X-Timestamp: ISO 8601 UTC timestampUser-Agent: AlwaysWhiteIntel-Webhook
Validation Logic
You must:
Compute HMAC SHA256 with your secret key
Base64 encode the result
Compare with the
X-Signatureheader securely
Important Notes
Use
===comparison to avoid timing attacksOptionally reject if
X-Timestampis too oldOptionally check description values. The values are static based on the match_types and will never change unless we officially announce new descriptions.
Example: PHP
Example: Node.js (Express)
Example: Java (Spring Boot)
Example: Python (Flask)
Example: Ruby (Sinatra)
Example: .NET Core (C#)
Last updated