Closed JulianNeuhaus27 closed 2 years ago
Hi Julian :wave: :)
Are you sure your token has permissions to list on root level?
KV2 should be fully supported and is tested. Here a list of all commands that are tested against KV1 and KV2 https://github.com/fishi0x01/vsh/tree/master/test/suites/commands
I just tried locally and cannot reproduce the issue.
What I did:
docker-compose.yml
---
version: "3.9"
services:
vault:
container_name: vault
image: "vault:1.5.4"
environment:
- VAULT_ADDR=http://127.0.0.1:8200
- VAULT_TOKEN=root
- VAULT_DEV_ROOT_TOKEN_ID=root
- VAULT_DEV_LISTEN_ADDRESS=0.0.0.0:8200
ports:
- 8200:8200
docker exec vault /bin/sh -c vault secrets enable -version=2 -path=my-kv2 kv
$ VAULT_ADDR=http://localhost:8200 VAULT_TOKEN=root vsh
http://localhost:8200 /> ls
my-kv2/
http://localhost:8200 />
Hm ok I used Vault version 1.9.1
, but then the issue might be somewhere else 🙁
If your token lacks permissions to do ls backends level, but you know that you have access to <your-backend>
, then you could also try
VAULT_PATH=<your-backend>/ vsh
That will automatically set <your-backend>/
as current path.
Tried the same docker-compose.yml
file with vault:1.9.1
- also works as expected.
Will later make a PR to bump the whole test suite to latest vault version though. Its about time again I guess :)
When I tried to use VAULT_PATH=<your-backend>/
I always got this:
Error initializing vault client | Is VAULT_ADDR properly set? Do you provide a proper token?
VAULT_PATH is not a valid directory path
I now tried it with our root token (yes its still there 😞 ) and all worked well...so your first guess was right. I will need to check what permission was missing for me 🙂 Thanks for taking a look so quickly! Hope you are all good and we see us next time when Paolo is in town 😬
It looks like the secret engine version2 is not supported.
ls
is returning empty Vault from root path.Even though the Vault is definitely not empty 🙂