Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error making API request when using Vault secrets

I am following this tutorial but I don't know why I am getting these permissions errors when I run some vault commands

  vault kv put secret/hello foo=world
    Error making API request.
    
    URL: GET http://127.0.0.1:8200/v1/sys/internal/ui/mounts/secret/hello
    Code: 403. Errors:
    
    * permission denied

For further info...

vault status
Key             Value
---             -----
Seal Type       shamir
Initialized     true
Sealed          false
Total Shares    1
Threshold       1
Version         1.8.4
Storage Type    inmem
Cluster Name    vault-cluster-fc4492f9
Cluster ID      87956902-532d-dcfd-5e9a-9f1d36207ef4
HA Enabled      false

And the version of my the vault package

vault --version
Vault v1.8.4 (925bc650ad1d997e84fbb832f302a6bfe0105bbb)

I have already exported the Token and the address, so I have no clue what to do next to solve the issue. Can anyone help me out? Thanks in advance.


UPDATES

From the UI I do have access to http://127.0.0.1:8200/ui/vault/ but still having the same issue from the CLI. I even tried vault auth login but nothing changes.

like image 381
iker lasaga Avatar asked Jul 17 '26 06:07

iker lasaga


1 Answers

You must use quotes around the token when exporting it:

export VAULT_TOKEN="s..."

Reference in the tutorial.

like image 139
Don't Panic Avatar answered Jul 19 '26 20:07

Don't Panic



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!