Reputation: 5846
I examine Jasypt for storing database encrypted passwords in property files. It has good integration with Spring etc., but approach of that this guys propose for encrypting password looks a bit weird as for me:
Use PBE (symmetric algorithm) encryption.
Store password for encryption/decryption in environment variable or in source code.
Both options look unsafe and a bit insecure.
My questions:
Upvotes: 0
Views: 1735
Reputation: 36
In our application we use two approaches:
We use a enterprise password vault which stores the passwords for all our databases. Our web sever requests the password from the vault to connect the database every time.
We store Encrypted passwords in properties file. And during the application startup we read the properties file using class loader and keep it as a system variable and use it whenever needed.
It is difficult to have public/private key encryption directly with db, you would need an intermediary to do this.
Upvotes: 2