Error with vault commands

I am getting below 2 issues while executing vault commands , config details provided below. Can someone help here ?

Issue 1:
vault secrets list
Error listing secrets engines: Error making API request.

URL: GET http://192.168.137.128:8200/v1/sys/mounts
Code: 403. Errors:

  • permission denied

Issue 2:
[root@alpha02 twitter_bot]# vault kv get secret/twitter
Error making API request.

URL: GET http://192.168.137.128:8200/v1/sys/internal/ui/mounts/secret/twitter
Code: 403. Errors:

  • preflight capability check returned 403, please ensure client’s policies grant access to path “secret/twitter/”

Vault config:
[root@alpha02 twitter_bot]# cat /etc/vault.d/vault.json
{
“listener”: [{
“tcp”: {
“address” : “0.0.0.0:8200”,
“tls_disable” : 1
}
}],
“api_addr”: “http://192.168.137.128:8200”,
“storage”: {
“file”: {
“path” : “/tmp/vault”
}
},
“max_lease_ttl”: “10h”,
“default_lease_ttl”: “10h”,
“ui”:true
}


Do you use a token with the abilities to access the key or enable a secret engine?

I think i have enabled secret engine and dont use token.

But Vault is token-based so you’ll have to use a token. At least the root token that was provided to you when you initialized vault.

Maybe you enabled the secret engine in another shell/ session where the appropriate token was set.