4 Replies Latest reply on Jan 11, 2005 6:51 PM by jhag

    Upgraded from 3.2.5 to 3.2.6 and login now fails

    scotttam

      When I upgraded the server from 3.2.5 to 3.2.6 and tried to login to our website I go the following exception and authentication failed. We use a DatabaseServerLoginModule with our own realm that has been working fine up until now, which make it confusing why it would be looking for password and role files. Any ideas would be greatly appreciated.

      21:03:23,947 ERROR [UsersRolesLoginModule] Failed to load users/passwords/role files

      java.io.IOException: Properties file users.properties not found

      at org.jboss.security.auth.spi.UsersRolesLoginModule.loadProperties(UsersRolesLoginModule.java:217)

      at org.jboss.security.auth.spi.UsersRolesLoginModule.loadUsers(UsersRolesLoginModule.java:234)

      at org.jboss.security.auth.spi.UsersRolesLoginModule.initialize(UsersRolesLoginModule.java:100)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      at java.lang.reflect.Method.invoke(Method.java:324)

      at javax.security.auth.login.LoginContext.invoke(LoginContext.java:662)

      at javax.security.auth.login.LoginContext.access$000(LoginContext.java:129)

      at javax.security.auth.login.LoginContext$4.run(LoginContext.java:610)

      at java.security.AccessController.doPrivileged(Native Method)

      at javax.security.auth.login.LoginContext.invokeModule(LoginContext.java:607)

      at javax.security.auth.login.LoginContext.login(LoginContext.java:534)

      at org.apache.catalina.realm.JAASRealm.authenticate(JAASRealm.java:316)

      at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:235)

      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:446)

      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)

      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)

      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)

      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)

      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)

      at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)

      at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300)

      at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374)

      at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743)

      at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675)

      at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)

      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)

      at java.lang.Thread.run(Thread.java:534)

      21:03:23,947 WARN [JAASRealm] Login exception authenticating username sjt-admin

      javax.security.auth.login.LoginException: Missing users.properties file.

      at org.jboss.security.auth.spi.UsersRolesLoginModule.login(UsersRolesLoginModule.java:120)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      at java.lang.reflect.Method.invoke(Method.java:324)

      at javax.security.auth.login.LoginContext.invoke(LoginContext.java:675)

      at javax.security.auth.login.LoginContext.access$000(LoginContext.java:129)

      at javax.security.auth.login.LoginContext$4.run(LoginContext.java:610)

      at java.security.AccessController.doPrivileged(Native Method)

      at javax.security.auth.login.LoginContext.invokeModule(LoginContext.java:607)

      at javax.security.auth.login.LoginContext.login(LoginContext.java:534)

      at org.apache.catalina.realm.JAASRealm.authenticate(JAASRealm.java:316)

      at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:235)

      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:446)

      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)

      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)

      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)

      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)

      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)

      at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)

      at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300)

      at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374)

      at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743)

      at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675)

      at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)

      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)

      at java.lang.Thread.run(Thread.java:534)


        • 1. Re: Upgraded from 3.2.5 to 3.2.6 and login now fails
          starksm64

          We don't test with the tomcat realms so I can't give you much feedback as to what change would cause this. Clearly the login module configuration name is not mapping to one the includes the DatabaseServerLoginModule, so its probably just default to the 'other' configuration which does use the UsersRolesLoginModule.

          • 2. Re: Upgraded from 3.2.5 to 3.2.6 and login now fails
            scotttam

            Hi Scott,

            Thanks for getting back to me so quickly. Yes, that does seem to be the case. If I comment out the other application-policy in the login-config.xml file I get a no login modules configured for jboss.web exception so it is finding the other (default) realm when it should be finding my realm.

            Any insight as to how I might find out what's going wrong would be very welcomed.

            Thanks!

            Scott

            • 3. Re: Upgraded from 3.2.5 to 3.2.6 and login now fails
              scotttam

              I figured out what the problem was. When we moved in the new 3.2.6, we took an old server.xml file which had all of our changes in it. Therefore, we were missing the following change:

               <!-- The JAAS based authentication and authorization realm implementation
               - certificatePrincipal : the class name of the
               org.jboss.security.auth.certs.CertificatePrincipal impl
               used for mapping X509[] cert chains to a Princpal.
               -->
               <Realm className="org.jboss.web.tomcat.security.JBossSecurityMgrRealm"
               certificatePrincipal="org.jboss.security.auth.certs.SubjectDNMapping"
               />
              

              After I added that back, the realms worked properly.

              Thanks for pointing me in the right direction.

              Scott

              • 4. Re: Upgraded from 3.2.5 to 3.2.6 and login now fails
                jhag

                Did you find the fix for this, I have the same issue. Thanks