Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DataSource Encryption.

 
Ram Vemulapalli
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"bhadra bhadra"

Please check your private message for a message from JavaRanch.
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you say you are not able to connect to the database, what error do you see?
 
Ram Vemulapalli
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic