Signed webhook format
The Signed webhook output sends events and alerts to an https address of yours (your
SOAR, your incident tracker, a script of your own) as a JSON POST. This page describes what
each delivery carries and how your receiver checks it. How to create the output is in
Signed webhook.
The output has two body formats, chosen in Body format:
- Event contract v1, which new webhooks propose: the stable, versioned format shared with the API and syslog JSON. It is described in Event contract v1.
- Legacy format, the
version: 1body described on this page. Webhooks created before the contract keep it until you change it. It does not change.
The headers, the signature and how to answer are the same in both.
The legacy body
{
"version": 1,
"nodo": { "id": "node-madrid", "nombre": "Madrid node" },
"salida": { "id": "…", "nombre": "SOAR" },
"enviado": "2026-11-18T10:00:05.000Z",
"resumen": false,
"mensajes": [
{
"clase": "evento",
"id": "…",
"cuando": "…",
"recibido": "…",
"severidad": "alta",
"alerta": null,
"evento": {
"accion": "autenticacion",
"origen": { "ip": "203.0.113.9", "usuario": "root" },
"detalle": { "…": "…" }
},
"trampa": { "id": "ssh-hr", "nombre": "HR SSH", "modulo": "cowrie", "tipo": "contenedor" },
"sensor": { "id": "…", "nombre": "…" },
"nodo": { "id": "node-madrid", "nombre": "Madrid node" }
},
{ "clase": "aviso", "id": "…", "codigo": "salud.trampa-caida", "titulo": "…", "texto": "…" }
]
}
| Field | What it is |
|---|---|
version | The format version: 1. Check it in your receiver |
nodo | The node that sends: its id and name |
salida | The output in your console that sends: its id and name |
enviado | When this delivery left the node (ISO 8601, UTC) |
resumen | true if the output groups messages into a digest |
mensajes | The messages, in order. Each one is an event (evento) or an alert (aviso) |
A delivery is at most 1 MiB. A larger batch goes in several deliveries, each one signed.
An event ("clase": "evento")
| Field | What it is |
|---|---|
id | The event's id. Use it to discard repeats |
cuando | When it happened, according to the sensor |
recibido | When your console received it |
severidad | baja, media, alta or critica, as the console shows it (it rises to critical if it is an alert) |
alerta | Why it is an alert, or null |
evento | The event as the sensor signed it: accion, origen, detalle, conexionEstablecida… |
trampa | The decoy: id, nombre, modulo and tipo (contenedor, fichero, token or identidad) |
sensor | The sensor: id and nombre |
nodo | The node: id and nombre |
origen and detalle are written by whoever touched the decoy. Treat them as untrusted input:
never pass them to a shell or show them as HTML. The values of accion are the same as the
classes trampa.* in the SIEM reference.
Captured credentials (passwords, hashes, tokens) arrive masked unless the output has Captured credentials → Send them in full, as in the SIEM outputs.
An alert ("clase": "aviso")
A health or output alert: id, cuando, severidad, codigo (for example
salud.trampa-caida or salida.prueba), titulo, texto, datos and, when it is about
something specific, sobre (its type, id and name). The codes are in the
SIEM reference.
The headers
| Header | What it carries |
|---|---|
Content-Type | application/json; charset=utf-8 |
X-Sugardaddy-Firma | t=<seconds since 1970>,v1=<hex> |
X-Sugardaddy-Entrega | An id for this delivery |
Authorization | Only if you filled in Authorization header in the output |
v1 is the HMAC-SHA256 of <t>.<body exactly as received>, with the Signing key of the
output.
Check the signature
- Read the body as raw bytes, before parsing the JSON.
- Compute the HMAC-SHA256 of
<t>.<body>with your key. - Compare it with
v1in constant time. - Reject it if
tis more than 5 minutes away from your clock: it is a replay. - Delivery is "at least once": discard the messages whose
idyou already have.
In Node.js:
import { createHmac, timingSafeEqual } from 'node:crypto';
function signatureIsValid(body, header, key) {
const { t, v1 } = Object.fromEntries(header.split(',').map((p) => p.split('=')));
if (Math.abs(Date.now() / 1000 - Number(t)) > 300) return false;
const expected = createHmac('sha256', key).update(`${t}.${body}`).digest();
const received = Buffer.from(v1 ?? '', 'hex');
return received.length === expected.length && timingSafeEqual(received, expected);
}
In Python:
import hmac, hashlib, time
def signature_is_valid(body: bytes, header: str, key: str) -> bool:
parts = dict(p.split("=", 1) for p in header.split(","))
if abs(time.time() - int(parts.get("t", "0"))) > 300:
return False
expected = hmac.new(key.encode(), parts["t"].encode() + b"." + body, hashlib.sha256).hexdigest()
return hmac.compare_digest(expected, parts.get("v1", ""))
How to answer
| Your answer | What the node does |
|---|---|
2xx | Delivered |
413 or 422 | You will never accept that content: it is dropped and counted |
| Anything else | It retries later, more spaced out each time (also 400 or 401, which can be a key that does not match) |
If one delivery of a batch fails, the ones before it have already arrived and are not sent again.