This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
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

Win a copy of REST with Spring (video course) this week in the Spring forum!
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 in the following way:

<application-policy name="EncryptDBPassword">
<login-module code="" 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

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

I agree. Here's the link:
subject: domain authentication for datasource
It's not a secret anymore!