hashicorp / vault-service-broker

The official HashiCorp Vault broker integration to the Open Service Broker API. This service broker provides support for secure secret storage and encryption-as-a-service to HashiCorp Vault.
https://www.vaultproject.io/
Mozilla Public License 2.0
84 stars 38 forks source link

Don't error if token doesn't require renewal #28

Closed tyrannosaurus-becks closed 5 years ago

tyrannosaurus-becks commented 5 years ago

Fixes #25

When using the root token as the broker's VAULT_TOKEN, an error was occurring in the broker's Start method stating the token couldn't be renewed. It turned out this was because the root token doesn't have a lease and never expires, so it can't be renewed.

This code adds a check for whether tokens are renewable and resolves the error.