Modules
Receive, verify, and deduplicate incoming webhooks. Sign, deliver, retry, and track outgoing webhooks.
Endpoint body_reader that caches the raw, pre-parser request bytes for
signature verification.
The event catalog read surface: the outbound DSL's declared metadata
(each event type's description, payload schema, and version), read back
for event pickers, doc generation, and payload-version negotiation.
Custody of opaque webhook keys. Secret bytes never return to ash_hooks
after store/4.
An ExUnit case template for implementations of AshHooks.Custody.
An opaque custody key, identified by custodian, reference, canonical tenant,
and the kind fixed when it was stored. Contains no secret material.
Sender public verification material uses AshHooks.Custody.PublicKey.
A pinned sender public key with its host-selected asymmetric algorithm.
Drives one durable outbound delivery through signing, HTTP, and result
persistence. It uses your resource modules and configured HTTP adapter.
AshHooks.Worker adds an Oban trigger; this driver also works without Oban.
Lets an application allow or reject a destination URL before the package checks whether its network address is safe. SSRF means server-side request forgery: requests that trick a server into reaching unintended addresses.
Creates one durable delivery for each matching enabled endpoint, then calls the configured queue callback. A failure for one endpoint does not stop the others.
Configures an Ash resource as an outbound webhook destination, including its enable/disable state and references to signing secrets.
A reference to a consumer-held secret, never the secret itself.
An outbound webhook destination URL with registration-time validation.
Computes endpoint health from attempt history and applies an optional sustained-failure disable policy.
Splode error hierarchy for ash_hooks.
The invalid error class: the webhook input or its verification failed.
An inbound webhook's signature did not verify under the provider's scheme.
A custody key or pinned public key has a kind that cannot perform the requested operation.
This is a final configuration fault. Telemetry reason: :key_kind_mismatch.
The webhook payload does not have the shape the provider expects.
The signing secret for an inbound webhook's provider is unconfigured or unavailable. The caller verifies nothing and does not run the handler.
The timestamp carried by a windowed provider's signature falls outside the allowed replay window, or a JWS expiration or not-before claim rejects the current time.
The payload's event type is not one the provider knows.
A custody key is absent or belongs to another tenant.
A displaced reference is refreshed once from its owner. A reference still
admitted by that owner is a final configuration fault. Telemetry reason: :unknown_key.
An inbound source could not be resolved. Telemetry reason: :unknown_source.
The unknown error class: unrecognized failures inside ash_hooks.
Custody could not answer a key operation. This failure is retryable.
Telemetry reason: :key_unavailable. Contains no backend error details.
An error ash_hooks did not recognize.
An outbound event: its identity, type, exact payload bytes, and optional context.
HTTP adapter contract for outbound delivery.
The default AshHooks.Http adapter: HTTP/1.1 over :gen_tcp and :ssl,
with bounded response collection and one operation deadline.
Checks that an HTTPS certificate names the destination's literal IP address in an IP subject alternative name. Certificate-chain validation alone does not establish that match.
An AshHooks.Http adapter built on OTP's :httpc.
Configuration for one inbound webhook declaration.
One resolved inbound declaration, shared by the HTTP entry point and ingress.
Turns the consumer's resource into the inbound webhook ledger, the
durable deduplication record used by AshHooks.Ingress.
Plans and applies adoption of provider-defined inbound identities.
A decoded inbound webhook body, stored as a JSON object or array.
A host-owned resource for inbound webhook keys, provider selection and pause.
Reads compiled webhook declarations and delivery configuration.
The inbound pipeline driver: verify → ingest → claim → handle → mark,
over a ledger resource carrying the AshHooks.InboundDelivery extension.
Tracks opaque webhook keys that must be destroyed, using a host Ash resource.
Shared keyset pagination over a stable (time, id) ordering: newest
first, opaque cursors, and {:ok, %{records:, next_cursor:}} pages.
The legacy HMAC webhook envelope for receivers using the :legacy or
:dual signing modes.
Configuration for one outbound declaration in the AshHooks DSL.
Turns the consumer's resource into the outbound attempt history: one durable row per delivery attempt, written by the delivery runtime beside its fenced result transitions.
Builds the versioned, opaque identifiers stored in outbound delivery rows.
Turns the consumer's resource into the outbound delivery ledger: a durable,
deduplicated obligation recording that an event must be delivered to an
endpoint (the outbound twin of AshHooks.InboundDelivery). Sends remain
at-least-once, and receivers deduplicate retries by webhook id.
Turns the consumer's resource into the outbound EVENT log: exactly one row per dispatched event (its id, type, declared payload version, time, and exact payload bytes), recorded whether or not any endpoint was enabled (or existed), with its own retention.
Optional Plug adapter for the synchronous inbound webhook pipeline.
Complete, metadata-derived primary-key handling for AshHooks ledgers.
Behavior for inbound webhook providers.
An ExUnit case template for a provider's hand-written decode_payload/2.
Durable context for provider callbacks, with and without a source resource.
A verified webhook returned by a configured provider's default handler.
A host-configured HMAC verifier for an emitter whose wire contract you own.
Reference provider for tests and examples: HMAC-SHA256 over the raw body via
the default implementation, event type from payload["type"], and an
echoing typed event.
Typed event echoed by AshHooks.Provider.Mock.handle_event/2.
A caller-configured webhook verification contract.
Stateless webhook signature verification with caller-pinned keys and algorithms.
Standard Webhooks signing and verification for v1 (HMAC-SHA256) and
v1a (ed25519), over msg_id.timestamp.payload.
Destination validation for outbound webhooks.
Turns the consumer's resource into the outbound Subscription, specifying which events go to which endpoint, and with which signature envelope.
Lifecycle events for ingress, queue admission, outbound delivery, and key disposal.
Validates an operation's resource modules against a tenant.
Use another transport for an endpoint while retaining signing, retry handling,
attempt history, and telemetry. A transport implements the same request/5
contract as an HTTP adapter.
Defines an Oban worker in the consuming application. Define the worker in
your application when Oban is installed. The package also compiles and works
without Oban; use AshHooks.Delivery.run/2 for direct delivery.
Mix Tasks
Installs ash_hooks into a host application