Skip to content

add signature to webhooks#3

Merged
ericls merged 4 commits intomainfrom
shen/webhook-signature
Apr 2, 2026
Merged

add signature to webhooks#3
ericls merged 4 commits intomainfrom
shen/webhook-signature

Conversation

@ericls
Copy link
Copy Markdown
Owner

@ericls ericls commented Apr 1, 2026

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds optional HMAC-based signatures to outgoing webhook requests and updates configuration/docs to support per-endpoint signing keys.

Changes:

  • Introduce webhook.Sign and X-Certmatic-Signature header generation (timestamp + HMAC-SHA256).
  • Extend webhook dispatcher configuration from URLs []string to Endpoints []Endpoint with optional signing_key.
  • Update Caddyfile parsing, in-memory dispatcher delivery, tests, and documentation to reflect signed webhooks.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
README.md Documents new url { signing_key ... } syntax and links to signature docs.
pkg/webhook/signature.go Implements signature header construction for webhook deliveries.
pkg/webhook/signature_test.go Adds unit tests for signature formatting and HMAC correctness.
pkg/webhook/dispatcher.go Introduces Endpoint struct and updates dispatcher config schema.
internal/webhook/memory.go Signs requests per-endpoint when SigningKey is configured.
internal/webhook/memory_test.go Updates existing tests for endpoints and adds signature/no-signature tests.
internal/caddy/config.go Parses nested signing_key blocks under each webhook url.
internal/caddy/app.go Wires Endpoints into the dispatcher provisioning path.
docs/webhook-signature.md Adds standalone documentation for webhook signature verification.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ericls ericls force-pushed the shen/webhook-signature branch from 120654b to b608929 Compare April 1, 2026 23:06
@ericls ericls merged commit 3b09175 into main Apr 2, 2026
2 checks passed
@ericls ericls deleted the shen/webhook-signature branch April 2, 2026 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants