Unable to write the first secret in vault for Windows

Getting permission denied error when trying to run command - vault kv put -mount=secret hello foo=world

That seems to be some old version of Vault? -mount parameter hasn’t existing for a long time AFAIK.

C:\Users\VaultUser>vault version
Vault v1.11.1 (0f634755745f4adf62ec0723a0b93d6dce5bc33e), built 2022-07-19T20:16:47Z

C:\Users\VaultUser>vault kv put secret/hello foo=world
Key                Value
---                -----
created_time       2022-07-27T05:51:20.141878663Z
custom_metadata    <nil>
deletion_time      n/a
destroyed          false
version            1

Tried and it still says permission denied.

Permission denied just means your token doesn’t have the permission to do what’s you’re asking. So you’re missing a policy.

[ Edit: just to be sure, check to make sure you have your VAULT_TOKEN env variable set… in windows it isn’t stored automatically upon login ]

Check out either Hashicorp’s policy guide, @jeffsanicola also has a nice add on in github.