[jboss-user] [Security & JAAS/JBoss] - problem with login module
jerzykaczorek
do-not-reply at jboss.com
Mon Nov 20 11:26:57 EST 2006
hi,
I want to secure my webapp by setting security the domain in login-config.xml file. Unfortunetly I can't login.
I hold my properties files in server/default/conf They are named:
contracts-users.properties and contracts-roles.properties
<application-policy name = "JKIdentityDB">
| <authentication>
| <login-module code="org.jboss.security.auth.spi.UserRolesLoginModule" flag="required">
| <module-option name="usersProperties">contracts-users.properties</module-option>
| <module-option name="rolesProperties">contracts-roles.properties</module-option>
| </login-module>
| </authentication>
| </application-policy>
|
from log:
org.jboss.security.auth.spi.UserRolesLoginModule
ControlFlag: LoginModuleControlFlag: required
Options:name=rolesProperties, value=contracts-roles.properties
name=usersProperties, value=contracts-users.properties
2006-11-20 16:49:42,531 DEBUG [org.apache.catalina.loader.WebappClassLoader] loadClass(org.jboss.security.auth.spi.UserRolesLoginModule, false)
2006-11-20 16:49:42,531 DEBUG [org.apache.catalina.loader.WebappClassLoader] Searching local repositories
2006-11-20 16:49:42,531 DEBUG [org.apache.catalina.loader.WebappClassLoader] findClass(org.jboss.security.auth.spi.UserRolesLoginModule)
2006-11-20 16:49:42,531 DEBUG [org.apache.catalina.loader.WebappClassLoader] Delegating to parent classloader at end: java.net.FactoryURLClassLoader at 19dbc5c
2006-11-20 16:49:42,531 DEBUG [org.apache.catalina.loader.WebappClassLoader] loadClass(org.jboss.security.auth.spi.UserRolesLoginModule, false)
2006-11-20 16:49:42,531 DEBUG [org.apache.catalina.loader.WebappClassLoader] Searching local repositories
2006-11-20 16:49:42,531 DEBUG [org.apache.catalina.loader.WebappClassLoader] findClass(org.jboss.security.auth.spi.UserRolesLoginModule)
2006-11-20 16:49:42,531 DEBUG [org.apache.catalina.loader.WebappClassLoader] Delegating to parent classloader at end: java.net.FactoryURLClassLoader at 19dbc5c
2006-11-20 16:49:42,531 TRACE [org.jboss.security.plugins.JaasSecurityManager.JKIdentityDB] Login failure
javax.security.auth.login.LoginException: unable to find LoginModule class: org.jboss.security.auth.spi.UserRolesLoginModule
at javax.security.auth.login.LoginContext.invoke(LoginContext.java:808)
at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
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:680)
at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
at org.jboss.security.plugins.JaasSecurityManager.defaultLogin(JaasSecurityManager.java:601)
at org.jboss.security.plugins.JaasSecurityManager.authenticate(JaasSecurityManager.java:535)
at org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityManager.java:344)
at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.authenticate(JBossSecurityMgrRealm.java:491)
at org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:180)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
2006-11-20 16:49:42,531 TRACE [org.jboss.security.plugins.JaasSecurityManager.JKIdentityDB] End isValid, false
it's interesting, that when I use application-policy other in jboss-web.xml
<security-domain>java:/jaas/other</security-domain>
(and my properties files ara named users.properties and roles.properties) everything is ok.
I found a lot of similiar problems on this forum but i can't resolve it alone
Can anybody help me?
please
jerzy
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3987336#3987336
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3987336
More information about the jboss-user
mailing list