Skip to main content

authweave-webhooks

Asymmetric Standard Webhooks toolkit for AuthWeave integrations (authweave-standard-webhooks-v1a Ed25519 profile).

This package does not depend on litestar-auth and is not authentication middleware. It verifies or produces webhook deliveries before JSON parsing.

uv add 'authweave-webhooks[redis]'
from authweave_webhooks import (
    Ed25519PublicKey,
    PublicKeyDocument,
    StandardWebhooksVerifier,
    StaticPublicKeyResolver,
)
from authweave_webhooks.redis_store import RedisReplayStore

resolver = StaticPublicKeyResolver(
    PublicKeyDocument(
        version="1",
        environment="sandbox",
        owner="merchant-1",
        endpoint="https://merchant.example/hooks/payments",
        not_before=0,
        retire_after=None,
        keys=(Ed25519PublicKey(public_key),),
    )
)
verifier = StandardWebhooksVerifier(
    resolver,
    replay_store=RedisReplayStore(redis),
    expected_environment="sandbox",
    expected_owner="merchant-1",
    expected_endpoint="https://merchant.example/hooks/payments",
    time_source=lambda: 1_700_000_000,
)
verified = await verifier.verify(headers=headers, body=raw_body)

The replay store is mandatory. After a signature succeeds, verify() atomically claims the webhook-id in a namespace derived from environment, owner, endpoint, and id. The library derives a TTL that covers the complete inclusive timestamp acceptance window; replay-store outage or capacity pressure fails verification closed. A repeated valid delivery is returned with verified.replay_detected=True; the flag is telemetry, not business idempotency.

After every successful verification, atomically insert the complete raw body and verified metadata into a durable inbox with a unique key over environment, owner, endpoint, and webhook_id. Never overwrite an existing row, and acknowledge the HTTP delivery only after that transaction commits. A retry can then restore an inbox row missing after a crash, while a committed row absorbs concurrent or later retries. Use a shared replay store such as Redis in multi-worker deployments.

Pass an optional core SecurityObserver to the verifier or HTTP sender to emit bounded verification/replay/delivery telemetry. Retry and queue consumers may pass TraceCorrelation values through links=; trace context is correlation only and is never accepted as identity.

HttpxWebhookSender requires a non-empty exact endpoint allowlist, disables redirects, and streams at most 65,536 response bytes. The application must also place its HTTP client behind the controlled egress proxy/subnet described in the merchant sender threat model; DNS safety is not inferred from HTTPS syntax.

from authweave_webhooks.sender import HttpxWebhookSender

sender = HttpxWebhookSender(
    httpx_client,
    allowed_endpoints={"https://merchant.example/hooks/payments"},
)
result = await sender.send(endpoint=merchant_endpoint, delivery=delivery)

Extras

  • [redis] — shared RedisReplayStore for fail-closed verification
  • [httpx] — one-shot HTTPS sender without auto-retry
  • [litestar] — raw-body verification helper

Private keys stay inside AsyncMessageSigner implementations. The library never accepts private key bytes on verifier APIs and keeps secrets out of repr / error messages.

See docs/roadmap.md, docs/merchant/webhooks.md, the sender threat model, and ADR 0002 for key-tenancy and egress rules. Language-neutral vectors plus Python and dependency-free Node.js verifiers live in docs/vectors/webhooks/v1a/.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

authweave_webhooks-7.3.3.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

authweave_webhooks-7.3.3-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file authweave_webhooks-7.3.3.tar.gz.

File metadata

  • Download URL: authweave_webhooks-7.3.3.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for authweave_webhooks-7.3.3.tar.gz
Algorithm Hash digest
SHA256 9eaff06634c30b8af2d158c321913ef3903385417b5d930211b4c50995ac42e4
MD5 f5c3fd25cd0e72eec5968a81d5c920b2
BLAKE2b-256 6978ecac076220a7e92518044b5c26240f58efb11f217778f4b33e68bd545ced

See more details on using hashes here.

Provenance

The following attestation bundles were made for authweave_webhooks-7.3.3.tar.gz:

Publisher: 3_release.yml on ZYLVEXT/litestar-auth

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file authweave_webhooks-7.3.3-py3-none-any.whl.

File metadata

File hashes

Hashes for authweave_webhooks-7.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4890dfb7c7cf656c58e614b44540deffe7d119ee20e7f369044ba943481190ed
MD5 2d7016211c24eaf5c1d93d5dcc43b303
BLAKE2b-256 795b2f0b954709a45b44b28f861e910fec7013ed5a7675bd388a95ac7913c0ca

See more details on using hashes here.

Provenance

The following attestation bundles were made for authweave_webhooks-7.3.3-py3-none-any.whl:

Publisher: 3_release.yml on ZYLVEXT/litestar-auth

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

8.0.2

2 files

8.0.1

2 files

8.0.0

2 files

7.3.4

2 files

This release

7.3.3 This release

2 files

7.3.2

2 files

7.3.1

2 files

7.3.0

2 files

7.2.0

2 files

7.1.2

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page