Skip to content

feat: per-publisher signing secret, Redis replay cache, prod signatur… - #145

Merged
Busiii-adetiba merged 1 commit into
SynapsVault:mainfrom
chibeike-AI:feat/signing-secret-replay-cache-42-43-44-45
Oct 20, 2026
Merged

Busiii-adetiba merged 1 commit into
SynapsVault:mainfrom
chibeike-AI:feat/signing-secret-replay-cache-42-43-44-45

Conversation

@chibeike-AI

Copy link
Copy Markdown
Contributor

…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-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.

closes
close #42
closes #43
closes #44
closes #45

…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.
@drips-wave

drips-wave Bot commented Oct 20, 2026

Copy link
Copy Markdown

@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! 🚀

Learn more about application limits

@vercel

vercel Bot commented Oct 20, 2026

Copy link
Copy Markdown

@chibeike-AI is attempting to deploy a commit to the work Team on Vercel.

A member of the Team first needs to authorize it.

@Busiii-adetiba
Busiii-adetiba merged commit 280edae into SynapsVault:main Oct 20, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants