0

Are there any security implications of having a java keystore in the lib folder of Tomcat? I tried to have it outside of the lib folder but then I get a file not found exception. This is for an Axis2 web service in combination with Rampart so I am not getting the keystore programmatically but only giving a name.

Björn
  • 1,593
  • 1
  • 13
  • 28

1 Answers1

0

It is not mandatory to place your .keystore fiel in a particualr directory. You can place your .keystore file anywhere as mentioned by the tomcat documentaion. So make sure when you put the keystore in a different location, you mention the path correctly. Also if you are creating a new store in a different location then you may have to import the certificates in the new keystore. This is what tomcat documentation say about creating a keystore in a specified location:

To specify a different location or filename, add the -keystore parameter, followed by the complete pathname to your keystore file, to the keytool command shown above. You will also need to reflect this new location in the server.xml configuration file, as described later. For example:

Windows:

       %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA \   -keystore \path\to\my\keystore

Unix:

       $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA \   -keystore /path/to/my/keystore
Juned Ahsan
  • 67,789
  • 12
  • 98
  • 136