Encrypt Web Push subscriptions at rest #1109

Merged
rockachopa merged 1 commits from timmy/1108-encrypt-push-subscriptions into main 2026-08-19 02:41:04 +00:00
Owner

Closes #1108

What changed

  • seal complete Web Push subscriptions with session-bound AES-256-GCM envelopes
  • replace plaintext endpoint uniqueness with a keyed HMAC blind index
  • atomically migrate legacy plaintext rows while preserving delivery and deadline state
  • require an independent push-state key only when VAPID enables Web Push
  • fail closed on wrong keys, tampering, and cross-session ciphertext substitution

Verification

  • .venv/bin/pytest -q tests/test_push_notifications.py tests/test_deadline_reminders.py — 69 passed
  • .venv/bin/pytest -q — 2109 passed, 8 skipped
  • git diff --check — clean
Closes #1108 ## What changed - seal complete Web Push subscriptions with session-bound AES-256-GCM envelopes - replace plaintext endpoint uniqueness with a keyed HMAC blind index - atomically migrate legacy plaintext rows while preserving delivery and deadline state - require an independent push-state key only when VAPID enables Web Push - fail closed on wrong keys, tampering, and cross-session ciphertext substitution ## Verification - `.venv/bin/pytest -q tests/test_push_notifications.py tests/test_deadline_reminders.py` — 69 passed - `.venv/bin/pytest -q` — 2109 passed, 8 skipped - `git diff --check` — clean
timmy added 1 commit 2026-08-19 02:34:57 +00:00
security: encrypt Web Push subscriptions at rest (Closes #1108)
All checks were successful
CI / lint (pull_request) Successful in 2m44s
CI / build-release (pull_request) Successful in 7s
CI / browser-journey (pull_request) Successful in 2m47s
CI / release-candidate (pull_request) Has been skipped
67d3242f37
rockachopa merged commit 9a471b7903 into main 2026-08-19 02:41:04 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: stackchain/stackchain-dashboard#1109
No description provided.