Public Access
Make the vault the thing you share, and ask a host which one it lives in
The teams screen listed teams that owned vaults, so sharing four servers with two
colleagues meant creating a team, then a vault inside it, then wrapping a key.
Two of those three steps are about a concept nobody arrives wanting. The screen
now lists vaults: naming one creates the membership list that carries it, named
after the vault and owned by you, and members, invitations, roles, hand-over and
key holders all hang off the vault they apply to.
Nothing on the server moved. VaultAccessService still resolves a shared vault
through team_membership and every membership call still names a team id — what
went is the requirement that anybody make one. The split the whole design rests
on is untouched and is still what the screen is built around: adding somebody
authorises the server to serve them, and only a machine holding the key can make
the vault readable. ADR 0009 keeps its decision and gains an addendum recording
which half of it a person is now asked about.
The one place the team resurfaces is a membership list carrying several vaults,
which this screen cannot produce and does not hide: the members section says so,
because "adding somebody here adds them there" is precisely the fact a
vault-shaped screen is in a position to conceal.
Two things left the interface and one arrived. Creating a team is gone, and so is
archiving one — it was only ever possible for a team owning no vaults, and a
screen whose rows are vaults has no row for one, so the button would have been
unreachable or always refused. The endpoint is unchanged and the screen states
the limit instead, since a vault cannot be deleted at all. The exception is a
create whose second call failed: cancelling that form archives the membership
list it left behind, which is a deliberate departure from this client's rule
against tidying up on the user's behalf, made because nothing else can reach it.
What arrived is PUT /api/v1/vaults/{id}. Without it the screen loses its only
editing action, since renaming the team behind a vault is invisible to everybody
who was never shown the team. It is gated on PermissionFlags.Admin — the line
UpdateTeamEndpoint already draws, because a name is what everybody in the vault
sees it called rather than part of its contents — and it renames the owning team
with it when that team carries nothing else, so the row an operator reads and the
name a user says cannot drift apart. The slug never moves, for the reason it does
not move on a team rename. The session edits its cached vault row rather than
replacing it with the response, which deliberately carries no wrapped key.
The host editor now asks which vault a host goes into, beside the name, while
adding and only where there is more than one vault to write to. It is a second
picker rather than the keychain screen's reused, and the two selections are
separate on purpose: that one is a standing preference about where new items go,
this is a field of the host in front of you, and binding both to one selection
would mean a click on the other screen could move a half-typed host. An existing
host is not offered it at all rather than offered it disabled — the two vaults
are encrypted under different keys, so moving an item is a delete and a retype.
That forced a fix worth naming. The group picker was built from the active
vault's groups whatever vault the host was being filed into, so a host put in a
shared vault could be filed under a group only its author can resolve — a
colleague would see it filed under nothing, which is the quietest kind of wrong.
Groups are now kept per vault and the picker follows the vault choice.
Two renames, because the pair they would otherwise have made is a bug farm:
ShellScreen.Vault became Keychain and VaultScreen became KeychainScreen, which is
what the rail has always labelled that screen, leaving Vault for one vault's
contents and Vaults for the vaults themselves. The enum values are unchanged;
NavRail.axaml writes them as x:Static literals.
1536 tests pass, seven more than before. Five are new on the server — the rename
endpoint's success, the team it does and does not take with it, the two refusals
and the empty name — and the client suite gains six and folds four together,
having lost the two about archiving a team.
This commit is contained in:
@@ -115,6 +115,36 @@ Three decisions inside it belong here, because each had a more convenient altern
|
||||
an address already belonging to a member of *this* team is refused, and that is a fact the caller can
|
||||
already read off the members table, so naming it leaks nothing.
|
||||
|
||||
### Addendum: the vault is what the product shows, and the team is behind it
|
||||
|
||||
The model above is unchanged. What changed afterwards is which half of it a person is asked about.
|
||||
|
||||
The first interface built on this ADR made the team the subject: you created a team, then a vault in it,
|
||||
then wrapped a key. Two of those three steps are about a concept nobody arrives wanting. So the screen now
|
||||
lists **vaults**, and naming one creates the membership list that carries it — named after the vault,
|
||||
owned by the creator, one per vault. Nothing on the server moved: `VaultAccessService` still resolves a
|
||||
shared vault through `team_membership`, every membership call still names a team id, and the split this
|
||||
ADR is about — membership authorises, a grant unlocks — is still what the screen is built around, now
|
||||
stated per vault rather than per team.
|
||||
|
||||
Three consequences of the change belong here:
|
||||
|
||||
- **A team owning several vaults is still legal and is no longer produced.** The client cannot make one;
|
||||
an operator or a pre-existing deployment can. The screen refuses to hide it: a vault whose membership
|
||||
list carries others says so, because on a vault-shaped screen "adding somebody here adds them there" is
|
||||
precisely the fact that would otherwise be invisible.
|
||||
- **Archiving left the interface.** It was only ever possible for a team owning no vaults, and a screen
|
||||
whose rows are vaults has no row for one — so the button would have been unreachable or always refused.
|
||||
The endpoint is unchanged and the screen states the limit instead. The one place a vault-less team can
|
||||
still appear is a create whose second call failed; cancelling that form archives it, which is a
|
||||
deliberate exception to this client's rule against tidying up on the user's behalf, made because nothing
|
||||
else can reach it.
|
||||
- **A vault can be renamed**, which it could not before: `PUT /api/v1/vaults/{id}` requires
|
||||
`PermissionFlags.Admin` — the line `UpdateTeamEndpoint` already draws, because a name is what everybody
|
||||
in the vault sees it called rather than part of its contents. It renames the owning team with it when
|
||||
that team carries nothing else, so the row an operator reads and the name a user says do not drift
|
||||
apart. The slug never moves, for the reason it never moves on a team rename.
|
||||
|
||||
## Consequences
|
||||
|
||||
The sharing graph is visible to the operator: who is in which team, which vaults exist, and who holds
|
||||
|
||||
Reference in New Issue
Block a user