Use rotating secrets for generic backend.

We now use rotating secrets for the generic backend to reload properties after cache TTL expiry.

Closes gh-110.
Original pull request: gh-111.
This commit is contained in:
Steve Swor
2017-05-15 18:34:24 +10:00
committed by Mark Paluch
parent f2c0a23bdb
commit 99085d4fd8

View File

@@ -80,7 +80,9 @@ class LeasingVaultPropertySourceLocator extends VaultPropertySourceLocatorSuppor
protected PropertySource<?> createVaultPropertySource(
SecretBackendMetadata accessor) {
RequestedSecret secret = RequestedSecret.renewable(accessor.getPath());
RequestedSecret secret = accessor instanceof GenericSecretBackendMetadata
? RequestedSecret.rotating(accessor.getPath())
: RequestedSecret.renewable(accessor.getPath());
if (properties.isFailFast()) {
return createVaultPropertySourceFailFast(secret, accessor);