Skip to content
Secrets StoreMarkdown

Crypto-shredding

Destroy a key, and every secret sealed under it becomes unreadable for good, in every copy and every database backup.

AvailableAPI

Deleting data from a database leaves it in replicas and backups. Destroying the key it was sealed under makes every copy unreadable at once, with nothing to find and delete. The store does this for you whenever a user or a group is deleted, and a realm administrator can do it for the realm’s own vault.

  • Who: for a user’s or a group’s key, whoever deletes the user or group; it happens for them. For the realm’s secrets key, a realm administrator holding RealmOwner in this realm or in a realm above it. See Delegated administration.
  • Where: the API. There are no screens yet.
  • First: hand over anything others still need. Nothing sealed under a destroyed key can be opened again.
DestroyedWhenWhat can’t be opened again
A user’s own keythe user is deletedevery secret in their personal vault, every version and label
A group’s own keythe group is deletedevery secret in the group’s vault
The realm’s secrets keya realm administrator destroys itevery secret in the realm’s vault, and every one-time share not yet read

Each destruction removes every version of the key, and reaches every copy of the database at once: on every site and in every database backup, since none of them can be opened without the key.

A user’s and a group’s keys are destroyed for you when they are deleted. See Deleting an owner.

To destroy the realm’s secrets key, as a realm administrator (Call the API shows how to get $CVYUH_SESSION):

Terminal window
curl -X DELETE "https://foobar.cvyuh.com/api/v0/am/keys/v1/secrets/encryption?shred=true" \
-H "Cookie: x-cvyuh-token=$CVYUH_SESSION"

The realm answers 200 with the versions destroyed.

After the realm’s secrets key is destroyed, every call to the realm’s vault answers 503, saying the realm has no secrets key. So does making or reading a one-time share, from any vault, since shares are sealed under the realm’s key too. Users’ and groups’ own vaults, and grants on them, go on working.

AnswerWhenWhat to do
400?shred=true is missing: the call is refused so it can’t be made by mistakeAdd ?shred=true if you mean it
403The caller isn’t a realm administrator of this realm or a realm aboveAsk someone holding RealmOwner
LimitValue
Undonone
Versions destroyedevery version of the key, at once
One version alonenot possible; Key rotation adds versions, and a shred takes them all
SymptomCauseFix
The realm’s vault answers 503Its key was destroyedExpected after a shred. Nothing sealed under it opens again
One-time shares answer 503 from every vaultThey are sealed under the realm’s secrets keyUse grants to hand secrets on while the realm has no secrets key

The destruction of a deleted user’s or group’s key is a DELETED change record on the realm’s audit trail, made by the store. Destroying the realm’s secrets key isn’t on the realm’s audit trail yet: keep your own record of when and why you did it. See Secrets audit trail.

  • It can’t be undone.
  • Secrets only. The realm’s other data is sealed under a different key and is untouched.
  • Users’ and groups’ vaults are under their own keys, and go on working after the realm’s key is destroyed.
  • How the platform’s own backups treat a destroyed key isn’t published yet. See Known limitations.