3 Replies Latest reply on Aug 25, 2006 1:51 PM by leogomes

    run-as-principal TAG

    rarondini

      Hi,

      I would like to know if run-as-principal tag in jboss.xml work in Jboss 3.2.7.

      I'am try to use configuration below in JBoss 3.2.7 but it doesn't work. The method ctx.getCallerPrincipal() return "nobody".

      In jboss.xml

       <session>
       ...
       <security-identity>
       <run-as-principal>master</run-as-principal>
       </security-identity>
       ...
       </session>
      


      In ejb-jar.xml
       <session>
       ...
       <security-identity>
       <run-as>
       <role-name>master</role-name>
       </run-as>
       </security-identity>
       ...
       </session>
      


      The Session Bean is called by an Message Driven Bean.

        • 1. Re: run-as-principal TAG
          j2ee_junkie

          Rogerio,

          I may be way off, but it is worth a try to help. If you want your Message Driven bean to have a run-as identity when accessing your session bean, then you need to put the run-as element in your message bean configuration (in ejb-jar.xml). You have shown it in your session bean config. Because you did not assign the run-as role to your message driven bean, the run-as-principal (in jboss.xml) does not get set.

          later, cgriffith

          • 2. Re: run-as-principal TAG
            rarondini

            Hi,

            I made this change, puting run-as in message driven. It did not work.
            I made the same test in Jboss 4.0.3 and also it did not work.

            So, let me say a little observation...
            The message driven is not authenticated. It's is a batch process that receive message from an external system.

            thanks for help me.
            Rogerio

            • 3. Re: run-as-principal TAG
              leogomes

              Hi Rogerio,

              Did you ever get that working? Do you know if <use-caller-identity> would be a possible solution to the problem? In my case, I'm consuming messages generated by my own application (not an external one).

              Thanks
              Leo