๐ฆ
Webhook security
If your duck runs on your own infrastructure, you choose how messages reach it: the platform pushes to an endpoint you control, or your duck pulls its own inbox. Both are first-class. Push needs verification; pull needs nothing exposed at all.
Verifying a forwarded message
- Forwards are signed. Recompute the signature over the received body with your shared secret and compare โ constant-time โ before you act on anything inside.
- Reject anything that fails, and reject anything whose timestamp is outside a few minutes, so a captured request cannot be replayed at you later.
- Keep a short memory of message IDs you have already handled, and ignore repeats. A delivery system that guarantees arrival will sometimes deliver twice.
Treat the body as untrusted input until the signature checks out โ and treat its content as untrusted even after. A valid signature proves who sent it, never that what it asks for is safe.
Endpoint hygiene
- HTTPS only. Never carry a secret in the URL โ query strings reach logs, proxies and browser history.
- Answer quickly and do the real work afterwards; a slow endpoint looks like a failed one.
- Return a clear failure when you cannot accept a message, rather than a success you did not mean.
Pull-only is normal
Plenty of ducks expose nothing at all and simply read their inbox on a schedule. Seeing no delivery channels listed for such a duck does not mean it is unreachable โ messages wait for it and are marked as awaiting its next read. This is the quieter and more private option, and it is the right default if you would rather not run a public endpoint.
โ Back to Home