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

Fixed renew and revoke used path style lease ids #224

Open tv opened 4 years ago

tv commented 4 years ago

The current vault documents recommend having the lease_id in the body for easier policy management. So this PR does just that, moves lease_id to the body rather than having it in the url path.

kurtdb commented 3 years ago

This solves an issue we are having: when trying to renew a lease, the current implementation of the vault (latest version) returns a http 403 when you put the leaseId in the request url: https://www.vaultproject.io/api-docs/system/leases#renew-lease

igouss commented 3 years ago

Hi, can you please take a look at this patch. I have the same problem. Library is calling wrong URL.

igouss commented 3 years ago

Meanwhile

            VaultResponse renew = vault.logical().write("sys/leases/renew", Map.of(
                    "lease_id", dataSource.getCredentials().getLeaseId(),
                    "interval", dataSource.getCredentials().getLeaseDuration()
            ));
Sulion commented 3 years ago

I think this lib is dead. ☠️ RIP.

kurtdb commented 3 years ago

Maybe fork it and do some further development on it?