aspose file tools*
The moose likes JBoss/WildFly and the fly likes domain authentication for datasource Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "domain authentication for datasource" Watch "domain authentication for datasource" New topic
Author

domain authentication for datasource

kala praveen
Greenhorn

Joined: Nov 04, 2004
Posts: 21
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

Joined: Jul 20, 2005
Posts: 9327
    
110

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.


[My Blog] [JavaRanch Journal]
kala praveen
Greenhorn

Joined: Nov 04, 2004
Posts: 21
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: domain authentication for datasource
 
Similar Threads
Configuring Database with EJB
how to configure datasource in jboss
How to set TXDataSource in JBOSS as like weblogic??
javax.naming.NameNotFoundException: XAConnectionFactory not bound
How to configure DataSource in JBoss?