Skip to content

feat(webhooks): signed, idempotent outbound delivery - #405

Open
woahwhattheheck wants to merge 7 commits into
Stellar-Analysis:mainfrom
woahwhattheheck:wire/sa-336-signed-webhooks
Open

woahwhattheheck wants to merge 7 commits into
Stellar-Analysis:mainfrom
woahwhattheheck:wire/sa-336-signed-webhooks

Conversation

@woahwhattheheck

Copy link
Copy Markdown

What

Adds backend/webhooks/ for outbound subscriber notifications (corridor alerts, anomalies, snapshot completions).

  • Stable per-event idempotency key unchanged across retries (event.rs)
  • HMAC-SHA256 payload signatures with per-subscriber secret (sign.rs, X-Stellar-Insights-Signature)
  • Bounded retry-with-backoff delivery (deliver.rs)
  • Queryable delivery status by event id (status.rs)

Why

At-least-once delivery needs a stable idempotency key per logical event, and signature verification is required so forged payloads cannot trigger downstream decisions.

Tested

cd backend && cargo test
  • idempotency_key_test — key stable across retries
  • tampered_payload_test — tampered body fails verification

Closes #336.

Add backend/webhooks with stable per-event idempotency keys, HMAC-SHA256
payload signatures, bounded retry-with-backoff delivery, and queryable
delivery status by event id. Includes idempotency_key_test and
tampered_payload_test.

Closes Stellar-Analysis#336.
@vercel

vercel Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

@woahwhattheheck is attempting to deploy a commit to the christabel888's projects Team on Vercel.

A member of the Team first needs to authorize it.

Apply bounded retry delays through a replaceable sleeper, retain delivery
records for every subscriber of a logical event, and cover retry timing
and subscriber isolation. Document the crate's integration boundaries.
Preserve the existing contribution while providing the complete production
patch for Stellar-Analysis/backend at 965e9162. Include application steps,
original/final digests and native evidence for 26 passing HTTP, persistence
and authenticated API regressions. Document pending backend landing and
remaining whole-suite limitations.
Retain nanosecond Duration precision, scale until max_backoff rather than
freezing the exponent at 16, and safely saturate extreme attempt numbers.
Preserve the default schedule, zero-delay policy, bounded attempts,
signing, idempotency and subscriber status. Add two focused regressions
to the existing delivery test file and document the timing contract.
Both issue-required Rust test targets pass: five delivery cases and the
signature-tampering case, zero failures/ignored, Cargo exit0. Run37200239373
executes product499c7f6c source and unchanged lockfile on Rust1.98.1.

Retain the actual prior-code1-pass/2-fail result and runner count-guard
correction. Keep requested timing, library execution and separate backend
deployment boundaries explicit. No temporary workflow enters this branch.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Signed, idempotent webhook delivery for subscriber integrations

1 participant