Skip to content
Secrets StoreMarkdown

Deleting an owner

When a user or a group is deleted, their secrets, their key, and every grant and share made to them go with them.

AvailableAPI

When you delete a user or a group from the realm, the store removes everything it keeps for them and destroys their key, so nothing they owned can be opened again, from the live store or from any database backup. There is nothing to clean up by hand, and nothing anyone else owns is touched.

  • Who: a realm administrator who may delete users and groups: RealmOwner, or a privilege of your own that allows it. See Delegated administration.
  • Where: the API. There are no screens yet.
  • First: the user hands over anything others will need. Once they are deleted, no one can read what they kept.
DeletedGoes with it
A userevery secret in their vault, their key, every grant made to them, every nomination they made or were named in, every one-time share made for them alone, and their sealed vaults with every key wrapped to them (once sealed vaults are in use)
A groupevery secret in its vault, its key, every grant made to it, and its sealed vaults

The user or group is deleted first. Clean-up follows the delete at once and is retried until it completes, normally within minutes.

Nothing to set up: deleting the user or the group is the whole step. For example, deleting ben (Call the API shows how to get $CVYUH_SESSION):

Terminal window
curl -X DELETE https://foobar.cvyuh.com/api/v0/am/objects/v1/user/ben \
-H "Cookie: x-cvyuh-token=$CVYUH_SESSION" \
-H 'If-Match: "<rev>"'
  • A grantee of the deleted user’s secrets finds them gone from GET …/shared, and reading one answers 404.
  • A one-time share the deleted user made for someone else stays readable until it is read or expires.
  • A user created again with the same user id gets a new, empty vault and a new key.
LimitValue
Clean-upfollows the delete at once, retried until it completes, normally within minutes
Undonone: a destroyed key can’t be brought back
SymptomCauseFix
A grant on a group’s or the realm’s secret stopped opening after a user was deletedThat user was the last to write the secret, and grants on it open from the last writer’s keySomeone with the vault’s right writes the secret again
A grantee still finds a deleted user’s secret in GET …/sharedClean-up is still runningWait a few minutes; it is retried until it completes

The user’s or group’s delete is a DELETED change record under whoever made it. The destruction of their key is a DELETED change record made by the store. See Secrets audit trail.

  • Nothing of anyone else’s goes. A secret goes only when it belongs to the deleted owner, a nomination only when it names them, and a one-time share only when they were its one recipient.
  • Their key is destroyed. Every version of the deleted owner’s key is removed. See Crypto-shredding.
  • Grants can pause after a writer is deleted. If the user who last changed a group’s or the realm’s secret is deleted, grants on that secret stop working until someone writes it again. Write it again after removing a member.
  • Hand over first. A user who must pass secrets on does so before they leave, with a grant, a one-time share, or by writing them into a group’s or the realm’s vault.