Skip to content

Feat/clean webhook security#336

Open
birdcoin0 wants to merge 13 commits into
ChainForgee:mainfrom
birdcoin0:feat/clean-webhook-security
Open

Feat/clean webhook security#336
birdcoin0 wants to merge 13 commits into
ChainForgee:mainfrom
birdcoin0:feat/clean-webhook-security

Conversation

@birdcoin0

Copy link
Copy Markdown

Description

This PR implements HMAC-based webhook security for the ChainForge AI Service integration. It ensures that webhook notifications received by the backend are authentic, untampered, and recent.

Changes

  • AI Service (tasks.py): Added sign_payload helper to generate SHA256 HMAC signatures with timestamps.
  • Backend (webhooks):
    • Implemented WebhookGuard for signature validation and clock-skew protection (5-minute window).
    • Added WebhookController to handle incoming secured notifications.
    • Registered new components in AppModule.
  • Configuration: Enabled rawBody: true in main.ts to support signature verification.
  • Documentation: Added detailed docs on how to implement the signing mechanism.

Related Issue

Closes #221

Copy link
Copy Markdown
Contributor

Hi 👋 Appreciate this PR! The CI is flagging a failing check — could you take a peek at the failed job and push a fix? Happy to help if you need a hand 🙏

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.

Webhook HMAC signature verification for backend → external webhooks

2 participants