Steps to Secure JDBC Password

Follow Below Steps to secure JDBC Password

Here you will learn, How to secure JDBC password in tomcat context.xml file.

  1. Download SecureTomcatJDBC.jar file from link given below;
  2. Open CMD > change the file path where SecureTomcat.jar is located > run jar with this given command;
    Java -jar SecureTomcatJDBC.jar “Your password text” (it’ll generate Hash password copy that hash string.)

  3.    
  4. open the given path: C:\apache-tomcat\webapps\aiv\META-INF and open context.xml in any text editor. here it’ll look like.


  5. Replace the plain password text with encrypted password. Add one more property : factory="SecureTomcatDataSourceImpl" (replace with this value if it’s already exist.)after making this change context file will look like :
       

  6. Copy the SecureTomcatJDBC.jar in to tomcat/lib

  7. Start/Restart the server.

Note:You need to generate encrypted password for both SQL & AIV Login and update in context.xml file.