I'm working on refactoring a native java code last touched in 1999. There are no design patterns, modern methodologies, security standards applied, no toolsets like password vaulting systems, we don't even have an ant / maven / Jenkins server. It was expressed to me that they simply "export the EAR from RBD" (Rational Business Developer), so there's a basic understanding of the environment. I'm a little stuck at the moment. I've moved the properties for this app into a DB table except for two. The user and password. I'm looking for a way to secure the password in the properties file but am coming up short on ideas.
I'm thinking an acceptable solution would be to encode the password and set it as the DB users password. The plain text password would be then stored in the properties file. The codebase would need to encode it before attempting to connect to the DB.
I think the only pitfall for this is that multiple apps use the DB account and we either create a new account for this and migrate apps to this as we go, or do it all in one fell swoop. Am I off here? Are there better solutions?
Edited for clarity and re-edited for EAR instead of WAR file. This is deployed to a WebSphere App server.