Skip to content
Secrets StoreMarkdown

Organize and find secrets

Keep secrets in folders by naming their paths, list a folder, and see what a secret holds without opening it.

Available, with limitsAPI

With many secrets, you find them by browsing. Paths read like folders: web/github, web/gitlab and db/prod/root sit in the folders web/ and db/. You list a folder to see what is in it, and read a secret’s names to check what it holds before anyone opens it.

Before you start: you have a few secrets in your own vault, and you are signed in with your session in $CVYUH_SESSION (Call the API shows how).

  1. List the top of your vault:

    Terminal window
    curl "https://foobar.cvyuh.com/api/v0/vault/managed/v1/me/metadata?list=true" \
    -H "Cookie: x-cvyuh-token=$CVYUH_SESSION"

    The realm answers { "data": { "keys": ["db/", "web/"] } }. Folders end in /.

  2. List a folder:

    Terminal window
    curl "https://foobar.cvyuh.com/api/v0/vault/managed/v1/me/metadata/web/?list=true" \
    -H "Cookie: x-cvyuh-token=$CVYUH_SESSION"

    The realm answers { "data": { "keys": ["github", "gitlab"] } }. The LIST method on the same address does the same.

  3. See what a secret holds, without its values:

    Terminal window
    curl https://foobar.cvyuh.com/api/v0/vault/managed/v1/me/subkeys/web/github \
    -H "Cookie: x-cvyuh-token=$CVYUH_SESSION"

    The realm answers { "subkeys": { "user": null, "password": null }, … } under data. Add ?depth=1 to stop at the first level.

A listing with nothing under the prefix answers 404. A secret you deleted whole is no longer listed.

  • A listing straight after a write can miss the newest path for a moment, on some sites. Read the path itself when you need it at once. See Known limitations.
  • Through a grant, you see what you may view. Someone with a view grant who lists your vault sees only the secrets they may view.