docs: add ADR-015 (web + sync auth coherence) - #229
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds
docs/adr/015-web-sync-auth-coherence.md(Status: Proposed) recording the decision about Toku's two authenticated account stores.Toku today has two separate account stores that share only a single password-hardening function:
web_users/web_sessionsin the localtoku.db(crates/toku-db/migrations/V16__web_auth.sql), a trusted-server design: login recomputes the SRP verifier server-side, so the process receives the plaintext password and Secret Key (crates/toku-web/src/auth.rs). There is no challenge table — it is a verifier recompute, not an SRP handshake — because the dashboard already decrypts and renders the library server-side.users/user_srp_challenges/user_sessionsin a separatesync.db(crates/toku-sync/migrations/V5__users_and_admin.sql), a zero-knowledge design: a full SRP-6a challenge/verify handshake where the server never sees the password (crates/toku-sync/src/auth.rs).The only shared code is the
srp_verifier_input()derivation incrates/toku-core/src/crypto/srp.rs; salts, verifiers, session tables, storage databases, and the authentication protocol are all independent. The two tiers share a hardening function, not accounts.What's included
toku serve --hostedandtoku-sync; the default local dashboard reads no auth tables, and a managed offering is relay-only, so it never runs the web tier.No code, schema, or migration changes — this is a documentation-only architecture decision record.
Related Issues
Closes #205
Relates to #207
Type of Change
Crate
toku-core— Domain models, traits, state machinetoku-db— SQLite persistence, migrations, FTS5toku-import— Importers (Goodreads, Calibre, StoryGraph)toku-meta— Metadata fetching (Open Library, Google Books)toku-cli— CLI binarytoku-export— Exporters (CSV, JSON, Markdown, BibTeX)docs/— DocumentationData Integrity Checklist
Checklist
cargo fmt --checkpasses — N/A, docs-only (no Rust changed; CI skips Rust jobs via path filter)cargo clippy --workspace -- -D warningspasses — N/A, docs-only (no Rust changed)cargo test --workspacepasses — N/A, docs-only (no Rust changed)markdownlint-cli2passes with 0 issues