Spring / Spring Boot
How do you hide passwords in Spring boot application properties file?
Spring Boot Application properties may contain sensitive information such as database passwords, MQ config details, CERT passwords. The password stored in the application properties is not recommended to be PLAIN-TEXT and needs to be encrypted.
#Plain password not recommended app.mysql.password=My-plain-password
Spring boot doesn't provide inbuilt support for encryption. You may use Jasypt library to encrypt properties, so you could have your property like this:
#Encrypted using Jasypt app.mysql.password=ENC(XcBjfjDDjxeyFBoaEPhG14wEzc6Ja+Xx+hNPrJyQT88=)
Using Jasypt, you will encrypt your DB password using a master password which will be supplied to the application when starting to decrypt on the fly.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
