The backend is already enabled using admin token. I then create a token for the policy
./vault token create -policy=pass
./vault login <token of the Policy>
But
./vault kv put password_store-kv/foo bar=zip
Error writing data to password_store-kv/foo: Error making API request.
URL: PUT http://127.0.0.1:8200/v1/password_store-kv/foo
Code: 403. Errors:
* 1 error occurred:
* permission denied
As per the policy, password_store-kv/foo should accept parameter bar with vaules “zip” and “zap” right?
Sorry about the typo, path was password_store-kv/db1_pass, Still does not work though.
./vault kv put password_store-kv/db1_pass bar=zip
Error writing data to password_store-kv/db1_pass: Error making API request.
URL: PUT http://127.0.0.1:8200/v1/password_store-kv/db1_pass
Code: 403. Errors:
* 1 error occurred:
* permission denied
Error writing data to do-it/data/foo: Error making API request.
URL: PUT https://vault.doit.local/v1/do-it/data/foo
Code: 403. Errors:
* 1 error occurred:
* permission denied