jQuery in Action, 3rd edition
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

domain authentication for datasource

kala praveen

Joined: Nov 04, 2004
Posts: 21

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.

Jaikiran Pai

Joined: Jul 20, 2005
Posts: 10441

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

Joined: Nov 04, 2004
Posts: 21

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">
<login-module code="com.sun.security.auth.module.NTLoginModule" flag="required">
<module-option name="debug">true</module-option>

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.

I agree. Here's the link: http://aspose.com/file-tools
subject: domain authentication for datasource
It's not a secret anymore!