From: Anil S. <ani...@jb...> - 2006-07-07 16:47:12
|
User: asaldhana Date: 06/07/07 12:47:07 Added: src/resources/security/authorization/xacml-ejb/META-INF ejb-jar.xml jboss-xacml-policy.xml jboss.xml Log: JBAS-2673: Resources for the test for xacml integration with ejb JBAS-3374: Authorization Framework integration with ejb layer test resources Revision Changes Path 1.1 date: 2006/07/07 16:47:07; author: asaldhana; state: Exp;jbosstest/src/resources/security/authorization/xacml-ejb/META-INF/ejb-jar.xml Index: ejb-jar.xml =================================================================== <?xml version="1.0" encoding="UTF-8"?> <ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd" version="2.1"> <enterprise-beans> <session> <description>A secured stateless session bean</description> <ejb-name>StatelessSession</ejb-name> <home>org.jboss.test.security.interfaces.StatelessSessionHome</home> <remote>org.jboss.test.security.interfaces.StatelessSession</remote> <ejb-class>org.jboss.test.security.ejb.StatelessSessionBean4</ejb-class> <session-type>Stateless</session-type> <transaction-type>Container</transaction-type> </session> </enterprise-beans> <assembly-descriptor> <security-role> <role-name>CallerInfoFacadeRole</role-name> </security-role> <security-role> <role-name>CallerInfoStatelessRole</role-name> </security-role> <security-role> <role-name>CallerInfoStatefulRole</role-name> </security-role> <security-role> <role-name>CallerInfoEntityRole</role-name> </security-role> <method-permission> <role-name>CallerInfoStatelessRole</role-name> <method> <ejb-name>StatelessSession</ejb-name> <method-name>*</method-name> </method> </method-permission> </assembly-descriptor> </ejb-jar> 1.1 date: 2006/07/07 16:47:07; author: asaldhana; state: Exp;jbosstest/src/resources/security/authorization/xacml-ejb/META-INF/jboss-xacml-policy.xml Index: jboss-xacml-policy.xml =================================================================== <?xml version="1.0" encoding="UTF-8"?> <Policy xmlns="urn:oasis:names:tc:xacml:2.0:policy:schema:os" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:oasis:names:tc:xacml:2.0:policy:schema:os access_control-xacml-2.0-policy-schema-os.xsd" PolicyId="urn:oasis:names:tc:xacml:2.0:jboss-test:XV:policy" RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:deny-overrides"> <Description> Policy for Subject RBAC</Description> <Target/> <Rule RuleId="urn:oasis:names:tc:xacml:2.0:jboss-test:XVI:rule" Effect="Permit"> <Description> scott can create,remove and invoke echo method of StatelessSession EJB when he has a role of ProjectUser </Description> <Target> <Subjects> <Subject> <SubjectMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal"> <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">scott</AttributeValue> <SubjectAttributeDesignator AttributeId="urn:oasis:names:tc:xacml:1.0:subject:subject-id" DataType="http://www.w3.org/2001/XMLSchema#string"/> </SubjectMatch> <SubjectMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal"> <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">ProjectUser</AttributeValue> <SubjectAttributeDesignator AttributeId="urn:oasis:names:tc:xacml:2.0:example:attribute:role" DataType="http://www.w3.org/2001/XMLSchema#string"/> </SubjectMatch> </Subject> </Subjects> <Resources> <Resource> <ResourceMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal"> <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">StatelessSession</AttributeValue> <ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string"/> </ResourceMatch> </Resource> </Resources> <Actions> <Action> <ActionMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal"> <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">create</AttributeValue> <ActionAttributeDesignator AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" DataType="http://www.w3.org/2001/XMLSchema#string"/> </ActionMatch> </Action> <Action> <ActionMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal"> <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">remove</AttributeValue> <ActionAttributeDesignator AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" DataType="http://www.w3.org/2001/XMLSchema#string"/> </ActionMatch> </Action> <Action> <ActionMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal"> <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">echo</AttributeValue> <ActionAttributeDesignator AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" DataType="http://www.w3.org/2001/XMLSchema#string"/> </ActionMatch> </Action> </Actions> </Target> </Rule> </Policy> 1.1 date: 2006/07/07 16:47:07; author: asaldhana; state: Exp;jbosstest/src/resources/security/authorization/xacml-ejb/META-INF/jboss.xml Index: jboss.xml =================================================================== <?xml version="1.0"?> <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 4.0//EN" "http://www.jboss.org/j2ee/dtd/jboss_4_0.dtd"> <jboss> <security-domain>java:/jaas/xacml-test</security-domain> <enterprise-beans> <session> <ejb-name>StatelessSession</ejb-name> <jndi-name>spec.StatelessSession</jndi-name> <configuration-name>Standard Stateless SessionBean With SecurityAuthorizationInterceptor</configuration-name> </session> </enterprise-beans> <container-configurations> <container-configuration> <container-name>Standard Stateless SessionBean With SecurityAuthorizationInterceptor</container-name> <call-logging>false</call-logging> <invoker-proxy-binding-name>stateless-unified-invoker</invoker-proxy-binding-name> <container-interceptors> <interceptor>org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor</interceptor> <interceptor>org.jboss.ejb.plugins.LogInterceptor</interceptor> <interceptor>org.jboss.ejb.plugins.JaasAuthenticationInterceptor</interceptor> <interceptor>org.jboss.ejb.plugins.SecurityAuthorizationInterceptor</interceptor> <!-- CMT --> <interceptor transaction="Container">org.jboss.ejb.plugins.TxInterceptorCMT</interceptor> <interceptor transaction="Container">org.jboss.ejb.plugins.CallValidationInterceptor</interceptor> <interceptor transaction="Container" metricsEnabled="true">org.jboss.ejb.plugins.MetricsInterceptor</interceptor> <interceptor transaction="Container">org.jboss.ws.server.ServiceEndpointInterceptor</interceptor> <interceptor transaction="Container">org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor</interceptor> <!-- BMT --> <interceptor transaction="Bean">org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor</interceptor> <interceptor transaction="Bean">org.jboss.ejb.plugins.TxInterceptorBMT</interceptor> <interceptor transaction="Bean">org.jboss.ejb.plugins.CallValidationInterceptor</interceptor> <interceptor transaction="Bean" metricsEnabled="true">org.jboss.ejb.plugins.MetricsInterceptor</interceptor> <interceptor transaction="Bean">org.jboss.ws.server.ServiceEndpointInterceptor</interceptor> <interceptor>org.jboss.resource.connectionmanager.CachedConnectionInterceptor</interceptor> </container-interceptors> <instance-pool>org.jboss.ejb.plugins.StatelessSessionInstancePool</instance-pool> <instance-cache></instance-cache> <persistence-manager></persistence-manager> <container-pool-conf> <MaximumSize>100</MaximumSize> </container-pool-conf> </container-configuration> </container-configurations> </jboss> |