Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where/how do you store application secrets(password, API KEY) in Spring Boot application

I want to encrypt sensitive data in application properties. I will use AES algorithm to encrypt/decrypt data. The key to decrypt will be stored in ENV variables, accessing this key requires the same privileges as modifying production application.

What do you think about this approach?

How do you protect sensitive data?

like image 791
Romper Avatar asked Nov 08 '25 04:11

Romper


1 Answers

There are many ways:

  1. Spring Cloud Config
  2. Spring Cloud Config Vault
  3. Not store them at all and provide them via environment variables/files/whatever at run time
  4. I'm sure there are other ways

This is really too broad of a topic for Stackoverflow and is not really specific to Spring Boot or anything in particular.

like image 104
Strelok Avatar answered Nov 10 '25 20:11

Strelok



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!