Skip to main content
Version: v1 (Current)

Webhook Security

Authentication depends on the webhook direction and integration. Outgoing subscription deliveries, incoming provider/broker callbacks and internal agent callbacks do not share one universal header or signing scheme.

Outgoing subscription signatures​

The current outgoing signer uses X-Signature with a plain lowercase hexadecimal HMAC-SHA256 over the serialized JSON payload. Verify the exact raw request bytes with the subscription secret before parsing the JSON. Do not prepend sha256= or reserialize an already parsed object to calculate the receiver's comparison.

A Node.js verifier with safe malformed-input handling is:

const crypto = require('node:crypto')

function verifyGxpWebhook(rawBody, signature, secret) {
if (!Buffer.isBuffer(rawBody) || typeof signature !== 'string') return false
if (typeof secret !== 'string' || secret.length === 0) return false
if (!/^[a-f0-9]{64}$/i.test(signature)) return false
const received = Buffer.from(signature, 'hex')
const expected = crypto.createHmac('sha256', secret).update(rawBody).digest()
return received.length === expected.length && crypto.timingSafeEqual(received, expected)
}

This example expects a nonempty string secret supplied by server configuration. If that configuration is missing, reject the delivery and repair the configuration; do not accept unsigned requests as a fallback.

Your HTTP framework must preserve the raw body before its JSON parser changes it. Read the X-Signature header case-insensitively, call the verifier, reject failures, then parse and validate the payload. A signature proves authenticity/integrity for this secret; it does not validate the event's business data or prevent processing it twice.

Subscription secrets​

Store secrets in the receiver's server secret configuration. Normal subscription listings hide/mask the secret; the integration API returns it on creation because it is also the credential required for its unsubscribe contract. Do not place it in an attendee app, URL, screenshot or public log.

Rotate through the supported management flow and coordinate the receiver's configuration. For subscription dispatch, the signature is computed before the job is queued. Rotation changes the stored secret for future dispatches; a job already queued retains its existing signature. Changing only the receiver to the new secret can therefore reject older queued work, while leaving it on the old secret rejects new work.

Plan the transition with the operator responsible for the queue and receiver. If the receiver temporarily accepts both secrets, keep that overlap limited to the migration and remove the old value afterward. Do not assume rotation cancels queued jobs, changes their signatures or provides a built-in grace period. The dashboard reveals the newly generated value once; copy it to server configuration before closing the dialog. Rotation and its audit entry are committed together, and the audit excludes secret material.

Incoming callbacks​

Incoming endpoints have route-specific authentication. Many platform callbacks use X-Webhook-Secret; broker/provider callbacks can use a separate path token, provider verification or dedicated signature middleware. Internal orchestrator/planning callbacks use their own signed schemes.

Use the integration-specific provisioning and deployed endpoint reference. An outgoing subscription secret cannot be used as a general incoming platform secret. See Incoming Webhooks.

Targets and transport​

Outgoing destinations must be public HTTPS targets with valid certificates. The platform rejects unsafe/private targets, rechecks addresses at delivery and does not follow redirects. Use the final public receiver URL; changing DNS or returning a redirect is not a supported way to bypass that validation.

Replay duplicate and payload handling​

Check supported event identity fields and maintain durable deduplication for business effects. The signature contains no built-in freshness or single-use check. A previously valid body/signature can still pass verification later while the same secret is accepted. Do not invent a delivery timestamp/header that the sender does not supply. Validate required fields and project/resource identities after signature verification, and use a queue/transaction appropriate to your receiver's work.

Record event identity and a redacted outcome for diagnosis. Retain only the payload data needed for the integration. Test the receiver against tampering, invalid signatures, duplicates and an unsupported event shape using the isolated acceptance procedure. Keep these tests away from production business effects.