英文:
How to encrypt JDBC password for apache-tomcat-9.0.74?
问题
JDBC密码解密对于apache-tomcat-9.0.74使用SecureTomcatJDBC.jar不起作用。需要什么解决方法?
我按照https://www.aivhub.com/wiki/aiv_secureJDBCpassword.html中提供的步骤进行操作。
我使用命令"java -jar SecureTomcatJDBC.jar password"生成了加密的密码。
然后,我将SecureTomcatJDBC.jar放置在Tomcat的lib目录中。
<Resource name="jdbc/PegaRULES"
auth="Container"
type="javax.sql.DataSource"
factory="SecureTomcatDataSourceImpl"
driverClassName="org.postgresql.Driver"
url="jdbc:postgresql://db1.rds.amazonaws.com:5432/dbdev"
username="pegaadmin"
password="b67720a6c39db763b7f"
maxActive="100"
maxIdle="30"
maxWait="60000"
connectionProperties=""
validationQuery="SELECT 1"
validationInterval="30000"
testWhileIdle="true"
timeBetweenEvictionRunsMills="10000"
/>
密码解密适用于apache-tomcat-9.0.73,但对于apache-tomcat-9.0.74则不适用。
英文:
Decryption of JDBC Password for Tomcat not working for apache-tomcat-9.0.74 using SecureTomcatJDBC.jar. What should be the work around?
I followed the steps provided in https://www.aivhub.com/wiki/aiv_secureJDBCpassword.html.
I generated the encrypted password using the command "java -jar SecureTomcatJDBC.jar password".
Then I placed the SecureTomcatJDBC.jar in the lib of Tomcat.
<Resource name="jdbc/PegaRULES"
auth="Container"
type="javax.sql.DataSource"
factory="SecureTomcatDataSourceImpl"
driverClassName="org.postgresql.Driver"
url="jdbc:postgresql://db1.rds.amazonaws.com:5432/dbdev"
username="pegaadmin"
password="b67720a6c39db763b7f"
maxActive="100"
maxIdle="30"
maxWait="60000"
connectionProperties=""
validationQuery="SELECT 1"
validationInterval="30000"
testWhileIdle="true"
timeBetweenEvictionRunsMills="10000"
/>
The decryption of password is working for apache-tomcat-9.0.73, but the same is not working apache-tomcat-9.0.74.
答案1
得分: 0
The issue is not due to the versions of JDK and Tomcat.
问题不是由于JDK和Tomcat的版本。
It was found that the actual password of pegaadmin started with $ character. So the password of pegaadmin was changed by the DBA and the new password now starts with c.
发现pegaadmin的实际密码以$字符开头。因此,DBA更改了pegaadmin的密码,新密码现在以c开头。
This password was encrypted by the command "java -jar SecureTomcatJDBC.jar c*******" and the new encrypted password was put into the context.xml file.
此密码通过命令"java -jar SecureTomcatJDBC.jar c*******"进行加密,然后将新加密的密码放入context.xml文件中。
With the new password, the decryption by Tomcat was successful and the issue is resolved.
使用新密码,Tomcat成功解密,问题已解决。
So, this is a bug of the SecureTomcatJDBC.jar file.
因此,这是SecureTomcatJDBC.jar文件的一个错误。
英文:
The issue is not due to the versions of JDK and Tomcat.
It was found that the actual password of pegaadmin started with $ character. So the password of pegaadmin was changed by the DBA and the new password now starts with c.
This password was encrypted by the command "java -jar SecureTomcatJDBC.jar c*******" and the new encrypted password was put into the context.xml file.
With the new password the decryption by Tomcat was successful and the issue is resolved.
So, this is a bug of the SecureTomcatJDBC.jar file.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论