You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Vault API documentation claims that using LIST method or ?list=true query string are interchangeable and produce the same result. That is true but when using a vault agent in between the client and the server it doesn't work.
Using the LIST method works as expected while the query string list=true returns a 404.
vault command uses only the query string list=true, so it doesn't work when pointing to an agent:
$ vault kv list kv/mydir
No value found at kv/metadata/mydir
$ vault kv list -output-curl-string kv/mydir
curl http://127.0.0.1:8200/v1/kv/metadata/mydir?list=true
You need to have the current setup, which is not easy to reproduce here:
Machine A with Vault Server
Machine B with Vault Agent connected and authenticated to Machine A Vault Server
Run on Machine A: vault kv put kv/mydir/mykey name=value
Run on Machine B: vault kv list kv/mydir. It returns: No value found at kv/metadata/mydir. This doesn't list the directory.
Run on Machine B: curl -XLIST -s http://127.0.0.1:8200/v1/kv/metadata/mydir. This does list the directory.
Expected behavior vault kv list kv/mydir should list the keys in the directory when pointing to a Vault Agent
Environment:
Vault Server Version (retrieve with vault status):
Key Value
--- -----
Recovery Seal Type shamir
Initialized true
Sealed false
Total Recovery Shares 1
Threshold 1
Version 1.1.2
Cluster Name vault-cluster-4db0f02c
Cluster ID b5cd54b2-7d43-0690-fe26-1daeec8e091e
HA Enabled true
HA Cluster https://vault.service.consul:8201
HA Mode active
Describe the bug
Vault API documentation claims that using
LIST
method or?list=true
query string are interchangeable and produce the same result. That is true but when using a vault agent in between the client and the server it doesn't work.Using the
LIST
method works as expected while the query stringlist=true
returns a 404.vault
command uses only the query stringlist=true
, so it doesn't work when pointing to an agent:While using curl with LIST method does work:
To Reproduce
vault kv put kv/mydir/mykey name=value
vault kv list kv/mydir
. It returns:No value found at kv/metadata/mydir
. This doesn't list the directory.curl -XLIST -s http://127.0.0.1:8200/v1/kv/metadata/mydir
. This does list the directory.Expected behavior
vault kv list kv/mydir
should list the keys in the directory when pointing to a Vault AgentEnvironment:
vault status
):vault version
):Vault server configuration file(s):
Given the fact that everything works well when run without the Vault agent, I'll post only the agent config.
Agent:
The text was updated successfully, but these errors were encountered: