Reputation: 65298
We have a shared code base between different teams. Is there any kind of best practice of storing admin credentials in a spring properties file? I don't want anyone to see the username or password. We are using docker and aware I can use docker secrets but I don't want to tie passwords to docker. I want to access the passwords even if we're not using docker.
Upvotes: 2
Views: 2332
Reputation: 7384
In Docker Swarm use secrets. In a normal Docker daemon use Environment Variables or env_file
Upvotes: 0
Reputation: 7041
Simple Approach: Use environment variables instead of putting sensitive values inside your application.properties file.
Advanced Approach: Vault. Check out the Spring Cloud Vault project for more details on how to leverage Vault with Spring applications.
Upvotes: 1
Reputation: 45500
Encrypt the application.properties
file, then track it with git
.
Then Simply ingore the decrypted application.properties
.
Upvotes: 0
Reputation: 20097
One of the best solutions I know is Blackbox https://github.com/StackExchange/blackbox (via stackexchange ;)
Upvotes: 1