Skip to main content

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: 1 body 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": "…" }
]
}
FieldWhat it is
versionThe format version: 1. Check it in your receiver
nodoThe node that sends: its id and name
salidaThe output in your console that sends: its id and name
enviadoWhen this delivery left the node (ISO 8601, UTC)
resumentrue if the output groups messages into a digest
mensajesThe 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")​

FieldWhat it is
idThe event's id. Use it to discard repeats
cuandoWhen it happened, according to the sensor
recibidoWhen your console received it
severidadbaja, media, alta or critica, as the console shows it (it rises to critical if it is an alert)
alertaWhy it is an alert, or null
eventoThe event as the sensor signed it: accion, origen, detalle, conexionEstablecida…
trampaThe decoy: id, nombre, modulo and tipo (contenedor, fichero, token or identidad)
sensorThe sensor: id and nombre
nodoThe 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​

HeaderWhat it carries
Content-Typeapplication/json; charset=utf-8
X-Sugardaddy-Firmat=<seconds since 1970>,v1=<hex>
X-Sugardaddy-EntregaAn id for this delivery
AuthorizationOnly 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​

  1. Read the body as raw bytes, before parsing the JSON.
  2. Compute the HMAC-SHA256 of <t>.<body> with your key.
  3. Compare it with v1 in constant time.
  4. Reject it if t is more than 5 minutes away from your clock: it is a replay.
  5. Delivery is "at least once": discard the messages whose id you 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 answerWhat the node does
2xxDelivered
413 or 422You will never accept that content: it is dropped and counted
Anything elseIt 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.