Hello, I am using JBoss 3.0.4 with Tomcat 4.1.2. I am using a custom Login Module, and I am getting this exception, which prevents me from authenticating using JAAS:
Caused by: javax.ejb.EJBException: checkSecurityAssociation; CausedByException is: Authentication exception, principal=admin at org.jboss.ejb.plugins.SecurityInterceptor.checkSecurityAssociation(SecurityInterceptor.java:174) at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:94) at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:129) ... 45 more The login module checks the username/password against a DB (I have tried DatabaseServerLoginModule, but it doesn't work either). I am using the correct username and password. My Login Module extends AbstractServerLoginModule and overrides its login() and Group[] getRoleSets() methods. Here is a snippet from login(): loginOk = false; String username = "correctUsername" String password = "correctPassword; userPrincipal = new SujetSidPrincipal(username); WGGroup g = new WGGroup("Roles"); WGGroup guest = new WGGroup("guest"); g.addMember(guest); if (!subject.getPrincipals().contains(g)) { subject.getPrincipals().add(g); } if (!subject.getPrincipals().contains(guest)) { subject.getPrincipals().add(guest); } // store the username and password in the shared state map if (getUseFirstPass() == true) { sharedState.put("javax.security.auth.login.name", username); sharedState.put("javax.security.auth.login.password", password); } loginOk = true; return true; Does anything here look wrong? I am not particularly sure about those 2 if statements that add Groups to Principals...are they correct? And the overridden getRoleSets() looks like this: protected Group[] getRoleSets() throws LoginException { WGGroup rolesGroup = new WGGroup("Roles"); WGGroup guestGroup = new WGGroup("guest"); guestGroup.addMember(_userPrincipal); rolesGroup.addMember(guestGroup); rolesGroup.addMember(_userPrincipal); Group[] roles = { rolesGroup }; return roles; } Any help would be very appreciated. Thank you, Otis ________________________________________________ Get your own "800" number Voicemail, fax, email, and a lot more http://www.ureach.com/reg/tag ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user