Skip to content
Secrets StoreMarkdown

Emergency access

Nominate someone who can reach your personal secrets if you can't, after a delay in which you can say no.

AvailableAPI

If you were away or unable to act, someone might need the passwords only you keep. Emergency access lets you name that someone in advance. They can ask at any time, but they get in only after a delay you choose, and only if you don’t refuse within it.

You can refuse only if you know they asked, and today no notice is sent when a nominee asks. Check your nominations yourself, and choose a delay long enough for you to notice.

  • Who: any user, for their own personal vault. No privilege is needed, and a realm administrator can’t nominate for someone else.
  • Where: the API. There are no screens yet.
  • First: your nominee has used the store at least once, so the realm can seal your vault to them.

A nomination moves through three states:

StepWhoState
Nominateyou, the grantoridle
Askthe nomineewaiting: the delay starts
Refuseyou, while a request standsback to idle
The delay passes, unrefused—granted: the nominee may view
Withdraw, or declineeither of youthe nomination is gone

Once granted, the nominee can read every version, the metadata and the listing of your personal vault, and make one-time shares of it. They write nothing, and reach none of your group or realm vaults.

Only the nominee can open your vault, and only once let in. After they do, your vault is re-keyed at your next access, and every grant’s copy is sealed again, so nothing you write afterwards is under a key they held.

Every call is under https://foobar.cvyuh.com/api/v0/vault/managed/v1/emergency (Call the API shows how to get $CVYUH_SESSION).

  1. Nominate someone. Here maya nominates ben, with 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 201 with the nomination and its id. Leave out delay for the realm’s default, a week unless your realm changed it.

  2. Either of you sees it with a GET on the same address: the nominations you made under nominated, and those naming you under nominatedFor, each with its id, grantor, nominee, delay, requestedAt, refusedAt and state.

  3. The nominee asks with a POST to …/emergency/<id>/request, and, once granted, reads your vault at https://foobar.cvyuh.com/api/v0/vault/managed/v1/user/maya.

You refuse a request with a POST to …/emergency/<id>/refuse. Either of you ends the nomination:

Terminal window
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.

  • The grantor gets no message when the nominee asks. A GET …/emergency shows the nomination under nominated with state: "waiting" and its requestedAt. Check it on a schedule shorter than your delay.
  • The nominee sees state move from waiting to granted when the delay has passed unrefused, and from then reads your vault as user/<your id>. Before that, your vault answers them 404.
  • After a refusal, the nominee sees state: "idle" and a refusedAt time.
AnswerWhenWhat to do
404 nominatingThe nominee doesn’t exist, or hasn’t used the store yetThey make any call to the store once, then nominate again
400 nominatingYou named yourself, or a delay of 0Name someone else; a delay is at least one second
400 refusing, “no request stands”The nominee hasn’t asked, or you already refusedNothing to refuse
404 on a nominationIt isn’t yours or doesn’t name you, or it’s goneCheck the id with GET …/emergency
412The other side changed the nomination at the same momentRead it again and retry
404 reading the vault as nomineeThe nomination isn’t granted yetWait for the delay, or ask the grantor
LimitDefaultRangeSet by
Delay604800 seconds (a week)at least 1 seconddelay on the nomination; managed.emergencyDelayDefault for the realm (1 second to ten years)
Nominations per userno fixed limit
What a nominee reachesyour personal vault, read only
SymptomCauseFix
A nominee got in and you never saw the requestNo notice is sent; the delay passed unrefusedRefuse or withdraw now, and change the secrets they could read. Choose a longer delay and check on a schedule
Nominating answers 404 for a colleague who existsThey haven’t used the store yetAsk them to make one call, such as GET …/config
The nominee still reads after you refuseThey read before the refusalA refusal stops further reads; change any secret they read

A nomination is a CREATED change record, a request or a refusal a PATCHED one, and a withdrawal a DELETED one, each under who made it. Every read the nominee makes is an ACCESS record under the nominee. See Secrets audit trail.

  • Nothing before the delay. A nomination alone, or a request still waiting, lets no one in.
  • No notice is sent. Neither of you is told when the other acts. Check GET …/emergency yourself.
  • Pick the delay for how often you check. If you look at your nominations weekly, a delay shorter than a week can pass unseen.
  • A refusal ends the request, even after the delay has passed, and so ends the access. The nominee may ask again, and the delay starts again.
  • Only the two of you. Only the nominee can ask, and only you can refuse. Anyone else is told the nomination isn’t there.
  • A nominee keeps what they read. Refusing or withdrawing stops further access; it can’t take back what they already saw.
FieldWhat it sets
nomineeWho may ask, by user id
delaySeconds from a request until the nominee is let in. Leave it out for the realm’s default