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]— sharedRedisReplayStorefor 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/.
Site docs: webhooks how-to.
Metadata
Release files for authweave-webhooks 8.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| authweave_webhooks-8.0.2.tar.gz | 12.6 kB | With provenance | Details for authweave_webhooks-8.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| authweave_webhooks-8.0.2-py3-none-any.whl | Python 3 | none | any | Details for authweave_webhooks-8.0.2-py3-none-any.whl |
Total release size: 30.2 kB
Release files / authweave_webhooks-8.0.2.tar.gz
| Download URL | authweave_webhooks-8.0.2.tar.gz |
|---|---|
| Size | 12.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
64f4911abe7522ca367fb54f328d3aa089a23b71671263dd72ad910c97542d05
|
|
BLAKE2b-256 checksum How to use checksums |
fb023956ac30b6660e1635f2ec5feec14448e4a54a76e9eb63623211ef33a286
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 25, 2026.
Transparency logRelease files / authweave_webhooks-8.0.2-py3-none-any.whl
| Download URL | authweave_webhooks-8.0.2-py3-none-any.whl |
|---|---|
| Size | 17.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
86cdf3c249efb06a41c611214a64357f249711c090c1b5027b311d5c9b6001a0
|
|
BLAKE2b-256 checksum How to use checksums |
afba95982537643e8141a57def1eac10a3a883f8b0f4f546bac91d4106a799ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 25, 2026.
Transparency logSecurity for authweave-webhooks 8.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for authweave_webhooks-8.0.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 25, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.