BetterCloud / vault-java-driver

Zero-dependency Java client for HashiCorp's Vault
https://bettercloud.github.io/vault-java-driver/
334 stars 224 forks source link

clarify relationship between http api path and read path #232

Open madcap opened 3 years ago

madcap commented 3 years ago

Please clarify in the readme/documentation how to determine the path and path depth. For example I can access my secrets with the following http call:

curl -s -H "X-Vault-Token: TOKEN" https://vault.example.com/v1/secret/data/deployment/api

which returns a json payload like:

{
  "request_id":"some uuid",
  "lease_id":"",
  "renewable":false,
  "lease_duration":0,
  "data":{
    "data":{
      "key1":"value1"
      ...

It's not at all obvious from the documentation how I would convert from a known http api path to the path that I would use for a logical read method call or what I would set my prefixPathDepth to.

madcap commented 3 years ago

with trial and error and the use of step debugging I was able to determine that my path should be secret/deployment/api and I should not specify any prefixPathDepth.

I think a source of confusion is that I was already using .../data/... in my paths for http api calls.