BetterCloud / vault-java-driver

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

#179 fix path for latest-version v2 kv delete #213

Open sfc-gh-dkarp opened 4 years ago

sfc-gh-dkarp commented 4 years ago

Current code attempts a DELETE on the metadata path to do kv delete of the latest version, but Vault expects a DELETE on the data path.

From the Vault API docs (https://www.vaultproject.io/api/secret/kv/kv-v2.html#delete-latest-version-of-secret):

»Delete Latest Version of Secret

This endpoint issues a soft delete of the secret's latest version at the specified location. This marks the version as deleted and will stop it from being returned from reads, but the underlying data will not be removed. A delete can be undone using the undelete path.

Method Path DELETE /secret/data/:path