wood burning stoves 2.0*
The moose likes JBoss/WildFly and the fly likes Connection to 2 databases - Failed to load users/passwords/role files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Connection to 2 databases - Failed to load users/passwords/role files " Watch "Connection to 2 databases - Failed to load users/passwords/role files " New topic
Author

Connection to 2 databases - Failed to load users/passwords/role files

San-Yih Pan
Greenhorn

Joined: Nov 04, 2004
Posts: 19
Hi,

I went through http://www.coderanch.com/t/90486/JBoss/Failed-load-users-passwords-role but have one question.

How to put 2 <security-domain> in "jboss-web.xml" because of 2 databases?

My login-config.xml is as follows:

<application-policy name="oracleds1">
<authentication>
<login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
flag="required">
<module-option name="usersProperties">props/oracleds1-users.properties</module-option>
<module-option name="rolesProperties">props/oracleds1-roles.properties</module-option>
</login-module>
</authentication>
</application-policy>

<application-policy name="oracleds2">
<authentication>
<login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
flag="required">
<module-option name="usersProperties">props/oracleds2-users.properties</module-option>
<module-option name="rolesProperties">props/oracleds2-roles.properties</module-option>
</login-module>
</authentication>
</application-policy>

Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5776
    
    7

You need to create a third application-policy which chains those two application policies together (just add the two <authentication> entries ), and then reference that one policy in jboss-web.xml. This should help:
http://docs.jboss.org/jbosssecurity/docs/6.0/security_guide/html/Login_Modules.html


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connection to 2 databases - Failed to load users/passwords/role files
 
Similar Threads
cannot perform access control without an authenticated principal
how to add username , role , password to jboss the way we do in tomcat
how to add username , role , password to jboss the way we do in tomcat
unable to add web-console user/password authentication
Failed to load users/passwords/role files