notifications-webhooks

Route and validate JWS-signed webhook requests for Madoc TS.

57|15|Updated Nov 28, 2018
One-click install
npx skills add https://github.com/digirati-co-uk/madoc-platform --skill notifications-webhooks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: notifications-webhooks
Source: https://github.com/digirati-co-uk/madoc-platform/tree/main/.agents/skills/notifications-webhooks
Command: npx skills add https://github.com/digirati-co-uk/madoc-platform --skill notifications-webhooks

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill explains how Madoc TS webhook routes are wired, how webhook definitions are registered, and how webhook URLs are signed and validated to prevent delivery failures, mismatched events, and signature errors.

Core Features & Use Cases

  • Router and endpoints: Describes CRUD, execution, and testing routes registered in services/madoc-ts/webhooks/router.ts and how to extend them.
  • Registry and extensions: Explains WebhookExtension and WebhookServerExtension behavior for registering definitions, plugin overrides, and listing/management of webhooks.
  • Signing and validation: Covers generation of JWS-signed webhook URLs, signature validation against public keys, expiration windows, and the public execution endpoint at /s/:slug/madoc/api/webhook.
  • Use Case: Add a new outgoing event, ensure the signed URL generation matches client expectations, and validate incoming webhook requests from registered plugins.

Quick Start

Generate a signed webhook URL using the WebhookServerExtension.register flow, then validate the signature and execute a test payload against the /s/:slug/madoc/api/webhook endpoint.

Frequently Asked Questions about notifications-webhooks

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate webhook signatures in Madoc?

Validate webhook signatures in Madoc by generating JWS-signed URLs and verifying them against public keys. The WebhookServerExtension handles registration, while the execution endpoint validates expiration windows and signature mismatches to prevent delivery failures.

How do I register a new webhook route in Madoc?

Register a new webhook route in Madoc by using the WebhookExtension to define behavior and applying plugin overrides. Routes are wired through the services/madoc-ts webhook router, covering CRUD, execution, and testing workflows at the designated endpoint.

Why does my webhook URL return a signature validation error?

Webhook URL signature validation errors occur when the JWS-signed URL generation does not match client expectations or the signature expires outside the allowed time window. Validate the URL against the correct public key and ensure the expiration window is configured properly.

What is the execution endpoint for testing webhooks in Madoc?

The execution endpoint for testing webhooks in Madoc is located at /s/:slug/madoc/api/webhook. It accepts test payloads and executes them after validating the JWS signature to ensure the webhook definition is correctly registered and functioning.

Can I override webhook definitions with plugins in Madoc?

Yes, you can override webhook definitions with plugins in Madoc. The WebhookExtension and WebhookServerExtension support registry registration with plugin overrides, allowing you to customize listing, management, and execution behavior for registered webhooks.

How does JWS signing work for webhook URLs?

JWS signing for webhook URLs works by generating a cryptographic signature using a private key, which is then verified against a public key upon delivery. This process ensures the webhook URL is authentic and has not been tampered with before execution.