1 Reply Latest reply on Jan 2, 2004 4:10 AM by fs_cos


    glum Newbie

      Does anybody have working example of RunAsLoginModule configuration? I have written custom login module which access an EJB. When the EJBs are unsecured, my login module works as expected. But when I try to secure EJB and set up login module to run with trusted security role, I get the following error:

      09:37:30,908 ERROR [LogInterceptor] EJBException, causedBy:
      java.lang.SecurityException: Authentication exception, principal=null

      This is my login-config.xml:

      <application-policy name="MyAppRealm">

      <login-module code = "org.jboss.security.auth.spi.RunAsLoginModule"
      flag = "required">
      <module-option name="roleName">trustedRole</module-option>
      <login-module code = "cz.mycomp.myapp.jboss.MyAppLoginModule"
      flag = "required">


      Thanks in advance for any help.
      - Glum