We have a web application that runs on tomcat that has hardcoded passwords inside some of the .java
files. Our security folks are none too pleased and they asked we move the files externally.
My assumption was that the best way to do this was to put a properties file inside of the tomcat /conf
directory perhaps? Or maybe setting up some sort of JDNI property in one of the config files?
Is there an generally acceptable way this should be done?
I see this post has some answers for non tomcat: What is the best way to keep passwords configurable, without having them too easily available to the casual human reader?
To get more specific we have application managed database connections and i wanted to grab the credentials. I'm assuming i need to some how put them into a JNDI
resource and then query that resource for the username/ password?