Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to encrypt server.ssl.key-store-password value and use it in SpringBoot

I would like to know is there anyway we can encrypt the server.ssl.key-store-password value and store it in application.properties file instead of storing it in plain text.

i couldn't find any documentation on this. Any help on this is highly appreciated.

Thanks in advance.

like image 386
Nagaraju Chitimilla Avatar asked Sep 13 '17 16:09

Nagaraju Chitimilla


People also ask

What encryption does spring boot use?

The "standard" encryption method is 256-bit AES using PKCS #5's PBKDF2 (Password-Based Key Derivation Function #2). This method requires Java 6.


1 Answers

Spring allows you to encrypt the properties file but the key for that encryption needs to be kept somewhere. This answer suggest keeping them in environment variables and points to a guide about how to encrypt them if you still want to.

like image 113
Guy Grin Avatar answered Oct 14 '22 07:10

Guy Grin