docs: product/encryption & persona docs badly out of sync with implemented ZK encryption #4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The product-facing docs describing encryption and personas (all dated 2026-03-09) describe a system that does not match what is actually built. The June ADR (
docs/adr/zero-knowledge-encryption.md) and the code tell a different, more advanced story. Anyone (human or agent) reading these docs to understand the system will be misled.Drift found (code-grounded)
docs/product/encryption.mdmarks zero-knowledge encryption as "📋 Planned / Not yet implemented"web/normogen-web/src/crypto/anddocs/adr/zero-knowledge-encryption.md(Phase 1 + Phase 2 done)PERSONA_AND_FAMILY_MANAGEMENT.md: "No dedicated API for profile CRUD"/api/profiles/meGET + PUT are wired (backend/src/app.rs:58-59)encryption.md: encryption is server-side AES-256-GCM with per-user server keysCargo.tomlhas no crypto crates at all — the server is a blind storeencryption.md/jwt-authentication-decision.md: recovery = "client encrypts phrase with password"jwt-authentication-decision.md: claims are{sub, exp, iat, token_type}AccessClaims(backend/src/auth/claims.rs) carryemail, family_id, permissions, jtitooencryption.md"Implementation Status: Security features 85% complete"Docs affected
docs/product/encryption.md— major rewrite needed (see #<desig_issue> for the sharing gap, but the rest can be rewritten now)docs/product/ENCRYPTION_UPDATE_SUMMARY.md— obsolete; should be archived or folded into a rewrite ofencryption.mddocs/product/PERSONA_AND_FAMILY_MANAGEMENT.md— needs honest "what exists today" section (single-profile, no family routes) separate from the visiondocs/adr/jwt-authentication-decision.md— update claims struct + recovery description to match implementationAccurate reference
docs/adr/zero-knowledge-encryption.mdis the only doc that currently matches reality. It should be the canonical source; the others should defer to it or be rewritten to match.Proposed fix
encryption.mdto describe the implemented wrapped-DEK / Web Crypto model (draft in progress in this branch).ENCRYPTION_UPDATE_SUMMARY.md(it's a changelog for a rewrite that's now itself stale).PERSONA_AND_FAMILY_MANAGEMENT.mdinto "implemented today" vs "vision" — implemented = single profile per user,/api/profiles/meonly.AccessClaims.Labels:
docs,bug(because docs actively misstate implementation).Ok to go with the proposed fix
All four docs in this issue are now done (uncommitted, in the working tree):
docs/product/encryption.md— full rewrite to the implemented wrapped-DEK / Web Crypto modeldocs/product/PERSONA_AND_FAMILY_MANAGEMENT.md— "Current reality" section added, old "Implementation Status" marked superseded, encryption section correcteddocs/product/ENCRYPTION_UPDATE_SUMMARY.md— archived todocs/archive/with a header explaining whydocs/adr/jwt-authentication-decision.md— rewritten to match the implementation; original aspirational content preserved in a History sectionAlso updated
docs/adr/README.mdto list the newmulti-person-sharing.md(draft ADR from issue #3) and mark the reconciled entries.Bonus finding while doing this:
backend/src/auth/claims.rsdefines anAccessClaimsstruct (family_id,permissions,token_type,jti) that is dead code — not imported or used anywhere in the source. The real access-token claims are{sub, exp, iat, user_id, email, token_version}inbackend/src/auth/jwt.rs. This corrects a mistake in issue #3 (posted a correction there).claims.rsshould be deleted or intentionally wired; leaving that as a separate cleanup rather than expanding this issue.Closing as done. Will commit as
docs: rewrite encryption/jwt docs to match implementation, archive stale summary (#4)once reviewed.