Build against Spring Vault 2.2 snapshots.

Adapt to key-value mount-version auto-discovery.

See gh-355
This commit is contained in:
Mark Paluch
2019-09-09 14:30:20 +02:00
parent b479ca2d38
commit 2f60c97ef3
4 changed files with 23 additions and 18 deletions

10
pom.xml
View File

@@ -47,6 +47,7 @@
<httpcore.version>4.4.9</httpcore.version>
<netty.version>4.1.30.Final</netty.version>
<okhttp3.version>3.10.0</okhttp3.version>
<bcpkix-jdk15on.version>1.62</bcpkix-jdk15on.version>
<google-api-services-iam.version>v1-rev259-1.25.0
</google-api-services-iam.version>
@@ -112,6 +113,15 @@
<version>${netty.version}</version>
</dependency>
<!-- BouncyCastle -->
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15on</artifactId>
<version>${bcpkix-jdk15on.version}</version>
<optional>true</optional>
</dependency>
<!-- GCP SDK -->
<dependency>
<groupId>com.google.apis</groupId>

View File

@@ -42,7 +42,7 @@
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-core</artifactId>
<optional>true</optional>
<version>1.11.345</version>
<version>1.11.627</version>
<exclusions>
<exclusion>
<groupId>software.amazon.ion</groupId>
@@ -55,6 +55,12 @@
</exclusions>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15on</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-iam</artifactId>

View File

@@ -49,8 +49,8 @@ import org.springframework.vault.core.lease.SecretLeaseContainer;
*/
@Configuration
@ConditionalOnProperty(name = "spring.cloud.vault.enabled", matchIfMissing = true)
@EnableConfigurationProperties({ VaultGenericBackendProperties.class,
VaultKeyValueBackendProperties.class })
@EnableConfigurationProperties({VaultGenericBackendProperties.class,
VaultKeyValueBackendProperties.class})
@Order(Ordered.LOWEST_PRECEDENCE - 10)
public class VaultBootstrapPropertySourceConfiguration implements InitializingBean {
@@ -158,20 +158,9 @@ public class VaultBootstrapPropertySourceConfiguration implements InitializingBe
keyValueBackend, Arrays.asList(this.applicationContext
.getEnvironment().getActiveProfiles()));
if (keyValueBackend instanceof VaultKeyValueBackendProperties
&& ((VaultKeyValueBackendProperties) keyValueBackend)
.getBackendVersion() == 2) {
for (String context : contexts) {
secretBackendConfigurer.add(KeyValueSecretBackendMetadata
.create(keyValueBackend.getBackend(), context));
}
}
else {
for (String context : contexts) {
secretBackendConfigurer.add(GenericSecretBackendMetadata
.create(keyValueBackend.getBackend(), context));
}
for (String context : contexts) {
secretBackendConfigurer.add(GenericSecretBackendMetadata
.create(keyValueBackend.getBackend(), context));
}
}

View File

@@ -20,7 +20,7 @@
<description>Spring Cloud Vault Dependencies</description>
<properties>
<spring-vault.version>2.1.3.RELEASE</spring-vault.version>
<spring-vault.version>2.2.0.BUILD-SNAPSHOT</spring-vault.version>
</properties>
<dependencyManagement>