Repository navigation
feat: per-publisher signing secret, Redis replay cache, prod signatur… - #145
Merged
Busiii-adetiba merged 1 commit intoOct 20, 2026
Conversation
…e enforcement, webhook timestamp signing (SynapsVault#42 SynapsVault#43 SynapsVault#44 SynapsVault#45) SynapsVault#42 — Issue per-publisher HMAC signing secret on registration/rotation. Store encrypted (AES-256-GCM) via SIGNING_SECRET_KEY. requestSignatureAuth now looks up the publisher's signing secret from the DB and verifies against it; signatures made with the raw API key alone are rejected. New endpoint: POST /publishers/me/signing-secret/rotate New DB migration: 0014_publisher_signing_secret.sql New helpers: generateSigningSecret, encryptSigningSecret, decryptSigningSecret SynapsVault#43 — Replace per-process replay Map with Redis SET NX + TTL when REDIS_URL is set. Falls back to in-process Map when Redis is not configured. Pruning now runs on a 60 s timer rather than on every request. SynapsVault#44 — REQUIRE_REQUEST_SIGNATURE defaults to true in production, false elsewhere. If it is explicitly off in production a security warning is logged at boot. SIGNING_SECRET_KEY is required (and enforced at startup) when signatures are enabled. SynapsVault#45 — Webhook signatures now cover the timestamp: HMAC input is `${timestamp}.${body}` instead of body alone. Added X-SynapsVault-Id delivery-id header for idempotent deduplication. Docs and tests updated. Also: update .gitignore to exclude test snapshots (__snapshots__/, .vitest-cache/) and other editor/build artefacts.
|
@chibeike-AI Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
@chibeike-AI is attempting to deploy a commit to the work Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…e enforcement, webhook timestamp signing (#42 #43 #44 #45)
#42 — Issue per-publisher HMAC signing secret on registration/rotation.
Store encrypted (AES-256-GCM) via SIGNING_SECRET_KEY. requestSignatureAuth
now looks up the publisher's signing secret from the DB and verifies against
it; signatures made with the raw API key alone are rejected.
New endpoint: POST /publishers/me/signing-secret/rotate
New DB migration: 0014_publisher_signing_secret.sql
New helpers: generateSigningSecret, encryptSigningSecret, decryptSigningSecret
#43 — Replace per-process replay Map with Redis SET NX + TTL when REDIS_URL
is set. Falls back to in-process Map when Redis is not configured. Pruning
now runs on a 60 s timer rather than on every request.
#44 — REQUIRE_REQUEST_SIGNATURE defaults to true in production, false
elsewhere. If it is explicitly off in production a security warning is logged
at boot. SIGNING_SECRET_KEY is required (and enforced at startup) when
signatures are enabled.
#45 — Webhook signatures now cover the timestamp: HMAC input is
${timestamp}.${body}instead of body alone. Added X-SynapsVault-Iddelivery-id header for idempotent deduplication. Docs and tests updated.
Also: update .gitignore to exclude test snapshots (snapshots/, .vitest-cache/) and other editor/build artefacts.
closes
close #42
closes #43
closes #44
closes #45