In HashiCorp Certified: Vault Associate Certification course I have a problem with Lab: Working with Auth Methods
bob@vault-node ~ ➜ vault auth list
Error listing enabled authentications: Error making API request.
URL: GET http://192.168.44.16:8200/v1/sys/auth
Code: 403. Errors:
* permission denied
bob@vault-node ~ ✖
To use the vault CLI, you need to be authenticated, very simply. Since they give you a token in /opt/vault.creds (take a look at the file), you can pass that by setting the VAULT_TOKEN environment variable. If you do that, the command will work:
bob@vault-node ~ ➜ vault auth list
Error listing enabled authentications: Error making API request.
URL: GET http://192.168.114.238:8200/v1/sys/auth
Code: 403. Errors:
* permission denied
bob@vault-node ~ ✖ VAULT_TOKEN=hvs.VARIOUS-RANDOM-STUFF vault auth list
Path Type Accessor Description Version
---- ---- -------- ----------- -------
token/ token auth_token_4e24b3f8 token based credentials n/a
1 Like
Thank you, that works. I probably didn’t notice this link to the token before.