0 Replies Latest reply on Jun 21, 2010 1:22 PM by srividhyak

    IllegalStateException: AuthorizationModule has not been instantiated

    srividhyak

      Hi all,

       

      I have implemented a custom authorization policy-module by extending the AbstractAuthorizationModule.

       

      The configuration in *-jboss-beans.xml is this

       

      <application-policy xmlns="urn:jboss:security-beans:1.0" name="SGFAuthRealm">
      <authentication>
                        <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
                             flag = "required">  
                             <module-option name="usersProperties">props/esb-users.properties</module-option>
                             <module-option name="rolesProperties">props/esb-roles.properties</module-option>
                        </login-module>
                   </authentication>
      <authorization>
      <policy-module code="com.example.CustomAuthModule" flag="required"/>
       
      </authorization>
      </application-policy>
      

       

       

      But when a request is sent to the esb end-point, I get the following exception.

       

      java.lang.IllegalStateException: AuthorizationModule has not been instantiated

           at org.jboss.security.plugins.authorization.JBossAuthorizationContext.instantiateModule(JBossAuthorizationContext.java:316)

           at org.jboss.security.plugins.authorization.JBossAuthorizationContext.initializeModules(JBossAuthorizationContext.java:199)

       

      This custom class is available in the .esb archive.  Can someone please suggest how this can be fixed ?

       

      Thanks,

      Srividhya