1 Reply Latest reply on Aug 14, 2013 1:54 AM by jaikiran pai

    Migration Jboss7 JAAS configuration

    Administrator Administrator Novice

      Hello,
      I'm having trouble setting up a login configuration using the "PropertiesUsers" login module in JBoss 7.1 Final. I have created 1  "
      users-awf.properties" and 1 "roles-awf.properties" as below.

      users-awf.properties:

      admin=pwd

      roles-awf.properties:

      admin=ADMIN

       

       

      Then modified "standalone.xml" by adding:

       

                  <security-domain name="awf">
                      <authentication>
                          <login-module code="UsersRoles" flag="required">
                              <module-option name="usersProperties" value="${jboss.server.config.dir}/users-awf.properties"/>
                              <module-option name="rolesProperties" value="${jboss.server.config.dir}/roles-awf.properties"/>
                          </login-module>
                      </authentication>
                  </security-domain>

       

      And then created my jboss-app.xml:

       

      <?xml version="1.0" encoding="UTF-8"?>

      <!DOCTYPE jboss-app PUBLIC "-//JBoss//DTD Java EE Application 5.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-app_5_0.dtd">

      <jboss-app>

          <security-domain>awf</security-domain>

          <loader-repository>com.tt.airman:framework=framework.ear

          </loader-repository>

      </jboss-app>

       

      But it doesn't work. Maybe I have missed something in the configuration, but I have run out of ideas and hope that someone can help me.

       

      Error:

       

      22:36:32,170 ERROR [org.jboss.security.authentication.JBossCachedAuthenticationManager] (http-127.0.0.1-127.0.0.1-8080-1) Login failure: javax.security.auth.login.FailedLoginExcept

      ion: Password Incorrect/Password Required

              at org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:270) [picketbox-4.0.7.Final.jar:4.0.7.Final]

              at org.jboss.security.auth.spi.UsersRolesLoginModule.login(UsersRolesLoginModule.java:155) [picketbox-4.0.7.Final.jar:4.0.7.Final]

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_30]

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_30]

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_30]

              at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_30]

              at javax.security.auth.login.LoginContext.invoke(LoginContext.java:769) [rt.jar:1.6.0_30]

              at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186) [rt.jar:1.6.0_30]

              at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683) [rt.jar:1.6.0_30]

              at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.6.0_30]

              at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680) [rt.jar:1.6.0_30]

              at javax.security.auth.login.LoginContext.login(LoginContext.java:579) [rt.jar:1.6.0_30]

              at org.jboss.security.authentication.JBossCachedAuthenticationManager.defaultLogin(JBossCachedAuthenticationManager.java:449) [picketbox-infinispan-4.0.7.Final.jar:4.0.7.Fi

      nal]

              at org.jboss.security.authentication.JBossCachedAuthenticationManager.proceedWithJaasLogin(JBossCachedAuthenticationManager.java:383) [picketbox-infinispan-4.0.7.Final.jar:

      4.0.7.Final]

              at org.jboss.security.authentication.JBossCachedAuthenticationManager.authenticate(JBossCachedAuthenticationManager.java:371) [picketbox-infinispan-4.0.7.Final.jar:4.0.7.Fi

      nal]

              at org.jboss.security.authentication.JBossCachedAuthenticationManager.isValid(JBossCachedAuthenticationManager.java:160) [picketbox-infinispan-4.0.7.Final.jar:4.0.7.Final]

              at org.jboss.as.web.security.JBossWebRealm.authenticate(JBossWebRealm.java:214) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

              at org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:180) [jbossweb-7.0.13.Final.jar:]

              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:455) [jbossweb-7.0.13.Final.jar:]

              at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]

              at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]

              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]

              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]

              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]

              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]

              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]

              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]

              at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_30]