Keep the organization's secrets
Keep shared infrastructure credentials in the realm's own vault, which outlives any one user's account.
API
Some secrets belong to the organization, not to any one user: infrastructure credentials, signing material for partners. Kept in the realm’s vault, they outlive any account. Every realm administrator can reach them, and no one else can unless an administrator grants it.
Before you start: you are a realm administrator (a member of a group holding RealmOwner, or a privilege of your
own that allows MODIFY on secrets), the store is on, and you are signed in with your session in $CVYUH_SESSION
(Call the API shows how). The engineering group has had a member open its vault once, so a grant can
be sealed to it.
Keep a secret for the organization
Section titled “Keep a secret for the organization”-
Write it into the realm’s vault:
Terminal window curl https://foobar.cvyuh.com/api/v0/vault/managed/v1/realm/data/infra/db-root \-H "Cookie: x-cvyuh-token=$CVYUH_SESSION" \-H "Content-Type: application/json" \-d '{ "data": { "user": "root", "password": "<password>" } }' -
List the vault:
Terminal window curl "https://foobar.cvyuh.com/api/v0/vault/managed/v1/realm/metadata?list=true" \-H "Cookie: x-cvyuh-token=$CVYUH_SESSION" -
Let the
engineeringteam use it, without seeing anything else:Terminal window curl https://foobar.cvyuh.com/api/v0/vault/managed/v1/realm/grants/infra/db-root \-H "Cookie: x-cvyuh-token=$CVYUH_SESSION" \-H "Content-Type: application/json" \-d '{ "group": "engineering", "access": "use" }'A member of the group reads it at
https://foobar.cvyuh.com/api/v0/vault/managed/v1/realm/data/infra/db-root.
Check it worked
Section titled “Check it worked”Anyone who isn’t a realm administrator and holds no grant is refused (403). A GET on
https://foobar.cvyuh.com/api/v0/vault/managed/v1/realm/grants/infra/db-root lists the grants on it.
If the grant answers 404, no member of engineering has opened the group’s vault yet: one of them lists it once,
then grant again.
Undo it
Section titled “Undo it”Take a grant back:
curl -X DELETE https://foobar.cvyuh.com/api/v0/vault/managed/v1/realm/grants/infra/db-root/<edgeId> \ -H "Cookie: x-cvyuh-token=$CVYUH_SESSION"The grant’s copy opens from the key of whoever last wrote the secret. If that administrator is later deleted, the group’s reads stop until another administrator writes the secret again.
Related
Section titled “Related”- Vaults: the realm’s vault and who reaches it.
- Grants:
viewanduse. - Rotate the secrets key: the key that seals the realm’s vault.