Skip to content
Secrets StoreMarkdown

Subkeys

See the names inside a secret without its values, to check what it holds before anyone opens it.

AvailableAPI

Subkeys show the shape of a secret: the names of its values, with every value left out. A tool can check that a secret has the fields it expects, such as user and password, without reading the password itself.

  • Who: anyone who may view the secret: every right in its vault, or a view grant.
  • Where: the API. There are no screens yet.
  • First: the secret has a live version.

A GET on https://foobar.cvyuh.com/api/v0/vault/managed/v1/<vault>/subkeys/<path> answers the latest version’s names, every value replaced by null, with the version’s metadata. Add ?version=<n> for an older version, and ?depth=<d> to stop after <d> levels of nested objects. 0, the default, goes all the way down.

There’s nothing to set up. Read the names in web/github (Call the API shows how to get $CVYUH_SESSION):

Terminal window
curl https://foobar.cvyuh.com/api/v0/vault/managed/v1/me/subkeys/web/github \
-H "Cookie: x-cvyuh-token=$CVYUH_SESSION"
{ "data": { "subkeys": { "user": null, "password": null }, "metadata": { "version": 3, "…": "…" } } }
AnswerWhenWhat to do
404The path or version isn’t there, the version is deleted or destroyed, or, in a personal vault, you have no accessAsk for a live version
403A use grant, or no right in a group’s or the realm’s vaultAsk for view
LimitDefault
depth0, all the way down
versionthe latest

A subkeys read changes nothing, so it writes no change record; it is an ACCESS record under the reader. See Secrets audit trail.

  • The version must be live. Asking for a deleted or destroyed version answers 404.
  • It needs view. Someone with only a use grant can’t read a secret’s subkeys.
  • Labels are left out. The metadata in the answer carries no custom_metadata.