File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JBoss/WildFly and the fly likes DataSource Encryption. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "DataSource Encryption." Watch "DataSource Encryption." New topic
Author

DataSource Encryption.

Ram Vemulapalli
Greenhorn

Joined: Oct 21, 2008
Posts: 2
Hi all,
I would be very thakful, if any one of you could come with a possible solution.
I am using JBoss-4.2.1

Here is the scenario.

I have two ear files in one jboss instance.

A.ear file and B.ear file. And two Data Source files for each of the respective A,B ear files, pointing to same DataBase , but with diff DataSource names and diff user ids, diff JNDI names but with same passwords.

I encrypted the password for A.datasource.xml file and added that policy in login-config.xml. did the same with B.DataSource file(under conf directory). I restarted the jboss instance, but I am unable to connect to the database.

But if I revert the changes and use the same Data Source file without encrypting the Data source passwords I could connect to the Data Base.

What could be the possible reason for this??

<application-policy name="EncryptMODELPassword_A">
<authentication>
<login-module code="org.jboss.resource.security.SecureIdentityLoginModule" flag="required">
<module-option name="username">AAAAA</module-option>
<module-option name="password">xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</module-option>
<module-option name="managedConnectionFactoryName">jboss.jca:name=ADatasource,service=LocalTxCM</module-option>
</login-module>
</authentication>
</application-policy>


<application-policy name="EncryptMODELPassword_B">
<authentication>
<login-module code="org.jboss.resource.security.SecureIdentityLoginModule" flag="required">
<module-option name="username">BBBBB</module-option>
<module-option name="password">xxxxxxxxxxxxxxxxxxxxxxxxxxx</module-option>
<module-option name="managedConnectionFactoryName">jboss.jca:name=BDatasource,service=LocalTxCM</module-option>
</login-module>
</authentication>
</application-policy>

Can we add two policies in same login-config.xml file?? I mean one below the other, with diff policy name as shown above?


Your help is greatly appreciated.Thanks in advance.


Thank you.<br /> <br />Ram.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10048
    
163

"bhadra bhadra"

Please check your private message for a message from JavaRanch.


[My Blog] [JavaRanch Journal]
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10048
    
163

When you say you are not able to connect to the database, what error do you see?
Ram Vemulapalli
Greenhorn

Joined: Oct 21, 2008
Posts: 2
2008-10-23 19:45:17,401 INFO [STDOUT] 23-10-2008 19:45:17 ERROR [ApprouterDAO] - Module 10.40 rg.jboss.util.NestedSQLException: No matching credentials in Subject!; - nested throwable: (org.jboss.resource.JBossResourceException: No matching credentials in Subject!)
2008-10-23 19:45:17,401 INFO [STDOUT] Errorjava.lang.NullPointerException
Nandhakumar Varadarajan
Greenhorn

Joined: Dec 15, 2009
Posts: 1
Hi all,
i'm also having the same problem with the same error mentioned above . with 3 db's for one application, whether i need to have 3 application policy....? Expecting favorable reply.
Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: DataSource Encryption.