Skip to content

Commit

Permalink
Update API to use lease_id in body of sys/leases/revoke call (#7777)
Browse files Browse the repository at this point in the history
We didn't make this change earlier because not everyone would have had
an updated version of Vault with this API change but it's definitely
time.

Fixes hashicorp/vault-ssh-helper#40
  • Loading branch information
jefferai authored Nov 5, 2019
1 parent 4ad5afb commit 044660b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion api/sys_leases.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@ func (c *Sys) Renew(id string, increment int) (*Secret, error) {
}

func (c *Sys) Revoke(id string) error {
r := c.c.NewRequest("PUT", "/v1/sys/leases/revoke/"+id)
r := c.c.NewRequest("PUT", "/v1/sys/leases/revoke")
body := map[string]interface{}{
"lease_id": id,
}
if err := r.SetJSONBody(body); err != nil {
return err
}

ctx, cancelFunc := context.WithCancel(context.Background())
defer cancelFunc()
Expand Down

0 comments on commit 044660b

Please sign in to comment.