Plan for an emergency
Nominate someone who can reach your personal secrets if you can't, after a delay in which you can always say no.
API
If maya were away or unable to act, someone might need the passwords only she holds. With
emergency access she names that user now. They can ask at any time, but get in
only after a delay she chooses, and never if she refuses within it.
No notice is sent when the nominee asks: maya refuses only if she checks. She chooses a delay longer than the gap
between her checks.
Before you start: your nominee, here ben, has used the store at least once, so they have a key the realm can
seal yours to. Each of you is signed in with your own session in $CVYUH_SESSION (Call the API
shows how).
Nominate someone
Section titled “Nominate someone”-
As
maya, nominatebenwith a three-day delay:Terminal window curl https://foobar.cvyuh.com/api/v0/vault/managed/v1/emergency \-H "Cookie: x-cvyuh-token=$CVYUH_SESSION" \-H "Content-Type: application/json" \-d '{ "nominee": "ben", "delay": 259200 }'The realm answers
201with the nomination and itsid, in stateidle. Leave outdelayfor the realm’s default, a week. -
If
benever needs her secrets, he asks:Terminal window curl -X POST https://foobar.cvyuh.com/api/v0/vault/managed/v1/emergency/<id>/request \-H "Cookie: x-cvyuh-token=$CVYUH_SESSION"The state becomes
waiting, and the delay starts.mayaisn’t told. -
mayachecks her nominations on a schedule shorter than the delay, with aGETonhttps://foobar.cvyuh.com/api/v0/vault/managed/v1/emergency. A nomination undernominatedwithstate: "waiting"is a request. Within the delay, she can refuse:Terminal window curl -X POST https://foobar.cvyuh.com/api/v0/vault/managed/v1/emergency/<id>/refuse \-H "Cookie: x-cvyuh-token=$CVYUH_SESSION"His request ends. He can ask again, and the delay starts again.
-
Once the delay passes unrefused, the state is
granted, andbenreads her personal vault:Terminal window curl "https://foobar.cvyuh.com/api/v0/vault/managed/v1/user/maya/metadata?list=true" \-H "Cookie: x-cvyuh-token=$CVYUH_SESSION"He can read every version and list the vault, and write nothing. Her group and realm vaults aren’t reached.
Check it worked
Section titled “Check it worked”A GET on https://foobar.cvyuh.com/api/v0/vault/managed/v1/emergency lists the nominations you made under
nominated and those naming you under nominatedFor, each with its grantor, nominee, delay and state.
Undo it
Section titled “Undo it”Either of you ends the nomination at once:
curl -X DELETE https://foobar.cvyuh.com/api/v0/vault/managed/v1/emergency/<id> \ -H "Cookie: x-cvyuh-token=$CVYUH_SESSION"The realm answers 204.
Related
Section titled “Related”- Emergency access: every rule.
- Who can read a secret: every way into your vault.