Spring Cloud Config Server Sample

Spring Cloud Config Server application to demonstrate the usage of the Azure KeyVault features

License

License

Categories

Categories

config Application Layer Libs Configuration KeY Data Data Formats Formal Verification
GroupId

GroupId

io.github.srempfer
ArtifactId

ArtifactId

spring-cloud-config-azure-keyvault-sample
Last Version

Last Version

0.5.0
Release Date

Release Date

Type

Type

jar
Description

Description

Spring Cloud Config Server Sample
Spring Cloud Config Server application to demonstrate the usage of the Azure KeyVault features
Project URL

Project URL

https://github.com/srempfer/spring-cloud-config-azure-keyvault
Source Code Management

Source Code Management

https://github.com/srempfer/spring-cloud-config-azure-keyvault/tree/master

Download spring-cloud-config-azure-keyvault-sample

How to add to project

<!-- https://jarcasting.com/artifacts/io.github.srempfer/spring-cloud-config-azure-keyvault-sample/ -->
<dependency>
    <groupId>io.github.srempfer</groupId>
    <artifactId>spring-cloud-config-azure-keyvault-sample</artifactId>
    <version>0.5.0</version>
</dependency>
// https://jarcasting.com/artifacts/io.github.srempfer/spring-cloud-config-azure-keyvault-sample/
implementation 'io.github.srempfer:spring-cloud-config-azure-keyvault-sample:0.5.0'
// https://jarcasting.com/artifacts/io.github.srempfer/spring-cloud-config-azure-keyvault-sample/
implementation ("io.github.srempfer:spring-cloud-config-azure-keyvault-sample:0.5.0")
'io.github.srempfer:spring-cloud-config-azure-keyvault-sample:jar:0.5.0'
<dependency org="io.github.srempfer" name="spring-cloud-config-azure-keyvault-sample" rev="0.5.0">
  <artifact name="spring-cloud-config-azure-keyvault-sample" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.github.srempfer', module='spring-cloud-config-azure-keyvault-sample', version='0.5.0')
)
libraryDependencies += "io.github.srempfer" % "spring-cloud-config-azure-keyvault-sample" % "0.5.0"
[io.github.srempfer/spring-cloud-config-azure-keyvault-sample "0.5.0"]

Dependencies

compile (2)

Group / Artifact Type Version
org.springframework.cloud : spring-cloud-config-server jar
io.github.srempfer : spring-cloud-config-azure-keyvault-starter jar 0.5.0

test (1)

Group / Artifact Type Version
org.springframework.boot : spring-boot-starter-test jar 2.3.3.RELEASE

Project Modules

There are no modules declared in this project.

Build Status Quality Gate Status Maven Central

Spring Cloud Config Azure KeyVault Starter

The Starter brings you the ability to use the encrypted values feature in your remote property sources. The values securely stored as secrets in Azure KeyVault.
In addition to that you could use your Azure KeyVault as backend to store your properties.

Sample Code

Please refer to the different sample projects

Quick Start

Add the dependency

The starter is published on Maven Central. If you're using Maven add the following dependency:

<dependency>
    <groupId>io.github.srempfer</groupId>
    <artifactId>spring-cloud-config-azure-keyvault-starter</artifactId>
    <version>0.6.0-SNAPSHOT</version>
</dependency>

Settings

To get it working you have to specify your Azure KeyVault url, Azure service principal client id and client key.

spring.cloud.config.server.azure.keyvault.uri=put-your-azure-keyvault-url-here
spring.cloud.config.server.azure.keyvault.client-id=put-your-azure-client-id-here
spring.cloud.config.server.azure.keyvault.client-key=put-your-azure-client-key-here
spring.cloud.config.server.azure.keyvault.tenant-id=put-your-azure-tenant-id-here

For the interaction with Azure KeyVault the Azure Key Vault Secrets Spring Boot Starter is used.

Usage

Decryption

The starter provides an Azure KeyVault based EnvironmentEncryptor and works similar to the cipher based mechanism.

spring.datasource.username=dbuser
spring.datasource.password={keyvault}secret-name-in-key-vault

KeyVault Backend

The starter provides an Azure KeyVault based EnvironmentRepository and works similar to the JDBC Backend.

The format of the secret names have to be {application}---{profile}---{label}---keyname

Secret Name Key
application---default---master---simplekey simplekey
application---default---master---test-key test-key
application---default---master---spring--datasource--password spring.datasource.password

Versions

Version
0.5.0
0.4.0
0.3.0
0.2.0
0.1.0