Implement optional end-to-end at-rest encryption for the complete local workspace
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 20/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
Hướng nghiên cứu
Read plans/ADRs/048-at-rest-encryption.md and the prototype in src/lib/studio/at-rest-crypto.ts first. Inventory the listed plaintext surfaces and resolve the threat model, key lifecycle, migration, and recovery decisions before implementation. Done means the ADR is accepted, all acceptance criteria are verified, and real-browser migration and recovery tests pass.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
The canonical corpus is currently stored in plaintext in IndexedDB. Encrypted exports and portable backups do not protect the live browser profile. A tested AES-256-GCM/PBKDF2 prototype exists in src/lib/studio/at-rest-crypto.ts, but it is deliberately not wired into persistence.
ADR 048 correctly keeps this proposed until the complete plaintext surface and recovery lifecycle are addressed.
Scope
Treat this as a product/security design and implementation project, not simply wiring the codec into one store.
Phase 1 — Threat model and product decision
- Define the threat model and clearly state that at-rest encryption does not protect against XSS or a compromised running browser.
- Decide optional workspace encryption vs. mandatory encryption.
- Document passphrase loss consequences and recovery requirements.
- Inventory every plaintext surface: canonical IndexedDB, Yjs/y-indexeddb replica, recovery snapshots, quarantine copies, attachments, semantic caches, exports and temporary import data.
- Decide which surfaces are encrypted, excluded with explicit rationale, or disclosed.
Phase 2 — Key lifecycle and UX
- Unlock/lock UI and session lifecycle.
- Keep passphrases and derived keys out of persistent browser storage, URLs and logs.
- Clear in-memory key material and derived sensitive caches on lock as far as browser APIs permit.
- Prevent writes and hydration when unlock fails.
- Provide a verified encrypted backup/recovery route and explicit irreversible-loss warning.
Phase 3 — Persistence migration
- Version the encrypted envelope and authenticate all header fields.
- Use vetted WebCrypto primitives; retain the tested AES-GCM implementation unless a reviewed design change is approved.
- Migrate with write → read-back/verify → commit ordering.
- Never delete plaintext until encrypted data has been verified.
- Fail closed on wrong keys, tampering, unsupported versions and partial migration.
- Ensure no plaintext fallback writes occur while encryption is enabled.
Phase 4 — Verification
- Real-browser shadow/canary tests with representative corpora.
- Kill-tab/mid-write and quota failure tests.
- Verify lock/unlock, backup restore, sync, attachments, search and recovery.
- Inspect all storage surfaces after locking and after migration.
Acceptance criteria
- ADR 048 is accepted with complete threat model and plaintext-surface inventory before shipping.
- No passphrase or raw key is persisted or logged.
- All in-scope corpus surfaces are encrypted or explicitly disclosed/excluded.
- Wrong password/tampering/version mismatch never falls back to plaintext or overwrites data.
- Migration is recoverable and verifies ciphertext before deleting plaintext.
- Encrypted backup restore works on a fresh browser profile.
- Real-browser corpus fingerprints match before and after migration.
- Security review and user-facing recovery warning are complete.
References
plans/ADRs/048-at-rest-encryption.mdsrc/lib/studio/at-rest-crypto.ts- https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto
- Ngôn ngữ chính
- TypeScript
- Star
- 3
- Fork
- 2
- Merge trung bình
- 11 giờ 49 phút
- Pull request đã merge (30 ngày)
- 102
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của d-oit/do-knowledge-studio
-
Migrate do-harness.toml to the current [[sensors]] schema (do-harness CLI 0.6.0 cannot parse it)Đang mởchore config priority: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
d-oit/do-knowledge-studio#1219 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Dependabot only scans the root manifest — add workspace packages/* directories, cooldown, and grouped updatesCó thể đã có người làm @d-oit đã nhận hôm nay. Đang mởci config deps priority: medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
d-oit/do-knowledge-studio#1212 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation priority: low
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
d-oit/do-knowledge-studio#1218 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
chore priority: low skills
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
d-oit/do-knowledge-studio#1217 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
discussion enhancement performance priority: low search
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
d-oit/do-knowledge-studio#1216 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của d-oit/do-knowledge-studio
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
danielmiessler/LifeOS#3028 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
iOS: last line of a long UITextView text is sometimes not drawn (frame a fraction of a point short)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
Koenkk/zigbee2mqtt#33855 ·
Maintainer thường phản hồi trong vòng 1 ngày