urllib.request from stdlib.
WebhookConfig
Configuration for a single webhook endpoint.Import
Constructor
Parameters
Signature Verification
Whensecret is set, every webhook request includes an X-Attesta-Signature header containing an HMAC-SHA256 signature of the request body:
WebhookDispatcher
Subscribes to anEventBus and dispatches HTTP webhooks in background threads. Deliveries are fire-and-forget — they never block the approval pipeline.
Import
Constructor
The dispatcher automatically subscribes to the relevant event types based on the configs. No additional setup is needed after construction.
Webhook Payload
Every webhook POST request sends a JSON body with this structure:Full Example
Webhook deliveries run in daemon threads. If the main process exits before a delivery completes, the webhook may not be sent. For critical notifications, consider increasing the
timeout and retry_count values.Events
The EventBus system that powers webhooks
Production Deployment
Recommended webhook configuration for production