How to encrypt(obscure) the database connection password in ironJacamar?

33 views
Skip to first unread message

willpowe...@yahoo.com

unread,
Mar 17, 2016, 1:38:05 AM3/17/16
to IronJacamar Users
Dear All,

Does anyone has the experience to encrypt(obscure) the database connection password? We once used JBoss and it has built-in solution to encrypt the database connection password. Now, we change to use Tomcat + ironJacamar, we would like to know how to do that? I cannot find any document or tutorial on this. Need your help! 

Thanks!
Willpower

Jesper Pedersen

unread,
Mar 17, 2016, 7:49:43 AM3/17/16
to IronJacamar Users
Check the embedded/src/main/resources/jca.xml file, and find the definition for "DefaultSecurityDomain".

You need to provide a bean that implements https://github.com/ironjacamar/ironjacamar/blob/1.2/core/src/main/java/org/jboss/jca/core/spi/security/SubjectFactory.java and install that - either by changing the jca.xml file or by providing a new xml file through http://www.ironjacamar.org/doc/api/embedded/1.2/org/jboss/jca/embedded/Embedded.html#deploy%28java.net.URL%29.

Then you can use the name of the bean, as your definition for <security-domain>.

DefaultSecurityDomain looks like https://github.com/ironjacamar/ironjacamar/blob/1.2/core/src/main/java/org/jboss/jca/core/security/DefaultSubjectFactory.java

Feel free to submit your implementation for our 1.2 branch.

HTH

zero

unread,
Mar 21, 2016, 12:27:42 AM3/21/16
to IronJacamar Users
Thanks a lot Jesper! I will try it.
Reply all
Reply to author
Forward
0 new messages