1

Instead of encrypting individual configurations in YAMLs, I want to encrypt entire YAML. Is there any way to achieve this in Spring boot? I know the requirement looks unrealistic at the moment, but we really required this.

Ashish Bhosle
  • 609
  • 5
  • 18
  • I suppose you want to encrypt this because your database password is written in plaintext in it. If it's the case, encrypting the YAML isn't the right solution, and [this might help you](https://stackoverflow.com/questions/37404703/spring-boot-how-to-hide-passwords-in-properties-file) – Arthur Attout Nov 25 '19 at 06:47
  • Using the Spring Cloud Config Server this is a built in function: https://cloud.spring.io/spring-cloud-config/reference/html/#_encryption_and_decryption In bigger installations I'd also explore the use of Vault. – daniel.eichten Nov 25 '19 at 09:24
  • @ArthurAttout We need to encrypt entire file not just some fields. Spring Vault may be the tool to achieve this. With Spring Vault configuration file can be put in the Vault – Ashish Bhosle Nov 25 '19 at 09:59

0 Answers0