Skip to content

Several vaults per account (phase 3, 3.0.0-alpha.5) - #25

Merged
usermaneGermane merged 1 commit into
mainfrom
v3-vaults
Nov 11, 2026
Merged

usermaneGermane merged 1 commit into
mainfrom
v3-vaults

Conversation

@usermaneGermane

Copy link
Copy Markdown
Owner

What

Phase 3 of SecretSpace 3: several vaults in one account (a test version). Needs the server PRs "Several vaults per account (API v2, 2.0.0-alpha.2)" for syncing more than the Personal vault.

For the user

  • Vaults window: make, rename and delete vaults. Deleting asks for the master password.
  • A vault menu above the list: All vaults (rows name their vault, search covers all), Personal, or one vault.
  • Add an entry has a vault picker; import goes to the vault picked in the menu.
  • Sync covers every vault: one login, then each vault merged on its own, with its own conflict questions.
  • A vault deleted on another device is kept on this one, marked and no longer synced, until you delete it here too or put it back.

How

  • Every further vault has its own random key, wrapped to the account's public key. Sharing (phase 4) is then one more wrapped copy per member.
  • Vault names reach the server sealed under the vault key.
  • Deleting a vault deletes it on the server first; if the server can't be reached, nothing is deleted anywhere.
  • An older 2.0 server (alpha.1) keeps syncing the Personal vault; the app says the others need a newer server.

Checked

  • tests/test_account_vaults.py: 57 new tests, real HTTP against the server copy. 10 of 10 deliberately broken versions were caught.
  • Full suite passes locally (Windows 588, Linux 579).
  • Lab, real windows, two devices and a local server, on both clients: the new flows_vaults.py 56/56 (it fails when the Add dialog ignores the picker, and when a sync deletes a local vault), flows_accounts.py 42/42, flows_sync_accounts.py 22/22.

Not in this PR

Moving an entry from one vault to another; sharing; the change log (both phase 4).

The tests and the Lab flow were written by Sonnet 5.5 subagents and reviewed.

🤖 Generated with Claude Code

https://claude.ai/code/session_011ojnyVg7ccsR3pZ64s7aRH

An account had exactly one vault. It can now have more -- Home, Work, a
project -- each with its own random key, kept wrapped to the account's
public key. That is also how a vault's key will be handed to another
member once vaults are shared (phase 4).

- accounts.py: VaultFile (one vault: its files, key, name), and on
  Account: vault_ids, vault_file, create_vault, adopt_vault,
  rename_vault, delete_vault. The personal-vault methods delegate to it.
- account_crypto.py: a vault's name sealed under the vault key, so the
  server lists vaults without learning their names.
- account_sync.py: reconcile_vaults makes the list of vaults the same
  here and on the server, then every vault is synced on its own
  (AccountSync takes a vault id). A vault deleted on another device is
  KEPT here, marked and left out of the sync. Deleting a vault deletes it
  on the server first, so an unreachable server deletes nothing.
- gui.py: a vault menu above the list (All vaults / Personal / ...), rows
  name their vault in the All view; _save writes only vaults that changed.
- vaults_ui.py (new): the Vaults window -- new, rename, delete (asks for
  the master password), put back.
- dialogs.py: a vault picker in Add an entry; import says which vault;
  the archive-purge setting applies to every vault; export follows the
  menu. sync_ui.py: the archive and the conflict window follow the vault.
- Needs SecretSpace Server 2.0.0-alpha.2 for more than the personal
  vault; an older 2.0 server keeps syncing the personal one and the app
  says so.

tests/test_account_vaults.py: 57 tests; 10 of 10 deliberately broken
versions were caught. tests/sync_server/passman_server.py is the server
2.0.0-alpha.2 copy.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011ojnyVg7ccsR3pZ64s7aRH
@usermaneGermane
usermaneGermane merged commit 6a832ea into main Nov 11, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant