0

Encrypt tomcat keystore password

With reference to the above question.

What if I want to just encrypt the password with some jar file in the tomcat/lib folder, using the just the org.apache.coyote.http11.Http11Nio2Protocol as protocol. Do I need to add some attribute to call the encryption class from the jar file.

  • 1
    You need to extend the `Http11Nio2Protocol` class like in [this answer](https://stackoverflow.com/a/36563846/11748454) and use your class in the configuration. – Piotr P. Karwasz Jan 27 '21 at 21:51
  • I am using some encrypting jar, I am not allowed to change the jar. Just I need to check whether this jar which is used for encryption of datasource and can even be used for encryption of passwords in keystore. – Syed Iftekharuddin Jan 28 '21 at 06:50
  • The [aforementioned answer](https://stackoverflow.com/a/36563846/11748454) doesn't require you to change anything in your jar. You just have to extend Tomcat to support (reversible) password encryption using the functions in your encryption jar, put the extended `HttpNio2Protocol` class in another jar and deploy it in `$CATALINA_BASE/lib` along with your encryption jar. – Piotr P. Karwasz Jan 28 '21 at 13:55

0 Answers0