aspose file tools*
The moose likes JBoss/WildFly and the fly likes authentication problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "authentication problem" Watch "authentication problem" New topic
Author

authentication problem

Dima Shenkelbakh
Greenhorn

Joined: Mar 27, 2009
Posts: 3
Hi guys,

I'm having some issues with JAAS authenticatin on jboss. We are still working for jboss-4.01.sp1 and I'm trying to deploy two application that would share user information through HttServletRequest's getRemoteUser() method. So I'm setting up a Realm across all apps deployed in our jboss. I created a sample web project to test authentication as a prerequisite, but it's not hitting the database. Here are the relevant files:

web.xml



login-config.xml


server.xml

the databse is not getting hit and i know this from looking at the mysql query log. what did i miss?

thanks guys.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5836
    
    7

Try adding the following to WEB-INF/jboss-web.xml:



JBoss In Action
Dima Shenkelbakh
Greenhorn

Joined: Mar 27, 2009
Posts: 3
Hi,

I did make a jboss-web.xml with the same data. It didn't work. Database still wasn't being hit, the logs confirmed that. Any other ideas?
Dima Shenkelbakh
Greenhorn

Joined: Mar 27, 2009
Posts: 3
i made some progress...now i get a different error message:

15:57:02,280 WARN [JAASRealm] Cannot find message associated with key jaasRealm
.loginException
javax.security.auth.login.LoginException: Security Exception
at javax.security.auth.login.LoginContext.invoke(LoginContext.java:856)
at javax.security.auth.login.LoginContext.access$000(LoginContext.java:1
86)
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:6
80)
at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
at org.apache.catalina.realm.JAASRealm.authenticate(JAASRealm.java:398)
at org.apache.catalina.realm.JAASRealm.authenticate(JAASRealm.java:322)
at org.apache.catalina.authenticator.FormAuthenticator.authenticate(Form
Authenticator.java:258)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
torBase.java:417)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
e.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.proce
ss(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invok
e(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:127)


any ideas of what can be causing this? this is the same config as above, including jboss-web.xml in WEB-INF, but now in jboss-5.0.1. thanks.
Mauricio Rocha
Greenhorn

Joined: Apr 23, 2008
Posts: 2
Hi, I'm getting the same error here... Did you find out how to make DatabaseServerLoginModule work? It's not even hitting the db...
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5836
    
    7

Maurico, it would have been better if you started a new topic. It also helps if you provide the details.. Post the login module from login-config.xml, the *-ds.xml file for the database, the jboss-web.xml file and sections of the web.xml file that deal with access control.

Don't forget the use the 'code' tags when posting the source code, especially the XML text. Select the text and click the Code button above the text editor window.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: authentication problem