<?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC
      "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
      "http://java.sun.com/dtd/ejb-jar_2_0.dtd">

<ejb-jar>
   <display-name>JaasUnitTestCase Tests</display-name>
   <enterprise-beans>
      <session>
         <description>A secured project repository stateful session bean</description>
         <ejb-name>CustomPrincipal</ejb-name>
         <home>org.jboss.test.security.interfaces.CustomPrincipalHome</home>
         <remote>org.jboss.test.security.interfaces.CustomPrincipal</remote>
         <ejb-class>org.jboss.test.security.ejb.CustomPrincipalBean</ejb-class>
         <session-type>Stateless</session-type>
         <transaction-type>Container</transaction-type>
      </session>

      <session>
         <description>A secured project repository stateful session bean</description>
         <ejb-name>CustomPrincipal2</ejb-name>
         <home>org.jboss.test.security.interfaces.CustomPrincipalHome</home>
         <remote>org.jboss.test.security.interfaces.CustomPrincipal</remote>
         <ejb-class>org.jboss.test.security.ejb.CustomPrincipalBean</ejb-class>
         <session-type>Stateless</session-type>
         <transaction-type>Container</transaction-type>
      </session>

      <session>
         <description>A secured project repository stateful session bean</description>
         <ejb-name>CustomPrincipalPropagation</ejb-name>
         <home>org.jboss.test.security.interfaces.CustomPrincipalHome</home>
         <remote>org.jboss.test.security.interfaces.CustomPrincipal</remote>
         <ejb-class>org.jboss.test.security.ejb.CustomPrincipalBean</ejb-class>
         <session-type>Stateless</session-type>
         <transaction-type>Container</transaction-type>
      </session>
   </enterprise-beans>

   <assembly-descriptor>
      <security-role>
         <description>The role required to invoke the echo method</description>
         <role-name>Echo</role-name>
      </security-role>

      <!-- The methods the Echo role can access -->
      <method-permission>
         <role-name>Echo</role-name>

         <method>
            <ejb-name>CustomPrincipal</ejb-name>
            <method-name>*</method-name>
         </method>
         <method>
            <ejb-name>CustomPrincipal2</ejb-name>
            <method-name>*</method-name>
         </method>
         <method>
            <ejb-name>CustomPrincipalPropagation</ejb-name>
            <method-name>*</method-name>
         </method>
      </method-permission>
   </assembly-descriptor>

</ejb-jar>
