Skip to content

Sharing

Scope: how vaults stop being private: organisations and collections, the only sharing machinery there is. The lab builds one, shares an item into it, and proves what a non-member can't see. Adding people to an organisation — invites, roles, confirmations — is covered at the honest level the lab could reach, and labelled.

The unit of sharing is not the item

New users try to share an item. There is no such button. Instead:

  • An organisation is a container with its own sealed key and its own membership. Chapter 1's model, one level up: members hold the key; the server holds the seals.
  • A collection is a named shelf inside the organisation. Items are shared by moving them into the organisation and placing them in collections; members are given access to collections, not to items one at a time.
  • An item that has been shared belongs to the organisation. It leaves your private vault; moving it back out is a clone-and-delete, not a return (the clients make this explicit when you share, and it's the surprise in this chapter worth knowing cold).

A personal vault has folders instead, which are private organisation for one — don't confuse the two; folders never share anything.

The lab builds one

Maren creates the organisation in one post (t12):

$ POST /api/organizations -> 200
{
  "id": "c5e55fdf-25dd-4e9e-b299-29dbd30eaccf",
  "name": "Maple Street Household",
  "billingEmail": "maren@example.net",
  "object": "organization",
  "selfHost": true,
  ...
}

Two things in that answer deserve a look. The request named a default collection — "Shared from day one" — and the server made it on the spot; a second collection, "Household bills," followed in its own call (t13). And the plan fields: asked for plan type 0, the server reported its organisation with the full spread of capabilities switched on (usePolicies, useApi, useTotp, usersGetPremium, a storage ceiling of 32767 GB — t12, unembarrassed). That is not a licence and nothing was purchased: on a self-hosted server, the organisation plan machinery exists to satisfy the clients, and Vaultwarden answers "everything." What is actually true of your household server is set by its own limits — disk, and the door policy of chapter 5.

Sharing the item (t14) is one more post naming the cipher, the organisation, and the collection. Read back, it has moved: organizationId set, collectionIds listing "Household bills," and her private sync (t15) now carries it as the organisation's item.

The negative control

Jae's account is the control group: same server, no membership. Her sync, taken right after (t15), contains no organisations, no collections, and none of the ciphers — the shared item does not exist in her world. Sharing on this server is not "visible to everyone with an account, editable by some." It is enclosure: the organisation's key is given to members and only members, and the server enforces the boundary with the sealed boxes it can see.

Members, roles, and the parts the lab couldn't walk

Adding Jae would be an invite: the organisation's owner names her address; she accepts; the owner confirms — the step where the organisation's key is actually handed over, sealed for her account's public key. Roles then decide what she may do: owners and admins run the organisation; ordinary members use the collections they're given, some read-only, some with passwords hidden. The lab did not walk this: the invite dance between two live accounts, with its tokens and confirmations, needs the clients' screens (or the admin page's own invite path) to be done honestly, and the build had no browser session to drive them with. The shape above is the project's documented model, and every object it names — the organisation, its collections, the moved cipher, the boundary around them — is the part the lab did build and read back.

One more documented piece, worth knowing before you design a household around it: policies and groups exist (organisation-wide rules like requiring two-step login; bundles of members given collections together). The server reports the switches on; this guide did not exercise them, and a household of three rarely misses them.