Skip to content

Latest commit

 

History

History
32 lines (27 loc) · 1.51 KB

spring-cloud-vault.md

File metadata and controls

32 lines (27 loc) · 1.51 KB

Spring Cloud Vault

Spring Cloud Vault Config provides client-side support for externalized configuration in a distributed system. With HashiCorp Vault you have a central place to manage external secret properties for applications across all environments. Vault can manage static and dynamic secrets such as username/password for remote applications/resources and provide credentials for external services such as MySQL, PostgreSQL, Apache Cassandra, MongoDB, Consul, AWS and more.

Read: https://cloud.spring.io/spring-cloud-vault/

Maven Dependency

<dependency>
	<groupId>org.springframework.cloud</groupId>
	<artifactId>spring-cloud-starter-vault-config</artifactId>
</dependency>

Configuration

Configure the Vault connection in bootstrap.properties.

Discover Vault instance using Spring Cloud Kubernetes

spring.cloud.vault.enabled=true
spring.cloud.vault.discovery.enabled=false
spring.cloud.vault.token=s.4fhaikfwiugibfi38guibfav8
spring.cloud.vault.scheme=http
# FQDN direct uri http://{serviceId}.{namespace}:{port}
spring.cloud.vault.uri=http://vault-vault.vault:8200

Disabling Vault instance

Note: Useful for local profile

spring.cloud.vault.enabled=false
spring.cloud.config.discovery.enabled=false