Custom Decryption and Spring Cloud Config Server
This code example shows how to facilitate custom decryption of passwords in client applications of a Spring Cloud Config Server.
This project has been split into three subprojects:
- the client application: requests its configuration from the configuration server and includes the decryption library to decrypt encrypted properties
- the configuration server: exposes the configuration for the client application. Doesn't decrypt encrypted values.
- the decryption library: contains the encryption/decryption algorithm and required setup to do autconfiguration in the client
For a more thorough explanation read the blog post at https://github.com/kuipercm/custom-spring-cloud-config-decryption-example.
To run this code
mvn clean installin the root project.
java -jar custompasswordconfigserver\target\custom-password-config-server-1.0-SNAPSHOT.jarto start the server
java -jar custompasswordclientapplication\target\custom-password-clientapplication-1.0-SNAPSHOT.jar --bldn.encryption=reversableto start the client
http://localhost:48081/testto see the decrypted password