Skip to main content

Reveal

Print the value of a key.

The command prints only the value, with no heading and no trace line, so a pipe gets the value. --json prints {"value": "..."}. The audit log records each call. A request that uses the secret gives its reference, secret://<vault>/<key>, not the value.

osapi client secret reveal [flags]

Examples​

osapi client secret reveal --vault default --key registry-token
osapi client secret reveal --vault default --key registry-token --json

Result​

The command prints:

$ osapi client secret reveal --vault default --key registry-token
glpat-xxxxxxxxxxxxxxxxxxxx

With --json, the API's response:

{
"value": "glpat-xxxxxxxxxxxxxxxxxxxx"
}

Permission​

It needs the secret:reveal permission. osapi controller role get --name <role> shows what a role grants.

Flags​

FlagDescriptionDefault
--keyThe name of the key, such as registry-token (required)
--vaultThe name of the vault, such as default (required)

Global flags​

FlagDescriptionDefault
-d, --debugEnable or disable debug mode
-j, --jsonEnable JSON output
-f, --osapi-filePath to config file; without one at the default path, osapi runs on the defaults/etc/osapi/osapi.yaml
--urlBase URL the CLI client connects to (controller.client.url)https://localhost:8080

Output tells how the result is printed, and what --json gives.