Skip to content

Support Paystack webhook secret rotation without downtime - #155

Open
theseven7h wants to merge 2 commits into
NovaCoreLabs1:mainfrom
theseven7h:fix/paystack-webhook-secret-rotation
Open

Support Paystack webhook secret rotation without downtime#155
theseven7h wants to merge 2 commits into
NovaCoreLabs1:mainfrom
theseven7h:fix/paystack-webhook-secret-rotation

Conversation

@theseven7h

@theseven7h theseven7h commented Jul 16, 2026

Copy link
Copy Markdown

Summary

Adds optional PAYSTACK_SECRET_KEY_PREVIOUS so webhook HMAC verification accepts either the current or previous secret during key rotation. API calls continue to use the primary secret only.

Changes

  • Dual-key verification in PaystackProvider.verifyWebhookSignature()
  • Unit tests for primary and previous secret signatures
  • docs/SECRETS.md rotation runbook (7-day overlap window)
  • Paystack env vars in backend/.env.example

Test plan

  • npm test -- paystack.provider.spec.ts
  • Primary secret webhook signature accepted
  • Previous secret webhook signature accepted during rotation
  • Unknown secret rejected

Closes #108

Accept an optional previous secret for webhook HMAC verification during key rotation, with tests and rotation docs.

Closes NovaCoreLabs1#107
@dzekojohn4

Copy link
Copy Markdown
Contributor

@theseven7h fix the CI

@dzekojohn4 dzekojohn4 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

fix the CI

@theseven7h

theseven7h commented Jul 19, 2026

Copy link
Copy Markdown
Author

@dzekojohn4
CI is green now. Added a commit bumping ethnum to 1.5.3 in contracts/Cargo.lock for Rust 1.97 compatibility. Ready for re-review.

#155

@dzekojohn4

Copy link
Copy Markdown
Contributor

@theseven7h resolve conflicts

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.

Paystack webhook secret rotation runbook & dual-secret support

2 participants