3 Replies Latest reply on Sep 17, 2004 10:33 AM by arnold

    Principal=null on inter-server calls


      Hello all,

      I am running JBoss 3.2.4 on Java 1.4.2_05

      I have 2 instance of JBoss running (P and Q), the EJBs in both servers are secured against the same JAAS domain. For sake of discussion, assume:
      -EJB A lives on P
      -EJB B lives on Q

      My client connects to P and authenticated using the ClientLoginModule.

      Whenever A makes a call to B and B calls ctx.getCallerPrincipal(), an exception "No security context set" is thrown from B.

      Why is principal null when A managed to obtained B to invoke calls on it?

      Anyone have similar experience? Thanks.

        • 1. Re: Principal=null on inter-server calls

          The error indicates that the ejb calling getCallerPrincipal has not been assigned a security domain. You need to set this via the jboss.xml descriptor for the ejb as described in the JAAS Howto post in this forum.

          • 2. Re: Principal=null on inter-server calls

            Hello Scott,

            My beans are both assigned to the same security domain, S. This can be seen in jboss.xml


            Surely if bean A CAN access B and both beans are assigned to the same domain, then getCallerPrincipal() should return the correct Principal?

            • 3. Re: Principal=null on inter-server calls

              Hi Scott,

              Please forgive my ignorance, I believe I need to dig more into security propagation of EJBs. If I get any more problem, I will ask again!