Перейти к содержанию
НОВОЕМаркетплейс и trig8n Agent: продавайте то, что создали, и получайте планы и изменения, проверенные до того, как вы их увидите. Что нового

Библиотека / Безопасность и комплаенс

Безопасность и комплаенс

Проверка подписанных HMAC-SHA256 webhook-запросов до запуска любой бизнес-логики

Запускается на каждый входящий webhook. Проверяет подпись HMAC-SHA256 по исходному телу запроса и отклоняет запросы с временной меткой вне окна 300 секунд.

Что делает

## Verify a signed webhook before business logic ### Who this is for Automation teams receiving server-to-server webhooks from a provider that signs the exact request body with HMAC-SHA256. ### Contract used by this template - Header: X-Automation-Signature: sha256= - Signature input: the exact raw request body bytes - Body fields: event_id, signed Unix timestamp sent_at, and payload - Freshness: no more than 300 seconds old or 60 seconds in the future ### Set up 1. Keep the workflow inactive after import. 2. Create an n8n Crypto credential with the shared HMAC secret. 3. Assign it to Compute Body HMAC. 4. Match the provider's exact header, canonical string, digest encoding, and timestamp rules. 5. Add business nodes only after the true output of Is Request Authentic and Fresh. ### Boundaries The timestamp limits replay time but does not stop duplicate delivery inside the five-minute window. Add persistent event-ID deduplication for strict once-only handling. Apply rate and body-size limits before n8n. Generic 401 responses avoid exposing which check failed. The public workflow contains no credential or real data.

Шаги

  1. Receive Signed Webhook
  2. Compute Body HMAC
  3. Validate Signature and Timestamp
  4. Is Request Authentic and Fresh
  5. Accept Authenticated Request
  6. Reject Invalid or Stale Request

Похожие автоматизации