0 Replies Latest reply on Dec 9, 2002 3:12 PM by mirza_mohsin_beg

    Caller Principal when calling EJB from MDB

    mirza_mohsin_beg

      Hi,

      I am using the <security-domain> and <security-proxy> features on jboss3.0.4 and it work well when looking up EJB's from client applications or other EJB's.

      However when I do a lookup for EJB's (that are registered under a 'simple' security-domain in jboss.xml) from an MDB I only get 'guest' as the Caller Principal in my EJB.

      No matter whether I do Jaas login or not, use any other domain (eg client-login in the call belwo) I still get 'guest' set as the Caller Principal. Can anyone please provide pointers/help ?

      I have looked at the thread below, but that does not talk about MDB's.

      http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t=forums/ :-
      PasswordCallbackHandler aCallbackHandler = new PasswordCallbackHandler("foo", "foo");
      LoginContext lc = new LoginContext("simple", aCallbackHandler);
      lc.login();
      Context myctx = new InitialContext();


      $JBOSS/server/default/conf/auth.conf
      simple {
      org.jboss.security.auth.spi.SimpleServerLoginModule required;
      };
      client-login {
      org.jboss.security.ClientLoginModule required;
      };