Skip to content

Several vaults per account (API v2, 2.0.0-alpha.2) - #11

Open
usermaneGermane wants to merge 1 commit into
mainfrom
v3-vaults
Open

usermaneGermane wants to merge 1 commit into
mainfrom
v3-vaults

Conversation

@usermaneGermane

Copy link
Copy Markdown
Owner

What

Phase 3 of SecretSpace 3 on the server: an account can hold several vaults (2.0.0-alpha.2, a test version). It is also the groundwork for sharing a vault in phase 4: each vault has its own key, stored only wrapped to a member.

Changes

  • POST /v2/vaults: a further vault, owned by the caller. The key arrives wrapped to the owner's public key and the name sealed under the vault key, so the server can read neither.
  • PUT /v2/vaults/<id>/name and DELETE /v2/vaults/<id>: owners only, never for the personal vault. A deleted vault's folder is moved to _v2/deleted/, not erased.
  • /v2/me lists every vault of the account. The blob routes (If-Match, 409, 428, PMV3 id check) work for the new vaults as for the personal one.
  • At most 50 further vaults per account.
  • /health adds "features": ["vaults"].
  • 2.x routes unchanged; accounts made by 2.0.0-alpha.1 need no change.

Checked

  • tests/test_server_v2_vaults.py: 44 new tests over real HTTP; the full suite passes locally.
  • 9 of 9 deliberately broken servers were caught (no owner check, personal vault deletable or renamable, duplicate id accepted, limit ignored, non-members treated as owners, delete erasing or not unlisting, blob id check dropped).
  • server/passman_server.py is byte-identical in SecretSpace-Server-Linux and SecretSpace-Server-Windows.

The tests and README text were written by a Sonnet 5.5 subagent and reviewed.

🤖 Generated with Claude Code

https://claude.ai/code/session_011ojnyVg7ccsR3pZ64s7aRH

An account can now hold further vaults besides its personal one:

- POST /v2/vaults creates one, owned by the caller. The client makes the
  id and the key; the key arrives wrapped to the owner's public key and
  the name sealed under the vault key, so the server can read neither.
- PUT /v2/vaults/<id>/name and DELETE /v2/vaults/<id>, owners only, never
  for the personal vault. A deleted vault's folder is moved to
  _v2/deleted/, not erased.
- /v2/me lists every vault of the account; the blob routes work for the
  new vaults exactly as for the personal one.
- At most 50 further vaults per account.
- /health lists "features": ["vaults"], so a client can tell an older
  server apart.

2.x routes are unchanged. An account made by 2.0.0-alpha.1 needs no
change. tests/test_server_v2_vaults.py: 44 tests; 9 of 9 deliberately
broken servers were caught.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011ojnyVg7ccsR3pZ64s7aRH
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