From: Scott S. <sco...@jb...> - 2005-05-31 23:22:48
|
User: starksm Date: 05/05/31 19:22:25 Modified: src/resources/security-spec/META-INF Tag: Branch_4_0 ejb-jar.xml jboss.xml Log: Extend the run-as interaction tests Revision Changes Path No revision No revision 1.7.6.5 +161 -0 jbosstest/src/resources/security-spec/META-INF/ejb-jar.xml (In the diff below, changes in quantity of whitespace are not shown.) Index: ejb-jar.xml =================================================================== RCS file: /cvsroot/jboss/jbosstest/src/resources/security-spec/META-INF/ejb-jar.xml,v retrieving revision 1.7.6.4 retrieving revision 1.7.6.5 diff -u -b -r1.7.6.4 -r1.7.6.5 --- ejb-jar.xml 21 Feb 2005 02:23:02 -0000 1.7.6.4 +++ ejb-jar.xml 31 May 2005 23:22:25 -0000 1.7.6.5 @@ -138,6 +138,74 @@ </security-role-ref> </session> <session> + <description>A secured echo session bean that calls its CalledSessionLocalHome + ejb-local-ref link invokeEcho method to test identity propagation. + testRunAsSFSB + CallerFacadeBean-testRunAsSFSB.invokeEcho() + CallerFacadeTargetSFSB.invokeEcho() + CallerFacadeTargetCallee.echo() + </description> + <ejb-name>CallerFacadeBean-testRunAsSFSB</ejb-name> + <home>org.jboss.test.security.interfaces.CalledSessionHome</home> + <remote>org.jboss.test.security.interfaces.CalledSession</remote> + <ejb-class>org.jboss.test.security.ejb.CallerFacadeBean</ejb-class> + <session-type>Stateless</session-type> + <transaction-type>Container</transaction-type> + <ejb-local-ref> + <description></description> + <ejb-ref-name>ejb/CalledSessionLocalHome</ejb-ref-name> + <ejb-ref-type>Session</ejb-ref-type> + <local-home>org.jboss.test.security.interfaces.CalledSessionLocalHome</local-home> + <local>org.jboss.test.security.interfaces.CalledSessionLocal</local> + <ejb-link>CallerFacadeTargetSFSB</ejb-link> + </ejb-local-ref> + </session> + <session> + <description>A secured echo session bean that calls its SessionLocalHome + ejb-local-ref link invokeEcho method to test identity propagation. + </description> + <ejb-name>CallerFacadeTargetSFSB</ejb-name> + <local-home>org.jboss.test.security.interfaces.CalledSessionLocalHome</local-home> + <local>org.jboss.test.security.interfaces.CalledSessionLocal</local> + <ejb-class>org.jboss.test.security.ejb.FacadeTargetBean</ejb-class> + <session-type>Stateful</session-type> + <transaction-type>Container</transaction-type> + <ejb-local-ref> + <description></description> + <ejb-ref-name>ejb/local/StatelessSessionLocalHome</ejb-ref-name> + <ejb-ref-type>Session</ejb-ref-type> + <local-home>org.jboss.test.security.interfaces.StatelessSessionLocalHome</local-home> + <local>org.jboss.test.security.interfaces.StatelessSessionLocal</local> + <ejb-link>CallerFacadeTargetCallee</ejb-link> + </ejb-local-ref> + <security-role-ref> + <role-name>EchoCaller</role-name> + <role-link>EchoLocal</role-link> + </security-role-ref> + <security-identity> + <description>Use a role that is not assigned to any users to + access restricted server side functionallity</description> + <run-as> + <role-name>InternalRole</role-name> + </run-as> + </security-identity> + </session> + <session> + <description>A secured echo session bean that is called by CallerFacadeTarget* + </description> + <ejb-name>CallerFacadeTargetCallee</ejb-name> + <local-home>org.jboss.test.security.interfaces.StatelessSessionLocalHome</local-home> + <local>org.jboss.test.security.interfaces.StatelessSessionLocal</local> + <ejb-class>org.jboss.test.security.ejb.CalleeBean</ejb-class> + <session-type>Stateless</session-type> + <transaction-type>Container</transaction-type> + <security-role-ref> + <role-name>EchoCaller</role-name> + <role-link>EchoLocal</role-link> + </security-role-ref> + </session> + + <session> <description>A secured echo session bean that calls a StatelessSessionLocal when its invokeEcho method is called, and calls another CalledSession invokeEcho when its callEcho method is called. This uses a run-as @@ -424,6 +492,68 @@ <transaction-type>Container</transaction-type> </session> + <session> + <description>A stateless session echo bean facade</description> + <ejb-name>PublicSessionFacade</ejb-name> + <home>org.jboss.test.security.ejb.jbas1852.SessionFacadeHome</home> + <remote>org.jboss.test.security.ejb.jbas1852.SessionFacade</remote> + <ejb-class>org.jboss.test.security.ejb.jbas1852.PublicSessionFacade</ejb-class> + <session-type>Stateless</session-type> + <transaction-type>Container</transaction-type> + <ejb-ref> + <ejb-ref-name>ejb/TargetEJB</ejb-ref-name> + <ejb-ref-type>Session</ejb-ref-type> + <home>org.jboss.test.security.ejb.jbas1852.SessionHome</home> + <remote>org.jboss.test.security.ejb.jbas1852.Session</remote> + <ejb-link>PublicSession</ejb-link> + </ejb-ref> + <security-role-ref> + <role-name>EchoUser</role-name> + <role-link>Echo</role-link> + </security-role-ref> + <security-identity> + <use-caller-identity /> + </security-identity> + </session> + <session> + <description>A trival stateless session echo bean</description> + <ejb-name>PublicSession</ejb-name> + <home>org.jboss.test.security.ejb.jbas1852.SessionHome</home> + <remote>org.jboss.test.security.ejb.jbas1852.Session</remote> + <ejb-class>org.jboss.test.security.ejb.jbas1852.PublicSessionBean</ejb-class> + <session-type>Stateless</session-type> + <transaction-type>Container</transaction-type> + <ejb-ref> + <ejb-ref-name>ejb/PrivateSession</ejb-ref-name> + <ejb-ref-type>Session</ejb-ref-type> + <home>org.jboss.test.security.ejb.jbas1852.SessionHome</home> + <remote>org.jboss.test.security.ejb.jbas1852.Session</remote> + <ejb-link>PrivateSession</ejb-link> + </ejb-ref> + <security-role-ref> + <role-name>EchoUser</role-name> + <role-link>Echo</role-link> + </security-role-ref> + <security-identity> + <run-as> + <role-name>InternalUser</role-name> + </run-as> + </security-identity> + </session> + <session> + <description>A trival stateful session echo bean</description> + <ejb-name>PrivateSession</ejb-name> + <home>org.jboss.test.security.ejb.jbas1852.SessionHome</home> + <remote>org.jboss.test.security.ejb.jbas1852.Session</remote> + <ejb-class>org.jboss.test.security.ejb.jbas1852.PrivateSessionBean</ejb-class> + <session-type>Stateful</session-type> + <transaction-type>Container</transaction-type> + <security-role-ref> + <role-name>InternalUser</role-name> + <role-link>InternalUser</role-link> + </security-role-ref> + </session> + <entity> <description>A trival echo entity bean</description> <ejb-name>Entity</ejb-name> @@ -691,6 +821,10 @@ <method-name>*</method-name> </method> <method> + <ejb-name>CallerFacadeBean-testRunAsSFSB</ejb-name> + <method-name>*</method-name> + </method> + <method> <ejb-name>Level1CallerBean</ejb-name> <method-name>*</method-name> </method> @@ -755,6 +889,10 @@ <method-intf>Local</method-intf> <method-name>echo</method-name> </method> + <method> + <ejb-name>CallerFacadeTargetSFSB</ejb-name> + <method-name>*</method-name> + </method> </method-permission> <!-- The methods the InternalRole role can access --> @@ -782,6 +920,10 @@ <ejb-name>Level3CalleeBean</ejb-name> <method-name>*</method-name> </method> + <method> + <ejb-name>CallerFacadeTargetCallee</ejb-name> + <method-name>*</method-name> + </method> </method-permission> <method-permission> @@ -846,6 +988,25 @@ </method> </method-permission> + <method-permission> + <role-name>Echo</role-name> + <method> + <ejb-name>PublicSession</ejb-name> + <method-name>*</method-name> + </method> + <method> + <ejb-name>PublicSessionFacade</ejb-name> + <method-name>*</method-name> + </method> + </method-permission> + <method-permission> + <role-name>InternalUser</role-name> + <method> + <ejb-name>PrivateSession</ejb-name> + <method-name>*</method-name> + </method> + </method-permission> + <!-- No one can access the excluded() method of the StatelessSession and StatelessSession2 beans --> <exclude-list> 1.11.6.6 +21 -0 jbosstest/src/resources/security-spec/META-INF/jboss.xml (In the diff below, changes in quantity of whitespace are not shown.) Index: jboss.xml =================================================================== RCS file: /cvsroot/jboss/jbosstest/src/resources/security-spec/META-INF/jboss.xml,v retrieving revision 1.11.6.5 retrieving revision 1.11.6.6 diff -u -b -r1.11.6.5 -r1.11.6.6 --- jboss.xml 21 Feb 2005 02:23:02 -0000 1.11.6.5 +++ jboss.xml 31 May 2005 23:22:25 -0000 1.11.6.6 @@ -57,6 +57,14 @@ <jndi-name>spec.CallerBean</jndi-name> </session> <session> + <ejb-name>CallerFacadeBean-testRunAsSFSB</ejb-name> + <jndi-name>spec.CallerFacadeBean-testRunAsSFSB</jndi-name> + </session> + <session> + <ejb-name>CallerFacadeTargetSFSB</ejb-name> + <jndi-name>spec.CallerFacadeTargetSFSB</jndi-name> + </session> + <session> <ejb-name>Level1CallerBean</ejb-name> <jndi-name>spec.Level1CallerBean</jndi-name> </session> @@ -129,6 +137,19 @@ <configuration-name>Domain2 Stateless SessionBean</configuration-name> </session> + <session> + <ejb-name>PublicSessionFacade</ejb-name> + <jndi-name>spec.PublicSessionFacade</jndi-name> + </session> + <session> + <ejb-name>PublicSession</ejb-name> + <jndi-name>spec.PublicSession</jndi-name> + </session> + <session> + <ejb-name>PrivateSession</ejb-name> + <jndi-name>spec.PrivateSession</jndi-name> + </session> + <message-driven> <ejb-name>RunAsMDB</ejb-name> <destination-jndi-name>queue/A</destination-jndi-name> |