0 Replies Latest reply on Mar 5, 2003 2:05 AM by jbossst

    run-as doesn't work !

    jbossst

      Hi,

      I'm using JBoss 3.0.4.
      But, the "run-as" tag (in ejb-jar.xml) doesn't work.


      <ejb-name>CommandDispatcher</ejb-name>
      ...
      ...
      <ejb-class>...</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Container</transaction-type>
      <security-role-ref>
      <role-name>Admin</role-name>
      <role-link>Admin</role-link>
      </security-role-ref>
      <security-role-ref>
      <role-name>User</role-name>
      <role-link>User</role-link>
      </security-role-ref>
      <security-identity>
      <run-as>
      <role-name>Admin</role-name>
      </run-as>
      </security-identity>


      This session bean access a lot of BMP.
      I use a simple user login name and password like "guest" linked to the "User" role.

      In the BMP, the call of Context.isCallerInRole("Admin") returns false !!!
      And the call of Context.isCallerInRole("User") returns true.

      Normaly, I thing the two calls must return true !!

      Thanks for your help.