Encrypt synchronized Later plans at rest #1114

Closed
opened 2026-08-19 05:26:49 +00:00 by timmy · 0 comments
Owner

Problem

Synchronized Later plans currently retain item/repository identities, wake timestamps, Today handoff intent, and per-item conflict identities as plaintext in later.sqlite3. File permissions prevent accidental sharing but database snapshots and backups expose the operator’s deferred-work plan. Adjacent Today, Draft, push-subscription, and worker-snapshot stores already use authenticated private-state envelopes.

Scope

  • Encrypt each account’s Later plan and per-item revision identities with the injected private-state key and account-bound authenticated context.
  • Lazily and atomically migrate legacy plaintext without advancing the logical plan revision.
  • Fail closed for missing/wrong keys, tampering, or cross-account ciphertext substitution.
  • Preserve existing batching, replay, stale-intent, retention, and account-isolation behavior.

Acceptance tests

  • New writes leave no item ID, repository name, wake timestamp, or handoff value in Later application columns.
  • Legacy plans and item revision rows read normally and migrate without changing API shape/revision.
  • Wrong-key, tamper, and cross-account substitution tests return no private content.
  • Focused and full test suites pass.

No open/closed issue or recent commit implements Later-store encryption; the closest shipped work encrypts the separate Today store (#1112).

## Problem Synchronized Later plans currently retain item/repository identities, wake timestamps, Today handoff intent, and per-item conflict identities as plaintext in `later.sqlite3`. File permissions prevent accidental sharing but database snapshots and backups expose the operator’s deferred-work plan. Adjacent Today, Draft, push-subscription, and worker-snapshot stores already use authenticated private-state envelopes. ## Scope - Encrypt each account’s Later plan and per-item revision identities with the injected private-state key and account-bound authenticated context. - Lazily and atomically migrate legacy plaintext without advancing the logical plan revision. - Fail closed for missing/wrong keys, tampering, or cross-account ciphertext substitution. - Preserve existing batching, replay, stale-intent, retention, and account-isolation behavior. ## Acceptance tests - New writes leave no item ID, repository name, wake timestamp, or handoff value in Later application columns. - Legacy plans and item revision rows read normally and migrate without changing API shape/revision. - Wrong-key, tamper, and cross-account substitution tests return no private content. - Focused and full test suites pass. No open/closed issue or recent commit implements Later-store encryption; the closest shipped work encrypts the separate Today store (#1112).
timmy self-assigned this 2026-08-19 05:26:49 +00:00
timmy closed this issue 2026-08-19 05:38:48 +00:00
Sign in to join this conversation.
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#1114
No description provided.