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 digest

  • X-Signature-Version: Currently always v1

  • X-Timestamp: ISO 8601 UTC timestamp

  • User-Agent: Always WhiteIntel-Webhook


βœ… Validation Logic

You must:

  1. Compute HMAC SHA256 with your secret key

  2. Base64 encode the result

  3. Compare with the X-Signature header securely


πŸ“Œ Important Notes

  • Use === comparison to avoid timing attacks

  • Optionally reject if X-Timestamp is too old

  • Optionally 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