Repository navigation
Accounts sync through a server (phase 2, 1.0.0-alpha.3) - #19
Merged
Merged
Conversation
Phase 2 of the 3.0 design, client side, against SecretSpace Server 2.0's API v2 (server PRs #10): - account_sync.py: AccountServer (the /v2/ calls on sync_client's transport); connect() puts an account on a server (log in, or sign up with the server's token as the code) and remembers it only if that worked, and refuses a server account with another personal vault; AccountSync syncs the personal vault with the 2.x three-way merge, conflict choices and base rules (saved locally first, then pushed, base written last with its server and revision); sign_in() brings an account onto a new device (pre-login salt, Login Key, keyset opened before anything is written) or onto this one after a password changed elsewhere, keeping its vault files to merge; change_password() tells the server first, so device and server never disagree. - accounts.py: the Login Key stays in memory after unlock; set_server, base load/save, encrypt/decrypt helpers, sealed_files, stored_secret, adopt_from_server; change_password(before_write=...). - account_sync_ui.py: Settings -> Sync -> Set up..., the Sync button, "Sign in from a server" on the login screen. Network on worker threads only, including the logout (on the main thread it froze the window for 20 s in the Lab flow). - gui.py / dialogs.py: Sync button back, the Sync section (Synced with / Sync now / Disconnect, or Set up...), password change off the main thread through account_sync. - Test copy of the server = server 2.0.0-alpha.1. Not yet: several vaults per account (phase 3), sharing (4), recovery (5), "Sync when I unlock" for accounts. tests/test_account_sync.py: 20 end-to-end tests on two "devices" and a real server copy. Mutation check: 8 broken guards, all caught. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011ojnyVg7ccsR3pZ64s7aRH
On Linux the device's own scheme is the password one (no DPAPI), so after a password change on another device it rightly needs the Emergency Kit to sign in again. The test assumed DPAPI for "native" and failed in Linux CI; it now asks secret_store which scheme is in force. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011ojnyVg7ccsR3pZ64s7aRH
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.
What
Phase 2 of SecretSpace 3, client side: accounts sync through your own server. This is a test version. It needs SecretSpace Server 2.0.0-alpha.1 (server PRs #10).
Never sent to the server: the master password, the Secret Key or the vault key. The server gets the Login Key and blobs it can't open.
Checks
tests/test_account_sync.py: 20 end-to-end tests on two "devices" against a real copy of the server. They cover:flows_sync_accounts.py: 22/22 on Windows and Linux code;Not yet: several vaults per account (phase 3), sharing (phase 4), recovery with the phrase (phase 5), and Sync when I unlock for accounts.
🤖 Generated with Claude Code
https://claude.ai/code/session_011ojnyVg7ccsR3pZ64s7aRH