Urgent.News

What's breaking now, across hundreds of outlets.

Tech

Is That Webhook Really From Your Review Tool? Signatures, Replays and Retries

Here's an illustrative setup. Your app drafts replies with a model, and a separate review tool lets a person approve, edit or reject each draft. When the reviewer acts, the tool sends a webhook to /hooks/review and your app updates the case. That endpoint is public. Anyone who finds the URL can post {"action": "approved"} to it. And even honest deliveries arrive more than once, because senders…

When a reviewer acts on a draft, the review tool sends a webhook to a public endpoint, which can be accessed by anyone. The delivery arrives more than once, as senders retry when they don't receive a quick 2xx response. The receiver must verify that the sender holds a shared secret, refuse old deliveries that have been recorded and replayed, and handle repeated deliveries harmlessly.

To validate the webhook, the sender computes an HMAC-SHA256 of the payload with a shared secret and includes it in a header. The receiver should also compute the same value and compare it to the received signature, using a constant-time function instead of plain equality comparison. The webhook should only sign the message ID, timestamp, and body together, and the receiver should check the timestamp against a tolerance and use the message ID as an idempotency key.

Several signatures can be included in the signature header for secret rotation without downtime. The receiver should accept the data, store it, and return a 2xx response, allowing a separate worker to apply the review decision later.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in Tech

Reading the DOBI snapshot: device identity, demo fleets, and x402 payments

DOBI is positioning itself as an agent-native IoT platform: device identity, fleet telemetry, configurable automation, and optional pay-per-use via x402.

  • DOBI focuses on device identity, fleet telemetry, and x402 payments
  • Device identity is root, payments are leaf in platform structure
  • ESP32 reference path for device onboarding with device ID and key

A first-year SaaS discount is a price increase with a delayed invoice

A 50% off first year looks generous at checkout. On a $240 annual plan sold at $120, the customer has agreed to a $120 jump at renewal, often billed automatically.

  • First-year SaaS discount appears as price increase with delayed invoice
  • 80 customers buying discounted annual plan generate $9,600 in year-one cash
  • Additional 80 customers needed to offset discount and marketing costs

Next.js Protected Routes: Why a Session Cookie Check in proxy.ts Isn't Enough

I asked an AI assistant for a simple thing: a team dashboard in a Next.js 16 app (Better Auth + Drizzle + Postgres), visible only to signed-in users. It looked done.

  • Proxy.ts checks session cookie presence but doesn't verify authenticity
  • Fake cookie allows access to dashboard with user data
  • Implement session check closer to data access layer for security

More from Monday, 30 November 2026 →