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.
Before you begin
Section titled “Before you begin”- 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.
How it works
Section titled “How it works”A nomination moves through three states:
| Step | Who | State |
|---|---|---|
| Nominate | you, the grantor | idle |
| Ask | the nominee | waiting: the delay starts |
| Refuse | you, while a request stands | back to idle |
| The delay passes, unrefused | — | granted: the nominee may view |
| Withdraw, or decline | either of you | the 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.
Set it up
Section titled “Set it up”Every call is under https://foobar.cvyuh.com/api/v0/vault/managed/v1/emergency
(Call the API shows how to get $CVYUH_SESSION).
-
Nominate someone. Here
mayanominatesben, 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
201with the nomination and itsid. Leave outdelayfor the realm’s default, a week unless your realm changed it. -
Either of you sees it with a
GETon the same address: the nominations you made undernominated, and those naming you undernominatedFor, each with itsid,grantor,nominee,delay,requestedAt,refusedAtandstate. -
The nominee asks with a
POSTto…/emergency/<id>/request, and, once granted, reads your vault athttps://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:
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.
What each of you sees
Section titled “What each of you sees”- The grantor gets no message when the nominee asks. A
GET …/emergencyshows the nomination undernominatedwithstate: "waiting"and itsrequestedAt. Check it on a schedule shorter than your delay. - The nominee sees
statemove fromwaitingtograntedwhen the delay has passed unrefused, and from then reads your vault asuser/<your id>. Before that, your vault answers them404. - After a refusal, the nominee sees
state: "idle"and arefusedAttime.
When it fails
Section titled “When it fails”| Answer | When | What to do |
|---|---|---|
404 nominating | The nominee doesn’t exist, or hasn’t used the store yet | They make any call to the store once, then nominate again |
400 nominating | You named yourself, or a delay of 0 | Name someone else; a delay is at least one second |
400 refusing, “no request stands” | The nominee hasn’t asked, or you already refused | Nothing to refuse |
404 on a nomination | It isn’t yours or doesn’t name you, or it’s gone | Check the id with GET …/emergency |
412 | The other side changed the nomination at the same moment | Read it again and retry |
404 reading the vault as nominee | The nomination isn’t granted yet | Wait for the delay, or ask the grantor |
Limits and defaults
Section titled “Limits and defaults”| Limit | Default | Range | Set by |
|---|---|---|---|
| Delay | 604800 seconds (a week) | at least 1 second | delay on the nomination; managed.emergencyDelayDefault for the realm (1 second to ten years) |
| Nominations per user | no fixed limit | ||
| What a nominee reaches | your personal vault, read only |
Troubleshooting
Section titled “Troubleshooting”| Symptom | Cause | Fix |
|---|---|---|
| A nominee got in and you never saw the request | No notice is sent; the delay passed unrefused | Refuse 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 exists | They haven’t used the store yet | Ask them to make one call, such as GET …/config |
| The nominee still reads after you refuse | They read before the refusal | A refusal stops further reads; change any secret they read |
Audit record
Section titled “Audit record”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.
Good to know
Section titled “Good to know”- 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 …/emergencyyourself. - 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.
Reference
Section titled “Reference”| Field | What it sets |
|---|---|
nominee | Who may ask, by user id |
delay | Seconds from a request until the nominee is let in. Leave it out for the realm’s default |
Related
Section titled “Related”- Plan for an emergency: the task, start to finish.
- Realm settings: the realm’s default delay.
- What’s next for sealed vaults: the same nomination, for sealed vaults.