[jboss-cvs] JBossAS SVN: r86077 - in trunk: security and 8 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Mar 18 17:52:30 EDT 2009
Author: anil.saldhana at jboss.com
Date: 2009-03-18 17:52:30 -0400 (Wed, 18 Mar 2009)
New Revision: 86077
Added:
trunk/security/src/main/org/jboss/security/deployers/
trunk/security/src/main/org/jboss/security/deployers/AclConfigParsingDeployer.java
trunk/security/src/main/org/jboss/security/deployers/JAXBElementParsingDeployer.java
trunk/security/src/main/org/jboss/security/deployers/XacmlConfigParsingDeployer.java
trunk/server/src/main/org/jboss/web/deployers/SecurityActions.java
trunk/testsuite/src/resources/security/authorization/xacml-ejb/META-INF/jbossxacml-config.xml
trunk/testsuite/src/resources/web/xacml/requestAttrib/WEB-INF/jbossxacml-config.xml
Modified:
trunk/component-matrix/pom.xml
trunk/security/.classpath
trunk/security/pom.xml
trunk/server/src/etc/deployers/security-deployer-jboss-beans.xml
trunk/server/src/main/org/jboss/deployment/security/AbstractSecurityDeployer.java
trunk/server/src/main/org/jboss/deployment/security/EjbPolicyConfigurationFacade.java
trunk/server/src/main/org/jboss/web/deployers/WarSecurityDeployer.java
trunk/testsuite/imports/sections/security.xml
trunk/testsuite/imports/sections/web.xml
Log:
JBAS-6425: xacml/acl deployers added to remove the usage of vfs in AbstractSecurityDeployer
Modified: trunk/component-matrix/pom.xml
===================================================================
--- trunk/component-matrix/pom.xml 2009-03-18 21:48:07 UTC (rev 86076)
+++ trunk/component-matrix/pom.xml 2009-03-18 21:52:30 UTC (rev 86077)
@@ -81,7 +81,7 @@
<version.org.jboss.naming>5.0.1.GA</version.org.jboss.naming>
<version.org.jboss.reflect>2.0.2.GA</version.org.jboss.reflect>
<version.org.jboss.remoting>2.5.0.SP2</version.org.jboss.remoting>
- <version.org.jboss.security>2.0.2.SP7</version.org.jboss.security>
+ <version.org.jboss.security>2.1.0.20090318</version.org.jboss.security>
<version.org.jboss.threads>1.0.0.CR1</version.org.jboss.threads>
<version.org.jboss.vfs>2.1.0.GA</version.org.jboss.vfs>
<version.org.jboss.xnio.metadata>1.0.0.CR1</version.org.jboss.xnio.metadata>
@@ -2054,7 +2054,7 @@
<dependency>
<groupId>org.jboss.security</groupId>
<artifactId>jbossxacml</artifactId>
- <version>2.0.3.CR1</version>
+ <version>2.0.3.CR2</version>
<exclusions>
<exclusion>
<groupId>sun-jaf</groupId>
Modified: trunk/security/.classpath
===================================================================
--- trunk/security/.classpath 2009-03-18 21:48:07 UTC (rev 86076)
+++ trunk/security/.classpath 2009-03-18 21:52:30 UTC (rev 86077)
@@ -13,5 +13,6 @@
<classpathentry kind="lib" path="/thirdparty/jboss/common-logging-spi/lib/jboss-logging-spi.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss/common-core/lib/jboss-common-core.jar" sourcepath="/thirdparty/jboss/common-core/lib/jboss-common-core-sources.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-kernel.jar" sourcepath="/thirdparty/jboss/microcontainer/lib/jboss-kernel-sources.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/jboss/security/lib/jbossxacml.jar" sourcepath="/thirdparty/jboss/security/lib/jbossxacml-sources.jar"/>
<classpathentry kind="output" path="output/eclipse-classes"/>
</classpath>
Modified: trunk/security/pom.xml
===================================================================
--- trunk/security/pom.xml 2009-03-18 21:48:07 UTC (rev 86076)
+++ trunk/security/pom.xml 2009-03-18 21:52:30 UTC (rev 86077)
@@ -151,6 +151,11 @@
<groupId>org.jboss.security</groupId>
<artifactId>jbosssx-client</artifactId>
</dependency>
+
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jbossxacml</artifactId>
+ </dependency>
<dependency>
<groupId>junit</groupId>
Added: trunk/security/src/main/org/jboss/security/deployers/AclConfigParsingDeployer.java
===================================================================
--- trunk/security/src/main/org/jboss/security/deployers/AclConfigParsingDeployer.java (rev 0)
+++ trunk/security/src/main/org/jboss/security/deployers/AclConfigParsingDeployer.java 2009-03-18 21:52:30 UTC (rev 86077)
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.security.deployers;
+
+import org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer;
+import org.jboss.security.acl.config.ACLConfiguration;
+import org.jboss.security.acl.config.ACLConfigurationFactory;
+import org.jboss.virtual.VirtualFile;
+
+/**
+ * Parsing Deployer for ACL jboss-acl-policy.xml that
+ * can be present in EJB/Web Deployments
+ * @author Anil.Saldhana at redhat.com
+ * @since Mar 18, 2009
+ */
+public class AclConfigParsingDeployer extends SchemaResolverDeployer<ACLConfiguration>
+{
+ public AclConfigParsingDeployer()
+ {
+ super(ACLConfiguration.class);
+ setName("jboss-acl-policy.xml");
+ }
+
+ @Override
+ protected ACLConfiguration parse(VirtualFile file) throws Exception
+ {
+ return ACLConfigurationFactory.getConfiguration(file.openStream());
+ }
+}
\ No newline at end of file
Added: trunk/security/src/main/org/jboss/security/deployers/JAXBElementParsingDeployer.java
===================================================================
--- trunk/security/src/main/org/jboss/security/deployers/JAXBElementParsingDeployer.java (rev 0)
+++ trunk/security/src/main/org/jboss/security/deployers/JAXBElementParsingDeployer.java 2009-03-18 21:52:30 UTC (rev 86077)
@@ -0,0 +1,110 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.security.deployers;
+
+import java.io.InputStream;
+import java.util.Map;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.Unmarshaller;
+
+import org.jboss.deployers.vfs.spi.deployer.JAXBDeployer;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.virtual.VirtualFile;
+import org.xml.sax.InputSource;
+
+/**
+ * A parsing deployer that is capable of parsing
+ * a JAXB model with the root element being
+ * JAXBElement<T>
+ *
+ * @author Anil.Saldhana at redhat.com
+ * @since Mar 17, 2009
+ */
+ at SuppressWarnings("unchecked")
+public class JAXBElementParsingDeployer<T,V> extends JAXBDeployer
+{
+ /** The JAXBContext */
+ protected JAXBContext context;
+
+ /** The properties */
+ protected Map<String, Object> properties;
+
+ protected Class<V> enclosed;
+
+ /**
+ * CTR
+ * @param output JAXBElement.class
+ * @param enclosed Type enclosed by JAXBElement
+ */
+ public JAXBElementParsingDeployer(Class<T> output, Class<V> enclosed)
+ {
+ super(output);
+ this.enclosed = enclosed;
+ }
+
+ /**
+ * Create lifecycle
+ *
+ * @throws Exception for any problem
+ */
+ @Override
+ public void create() throws Exception
+ {
+ if (properties != null)
+ context = JAXBContext.newInstance(new Class[] {enclosed}, properties);
+ else
+ context = JAXBContext.newInstance(enclosed);
+ }
+
+ /**
+ * Destroy lifecycle
+ */
+ public void destroy()
+ {
+ context = null;
+ }
+
+ @Override
+ protected Object parse(VFSDeploymentUnit unit, VirtualFile file, Object root) throws Exception
+ {
+ Unmarshaller unmarshaller = context.createUnmarshaller();
+ InputStream is = openStreamAndValidate(file);
+ try
+ {
+ InputSource source = new InputSource(is);
+ source.setSystemId(file.toURI().toString());
+ Object o = unmarshaller.unmarshal(source);
+ return getOutput().cast(o);
+ }
+ finally
+ {
+ try
+ {
+ is.close();
+ }
+ catch (Exception ignored)
+ {
+ }
+ }
+ }
+}
Added: trunk/security/src/main/org/jboss/security/deployers/XacmlConfigParsingDeployer.java
===================================================================
--- trunk/security/src/main/org/jboss/security/deployers/XacmlConfigParsingDeployer.java (rev 0)
+++ trunk/security/src/main/org/jboss/security/deployers/XacmlConfigParsingDeployer.java 2009-03-18 21:52:30 UTC (rev 86077)
@@ -0,0 +1,78 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.security.deployers;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.security.xacml.jaxb.PDP;
+
+/**
+ * Parsing Deployer for JBossXACML Config
+ * @author Anil.Saldhana at redhat.com
+ * @since Mar 17, 2009
+ */
+ at SuppressWarnings("unchecked")
+public class XacmlConfigParsingDeployer extends JAXBElementParsingDeployer<JAXBElement,PDP>
+{
+ public final static String XACML_ATTACHMENT_NAME = "xacml.config";
+
+ protected JAXBContext context;
+
+ public XacmlConfigParsingDeployer()
+ {
+ super(JAXBElement.class,PDP.class);
+ setName("jbossxacml-config.xml");
+ }
+
+
+ /**
+ * Get the Config File Name
+ * @return
+ */
+ public String getConfigFileName()
+ {
+ return getName();
+ }
+
+ /**
+ * Set the JBossXACML Config File Name
+ * @param fileName
+ */
+ public void setConfigFileName(String fileName)
+ {
+ this.setName(fileName);
+ }
+
+
+ /**
+ * Method overridden to make the attachment name to be not the same as
+ * the deployment type but a custom name
+ */
+ @Override
+ protected void createMetaData(DeploymentUnit unit, String name, String suffix) throws DeploymentException
+ {
+ createMetaData(unit, name, suffix, XACML_ATTACHMENT_NAME);
+ }
+}
Modified: trunk/server/src/etc/deployers/security-deployer-jboss-beans.xml
===================================================================
--- trunk/server/src/etc/deployers/security-deployer-jboss-beans.xml 2009-03-18 21:48:07 UTC (rev 86076)
+++ trunk/server/src/etc/deployers/security-deployer-jboss-beans.xml 2009-03-18 21:52:30 UTC (rev 86077)
@@ -5,7 +5,7 @@
-->
<deployment xmlns="urn:jboss:bean-deployer:2.0">
- <!-- Instance of Policy Registration -->
+ <!-- Instance of Policy Registration -->
<bean name="JBossSecurityPolicyRegistration"
class="org.jboss.security.plugins.JBossPolicyRegistration" />
@@ -26,4 +26,9 @@
<property name="registerWithJBossXB">true</property>
</bean>
+ <!--Deployer for JBossXACML Config -->
+ <bean name="XACMLParsingDeployer"
+ class="org.jboss.security.deployers.XacmlConfigParsingDeployer" />
+
+ <bean name="ACLParsingDeployer" class="org.jboss.security.deployers.AclConfigParsingDeployer"/>
</deployment>
Modified: trunk/server/src/main/org/jboss/deployment/security/AbstractSecurityDeployer.java
===================================================================
--- trunk/server/src/main/org/jboss/deployment/security/AbstractSecurityDeployer.java 2009-03-18 21:48:07 UTC (rev 86076)
+++ trunk/server/src/main/org/jboss/deployment/security/AbstractSecurityDeployer.java 2009-03-18 21:52:30 UTC (rev 86077)
@@ -24,20 +24,20 @@
import java.util.ArrayList;
import javax.management.ObjectName;
+import javax.xml.bind.JAXBElement;
import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.spi.deployer.DeploymentStages;
import org.jboss.deployers.spi.deployer.helpers.AbstractDeployer;
import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
import org.jboss.metadata.javaee.support.IdMetaData;
+import org.jboss.security.acl.config.ACLConfiguration;
import org.jboss.security.authorization.PolicyRegistration;
import org.jboss.system.metadata.ServiceAttributeMetaData;
import org.jboss.system.metadata.ServiceConstructorMetaData;
import org.jboss.system.metadata.ServiceDependencyMetaData;
import org.jboss.system.metadata.ServiceDependencyValueMetaData;
import org.jboss.system.metadata.ServiceMetaData;
-import org.jboss.virtual.VirtualFile;
/**
* Abstract Security Deployer Sets up the top level JaccPolicy service beans
@@ -52,10 +52,9 @@
private static final String BASE_OBJECT_NAME = "jboss.jacc:service=jacc,id=";
- private static final String XACML_POLICY_FILE_NAME = "jboss-xacml-policy.xml";
+ /** Attachment name for the JAXB model for xacml config - match the one from XacmlConfigParsingDeployer */
+ private static final String XACML_ATTACHMENT_NAME = "xacml.config";
- private static final String ACL_POLICY_FILE_NAME = "jboss-acl-policy.xml";
-
private PolicyRegistration policyRegistration;
/**
@@ -141,29 +140,20 @@
parentServiceMetaData.addAttribute(serviceAttributeMetaData);
}
}
-
- // if policy registration has been set, check the deployments for XACML and ACL configuration files.
- if (this.policyRegistration != null && unit instanceof VFSDeploymentUnit)
+
+ /** Register XACML/ACL policies if present in the deployment */
+ if(this.policyRegistration != null)
{
- VFSDeploymentUnit deploymentUnit = (VFSDeploymentUnit) unit;
- try
- {
- VirtualFile xacmlFile = deploymentUnit.getMetaDataFile(XACML_POLICY_FILE_NAME);
- if (xacmlFile != null)
- {
- this.policyRegistration.registerPolicy(contextId, PolicyRegistration.XACML, xacmlFile.toURL());
- }
- VirtualFile aclPolicyFile = deploymentUnit.getMetaDataFile(ACL_POLICY_FILE_NAME);
- if (aclPolicyFile != null)
- {
- this.policyRegistration.registerPolicy(contextId, PolicyRegistration.ACL, aclPolicyFile.toURL());
- }
- }
- catch (Exception e)
- {
- super.log.debug("Fail to process security configuration file", e);
- }
- }
+ String xacmlType = PolicyRegistration.XACML;
+ JAXBElement<?> policyConfig = (JAXBElement<?>) unit.getAttachment(XACML_ATTACHMENT_NAME);
+ if(policyConfig != null)
+ this.policyRegistration.registerPolicyConfig(contextId, xacmlType, policyConfig);
+
+ String aclType = PolicyRegistration.ACL;
+ ACLConfiguration aclConfig = (ACLConfiguration) unit.getAttachment(ACLConfiguration.class.getName());
+ if(aclConfig != null)
+ this.policyRegistration.registerPolicyConfig(contextId, aclType, aclConfig);
+ }
}
@Override
Modified: trunk/server/src/main/org/jboss/deployment/security/EjbPolicyConfigurationFacade.java
===================================================================
--- trunk/server/src/main/org/jboss/deployment/security/EjbPolicyConfigurationFacade.java 2009-03-18 21:48:07 UTC (rev 86076)
+++ trunk/server/src/main/org/jboss/deployment/security/EjbPolicyConfigurationFacade.java 2009-03-18 21:52:30 UTC (rev 86077)
@@ -27,8 +27,7 @@
import org.jboss.ejb.EJBPermissionMapping;
import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData;
import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeansMetaData;
-import org.jboss.metadata.ejb.jboss.JBossMetaData;
-import org.jboss.metadata.ejb.jboss.JBossMetaDataWrapper;
+import org.jboss.metadata.ejb.jboss.JBossMetaData;
//$Id$
Added: trunk/server/src/main/org/jboss/web/deployers/SecurityActions.java
===================================================================
--- trunk/server/src/main/org/jboss/web/deployers/SecurityActions.java (rev 0)
+++ trunk/server/src/main/org/jboss/web/deployers/SecurityActions.java 2009-03-18 21:52:30 UTC (rev 86077)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.web.deployers;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+/**
+ * Privileged Blocks
+ * @author Anil.Saldhana at redhat.com
+ * @since Mar 18, 2009
+ */
+class SecurityActions
+{
+ static ClassLoader getContextClassLoader()
+ {
+ return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
+ {
+ public ClassLoader run()
+ {
+ return Thread.currentThread().getContextClassLoader();
+ }
+ });
+ }
+
+ static void setContextClassLoader(final ClassLoader tcl)
+ {
+ AccessController.doPrivileged(new PrivilegedAction<Object>()
+ {
+ public Object run()
+ {
+ Thread.currentThread().setContextClassLoader(tcl);
+ return null;
+ }
+ });
+ }
+}
Modified: trunk/server/src/main/org/jboss/web/deployers/WarSecurityDeployer.java
===================================================================
--- trunk/server/src/main/org/jboss/web/deployers/WarSecurityDeployer.java 2009-03-18 21:48:07 UTC (rev 86076)
+++ trunk/server/src/main/org/jboss/web/deployers/WarSecurityDeployer.java 2009-03-18 21:52:30 UTC (rev 86077)
@@ -21,6 +21,8 @@
*/
package org.jboss.web.deployers;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.deployment.security.AbstractSecurityDeployer;
import org.jboss.deployment.security.WarJaccPolicy;
import org.jboss.deployment.security.WarPolicyConfigurationFacade;
@@ -30,14 +32,35 @@
//$Id$
/**
- * Security Deployer for war
+ * Security Deployer for Web Archives
* @author Anil.Saldhana at redhat.com
* @since Feb 17, 2008
* @version $Revision$
*/
public class WarSecurityDeployer extends AbstractSecurityDeployer<JBossWebMetaData>
-{
+{
+
@Override
+ public void deploy(DeploymentUnit unit) throws DeploymentException
+ {
+ ClassLoader oldCL = null;
+ // Set the TCL
+ try
+ {
+ //JBAS-6607: JBossXACML needs the tcl to locate the xacml policies
+ //The TCL would be the CL for VFS for the security deployer beans
+ //Deployment Unit CL would be the war CL. Hence pick the DU CL as TCL.
+ oldCL = SecurityActions.getContextClassLoader();
+ SecurityActions.setContextClassLoader(unit.getClassLoader());
+ super.deploy(unit);
+ }
+ finally
+ {
+ SecurityActions.setContextClassLoader(oldCL);
+ }
+ }
+
+ @Override
protected ServiceMetaData getServiceMetaData()
{
ServiceMetaData serviceMetaData = new ServiceMetaData();
Modified: trunk/testsuite/imports/sections/security.xml
===================================================================
--- trunk/testsuite/imports/sections/security.xml 2009-03-18 21:48:07 UTC (rev 86076)
+++ trunk/testsuite/imports/sections/security.xml 2009-03-18 21:52:30 UTC (rev 86077)
@@ -345,6 +345,7 @@
<include name="ejb-jar.xml" />
<include name="jboss.xml" />
<include name="jboss-xacml-policy.xml" />
+ <include name="jbossxacml-config.xml" />
</metainf>
<fileset dir="${build.classes}">
<include name="org/jboss/test/security/ejb/StatelessSessionBean4.*"/>
Modified: trunk/testsuite/imports/sections/web.xml
===================================================================
--- trunk/testsuite/imports/sections/web.xml 2009-03-18 21:48:07 UTC (rev 86076)
+++ trunk/testsuite/imports/sections/web.xml 2009-03-18 21:52:30 UTC (rev 86077)
@@ -541,13 +541,16 @@
<war warfile="${build.lib}/xacml-requestattrib.war"
webxml="${build.resources}/web/xacml/requestAttrib/WEB-INF/web.xml">
<webinf dir="${build.resources}/web/xacml/requestAttrib/WEB-INF/">
- <include name="*policy.xml"/>
+ <include name="jbossxacml-config.xml"/>
<include name="jboss-web.xml"/>
</webinf>
<zipfileset dir="${build.resources}/web" prefix="WEB-INF/classes">
<include name="users.properties"/>
<include name="roles.properties"/>
</zipfileset>
+ <zipfileset dir="${build.resources}/web/xacml/requestAttrib/WEB-INF" prefix="WEB-INF/classes">
+ <include name="jboss-xacml-policy.xml"/>
+ </zipfileset>
<fileset dir="${build.resources}/web/xacml/requestAttrib">
<include name="**/*.html"/>
<include name="**/*.jsp"/>
@@ -556,15 +559,16 @@
<war warfile="${build.lib}/xacml-subjectrole.war"
webxml="${build.resources}/web/xacml/requestAttrib/WEB-INF/web.xml">
<webinf dir="${build.resources}/web/xacml/requestAttrib/WEB-INF/">
+ <include name="jbossxacml-config.xml"/>
<include name="jboss-web.xml"/>
</webinf>
- <webinf dir="${build.resources}/web/xacml/subjectRole/WEB-INF/">
- <include name="*policy.xml"/>
- </webinf>
<zipfileset dir="${build.resources}/web" prefix="WEB-INF/classes">
<include name="users.properties"/>
<include name="roles.properties"/>
</zipfileset>
+ <zipfileset dir="${build.resources}/web/xacml/subjectRole/WEB-INF" prefix="WEB-INF/classes">
+ <include name="jboss-xacml-policy.xml"/>
+ </zipfileset>
<fileset dir="${build.resources}/web/xacml/requestAttrib">
<include name="**/*.html"/>
<include name="**/*.jsp"/>
Added: trunk/testsuite/src/resources/security/authorization/xacml-ejb/META-INF/jbossxacml-config.xml
===================================================================
--- trunk/testsuite/src/resources/security/authorization/xacml-ejb/META-INF/jbossxacml-config.xml (rev 0)
+++ trunk/testsuite/src/resources/security/authorization/xacml-ejb/META-INF/jbossxacml-config.xml 2009-03-18 21:52:30 UTC (rev 86077)
@@ -0,0 +1,11 @@
+<ns:jbosspdp xmlns:ns="urn:jboss:xacml:2.0">
+ <ns:Policies>
+ <ns:Policy>
+ <ns:Location>META-INF/jboss-xacml-policy.xml</ns:Location>
+ </ns:Policy>
+ </ns:Policies>
+ <ns:Locators>
+ <ns:Locator Name="org.jboss.security.xacml.locators.JBossPolicySetLocator"/>
+ <ns:Locator Name="org.jboss.security.xacml.locators.JBossPolicyLocator"/>
+ </ns:Locators>
+</ns:jbosspdp>
Added: trunk/testsuite/src/resources/web/xacml/requestAttrib/WEB-INF/jbossxacml-config.xml
===================================================================
--- trunk/testsuite/src/resources/web/xacml/requestAttrib/WEB-INF/jbossxacml-config.xml (rev 0)
+++ trunk/testsuite/src/resources/web/xacml/requestAttrib/WEB-INF/jbossxacml-config.xml 2009-03-18 21:52:30 UTC (rev 86077)
@@ -0,0 +1,11 @@
+<ns:jbosspdp xmlns:ns="urn:jboss:xacml:2.0">
+ <ns:Policies>
+ <ns:Policy>
+ <ns:Location>jboss-xacml-policy.xml</ns:Location>
+ </ns:Policy>
+ </ns:Policies>
+ <ns:Locators>
+ <ns:Locator Name="org.jboss.security.xacml.locators.JBossPolicySetLocator"/>
+ <ns:Locator Name="org.jboss.security.xacml.locators.JBossPolicyLocator"/>
+ </ns:Locators>
+</ns:jbosspdp>
More information about the jboss-cvs-commits
mailing list