Correct Hooks
Correct Hooks is a library (with a few language implementations and more planned) that packages the steps to sign and verify asymmetric ed25519 signatures for webhook authentication, including key handling and built-in replay protection via a signed timestamp, webhook id, recipient id, and target endpoint url/method.
What it addresses
Webhook auth is not a solved problem: producers commonly use DIY symmetric HMAC schemes that require managing a shared secret per endpoint, while asymmetric signatures are rarely used due to added development complexity (signature details, key formatting, crypto library sharp edges, and consumer-side verification).
Shared over time
Each entry reflects what was shared on that date. Details may have changed since then.
Correct Hooks
Correct Hooks is a library (with a few language implementations and more planned) that packages the steps to sign and verify asymmetric ed25519 signatures for webhook authentication, including key handling and built-in replay protection via a signed timestamp, webhook id, recipient id, and target endpoint url/method.
Problem: Webhook auth is not a solved problem: producers commonly use DIY symmetric HMAC schemes that require managing a shared secret per endpoint, while asymmetric signatures are rarely used due to added development complexity (signature details, key formatting, crypto library sharp edges, and consumer-side verification).
Audience: Developers, both webhook producers and consumers
Posted by @pdiffley · Original source ↗
Story title · @pdiffley · · Source ↗
Show HN: Correct Hooks – Easy webhook auth with asymmetric signatures
Submitted URL · @pdiffley · · Source ↗
https://github.com/handlewithcarecollective/correct-hooks
Source text · @pdiffley · · Source ↗
I pretty quickly found out that webhook auth is not an entirely solved problem with people frequently implementing DIY solutions.
Source text · @pdiffley · · Source ↗
using symmetric signatures, which requires the webhook producer to hold onto a secret for every endpoint they send webhooks to, introduced a major secret management problem
Source text · @pdiffley · · Source ↗
It seemed like the biggest barrier to using asymmetric signatures was added development complexity.
Source text · @pdiffley · · Source ↗
so now I've built that library. With a few language implementations to serve as a template, replicating this in enough languages that the large majority of developers can use it feels totally doable, and I am hoping to get several more languages implemented over the next few weeks.
Source text · @pdiffley · · Source ↗
a quick benchmark proved that wrong (HMAC signing is much faster, but ed25519 is still fast enough that it doesn't matter)
Source text · @pdiffley · · Source ↗
We have replay protection built into the libraries. The signature contains a timestamp, a unique webhook id for the event, the recipient id, and the target endpoint’s url and method.