• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

domain authentication for datasource

 
kala praveen
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Is it possible to configure jboss in such a way that the current system's username and password are automatically to create a datasource connection?

I want jboss to pick up my windows credentials with which I have logged in, to create a datasource without explicitly supplying them in the
*-ds.xml file.


Any ideas are appreciated.

Thanks,
Kala.
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I haven't tried this myself, but the *-ds.xml file allows a



element (instead of username and password). I guess, you will have to configure a application policy in the login-config.xml and use it here. That application policy can then provide the domain user and password.
 
kala praveen
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Thanks for your reply. The solution that you gave solves only half of my problem. I want to avoid hardcoding credentials in the login-config.xml and let jboss pick up them from the operating system.

I am juz wondering whether there is a module that I can add a module in the loging-config.xml that supplies jboss the credentials of current user.

I have tried specifying com.sun.security.auth.module.NTLoginModule in the following way:

<application-policy name="EncryptDBPassword">
<authentication>
<login-module code="com.sun.security.auth.module.NTLoginModule" flag="required">
<module-option name="debug">true</module-option>
<module-optionname="managedConnectionFactoryName">jboss.jca:name=MDMDS,service=LocalTxCM</module-option>
</login-module>
</authentication>
</application-policy>

This is not working because this does not come under the family of Jboss login modules that implement the abstract class org.jboss.resource.security.AbstractPasswordCredentialLoginModule.

i will be really thankful to someone who can give a solution to this.

Thanks,
Kala.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic