This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JBoss/WildFly and the fly likes [jboss jaas] login-conf.xml configuration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "[jboss jaas] login-conf.xml configuration" Watch "[jboss jaas] login-conf.xml configuration" New topic

[jboss jaas] login-conf.xml configuration

Alessandro Ilardo
Ranch Hand

Joined: Dec 23, 2005
Posts: 218
Here I am, again

I am trying to use a DatabaseServerLoginModule entry in login-conf.xml to authenticate my application users on a MySQL 5 database.
According to this page I tried my best to figure out the configuration on both JBoss 4.0.5GA and my web application in Struts.
It seems to work, because if I try login with a no existing user I get back to the error login page defined in the web.xml. The problem is when I log in with an existing profile, I get an access denied by the server. It seems that the role assigned doesn't match with the web.xml.



JBoss log
2007-04-20 13:11:03,662 DEBUG [] CallbackHandler:
2007-04-20 13:11:03,663 DEBUG [] Created
2007-04-20 13:11:03,665 DEBUG [] CachePolicy set to: org.jboss.util.TimedCachePolicy@131b810
2007-04-20 13:11:03,665 DEBUG [] setCachePolicy, c=org.jboss.util.TimedCachePolicy@131b810
2007-04-20 13:11:03,665 DEBUG [] Added virtuaLabAccessPolicy, to map

Any suggestions?

Thanks in advance
[ April 20, 2007: Message edited by: Alessandro Ilardo ]

trying to decode a woman mind....
Alessandro Ilardo
Ranch Hand

Joined: Dec 23, 2005
Posts: 218
with this line it works fine
select userRole, 'Roles' from USR_ROLE where username=?
however, what that 'Roles' stands for??

my table looks like
subject: [jboss jaas] login-conf.xml configuration
Similar Threads
jboss form based database login using login-config
Jboss ldap
req.isUserInRole("admin"); return false??
Authorization issue while implementing login module with DatabaseServerLoginModule
JBoss and J2EE Security