1 Reply Latest reply on Sep 17, 2004 11:25 AM by danl_thompson

    JAAS: No Security context set in EJB during FORM based authe

    ln_abhi

      Hi
      I am using JAAS on JBOSS and i get teh following error when i try to access the getPrinicpal() method in my EJB. I am using FORM based authentication in JAAS and i am able to login succesfully and get the roles also. But when the pricipals are not being passed on to the EJB container.
      And i get the error
      Illegal State exception: No security context set.
      I read in this forum that the web and ejb domain has to be the same for the pricipals to the passed on. But when i do this i get the following error
      javax.ejb.EJBException: checkSecurityAssociation; CausedByException is:
      No method permissions assigned to method=create, interface=HOME


      I am using the DatabaseServerLoginModule in login-config.xml

      Has any one faced these problems? I am welcome to an suggestions /solutions.

      Thanks
      Abhi





        • 1. Re: JAAS: No Security context set in EJB during FORM based a
          danl_thompson

          in your ejb-jar.xml make sure the method permissions are set. I do this with xdocllet tag:
          @ejb:permissions unchecked="true" methods="*"

          which emits the following in the ejb-jar.xml

          <method-permission >
          <![CDATA[description not supported yet by ejbdoclet]]>


          <![CDATA[description not supported yet by ejbdoclet]]>
          <ejb-name>Auditable</ejb-name>
          <method-name>*</method-name>

          </method-permission>