• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

DataSource Encryption.

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"bhadra bhadra"

Please check your private message for a message from JavaRanch.
 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Tongue wrestling. It's not what you think. And here, take this tiny ad. You'll need it.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic