How to list credentials
See also:
A list of the available credentials can be obtained by running the credentials
command:
juju credentials
Sample output:
Controller Credentials:
Cloud Credentials
lxd localhost
Client Credentials:
Cloud Credentials
aws bob*, carol
google wayne
In the above output, asterisks denote the default credential for a cloud. Here, the credential named bob
is the default for cloud aws
and no default has been specified for the lxd
and google
clouds. For information on how to manage default credentials for a cloud see Setting default client credential
By default, the command outputs credentials in to two sets:
- Credentials that are available to the currently active controller.
- Credentials that are available to the local Juju client.
To display only the credentials available to the local Juju client, specify the --client
flag when invoking the credentials
command e.g. juju credentials --client
. Likewise, to limit the displayed credentials to the ones stored in a particular controller you can instead specify the --controller
flag followed by the controller’s name when invoking the command e.g. juju credentials --controller my-controller
.
The output from the credentials command can also be changed to several different types to match the desired use case. Supported output types are tabular
, json
and yaml
with the default being tabular.
Example of changing the output type:
juju credentials --format yaml
By default the secrets contained within a credential are not shown by default for security. To have the secrets contained within a credential displayed use the --show-secrets
argument.
Example of showing credential secrets
juju credentials --client --show-secrets
# 2nd example with yaml output
juju credentials --format yaml --show-secrets
Sample output:
local-credentials:
aws:
bob:
auth-type: access-key
access-key: AKIAXZUYGB6UED2GNC5A
secret-key: StB2bmL1+tX+VX7neVgy/3JosJAwOcBIO53nyCVp
Last updated 6 months ago.