Repository navigation
Make the profile passphrase optional and off by default (ADR-0050) - #67
Open
James-Chapman wants to merge 1 commit into
Open
James-Chapman wants to merge 1 commit into
James-Chapman wants to merge 1 commit into
Conversation
A new profile now opens with no prompt. The SQLite stores stay encrypted with the random store key, which the OS vault alone wraps in store-key.v1. Profiles with a passphrase (store-key.v2) keep it. Settings, Security turns the passphrase on or off through the new set_profile_passphrase command. The core asks for the passphrase in its own window on a thread without a lease, and writes the key file under the transition lock only while the same session is still open. When both key files exist, store-key.v2 wins, so an interrupted switch leaves the passphrase on. Lock, the lock shortcut and the idle-lock setting show only while the passphrase is on, and the core does not run the idle lock without one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 24 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
This branch has not been deployed
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.



Summary
The profile passphrase (ADR-0006) is now optional and off by default. A new profile opens with no prompt. The stores stay encrypted, and the OS vault wraps the store key. Users can turn the passphrase on or off in Settings, Security.
What changed
crates/core/src/store.rs):store-key.v1(the vault-wrapped bare key) with read-back, and opens with no prompt.store-key.v1profile opens with no prompt; the forced upgrade is removed. Astore-key.v2profile still asks for its passphrase.v2wins andv1is deleted, so an interrupted switch leaves the passphrase on.set_profile_passphrase(on)asks in the core's window on a thread without a lease. It writes the key file undertransitiononly if the same session is still open. A lock during the prompt drops the answer.SecurityStatus.profilePassphraseSecurityOperation::WaitingForPassphraseSecurityError::{PassphraseRejected, ProfileUnavailable}Call::SetProfilePassphrase { on }Why it changed
The owner asked on 17 November 2026 for the passphrase to be optional and off by default. The owner chose a vault-only key over plaintext stores, kept existing passphrases with a way to turn them off, and hid Lock while the passphrase is off. ADR-0050 records the trade-off: without a passphrase, a process running as the user can open the profile.
Tests
Updated
crates/core/tests/store.rs,session.rs,account.rs: the creation and v1-upgrade cases now cover the new rules.src-tauri/tests/ipc.rs: mock statuses and the capability list.frontend/tests/views.test.mjs: Security buttons and Preferences render calls.New
v1; turning on and off, including cancel and too many wrong entries;v2wins overv1.set_profile_passphrase(serve.rs).lockOffered.Checks run on Windows:
cargo test --locked --workspace --exclude persephone-call-worker --all-targetscargo clippy(same scope,-D warnings) andcargo fmt --checkpython tools/dev.py frontend --offlinepython tools/dev.py contracts --offlineNot run:
🤖 Generated with Claude Code