Zum Inhalt springen
NEUMarktplatz und trig8n Agent: Verkaufen Sie, was Sie bauen, und erhalten Sie Pläne und Änderungen, die getestet sind, bevor Sie sie sehen. Neuigkeiten ansehen

Bibliothek / Sicherheit & Compliance

Sicherheit & Compliance

Prüft HMAC-SHA256-signierte Webhook-Anfragen, bevor Geschäftslogik ausgeführt wird

Läuft bei jedem eingehenden Webhook. Prüft die HMAC-SHA256-Signatur des Rohtexts und lehnt Anfragen mit Zeitstempeln außerhalb eines 300-Sekunden-Fensters ab.

Was sie bewirkt

## 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.

Die Schritte

  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

Ähnliche Automatisierungen