[jboss-cvs] JBossAS SVN: r85373 - in projects/security/security-jboss-sx/tags: 2.0.3.GA and 9 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Mar 5 18:51:08 EST 2009
Author: sguilhen at redhat.com
Date: 2009-03-05 18:51:08 -0500 (Thu, 05 Mar 2009)
New Revision: 85373
Added:
projects/security/security-jboss-sx/tags/2.0.3.GA/
projects/security/security-jboss-sx/tags/2.0.3.GA/acl/pom.xml
projects/security/security-jboss-sx/tags/2.0.3.GA/acl/src/main/java/org/jboss/security/acl/ACLEntryImpl.java
projects/security/security-jboss-sx/tags/2.0.3.GA/acl/src/main/java/org/jboss/security/acl/ACLImpl.java
projects/security/security-jboss-sx/tags/2.0.3.GA/acl/src/main/java/org/jboss/security/acl/ACLProviderImpl.java
projects/security/security-jboss-sx/tags/2.0.3.GA/acl/src/main/java/org/jboss/security/acl/EntitlementEntry.java
projects/security/security-jboss-sx/tags/2.0.3.GA/acl/src/main/java/org/jboss/security/acl/RoleBasedACLProviderImpl.java
projects/security/security-jboss-sx/tags/2.0.3.GA/acl/src/tests/java/org/jboss/test/security/acl/PersistenceTestCase.java
projects/security/security-jboss-sx/tags/2.0.3.GA/acl/src/tests/java/org/jboss/test/security/acl/RoleBasedACLProviderUnitTestCase.java
projects/security/security-jboss-sx/tags/2.0.3.GA/assembly/pom.xml
projects/security/security-jboss-sx/tags/2.0.3.GA/identity/pom.xml
projects/security/security-jboss-sx/tags/2.0.3.GA/jbosssx-client/pom.xml
projects/security/security-jboss-sx/tags/2.0.3.GA/jbosssx-mc-int/pom.xml
projects/security/security-jboss-sx/tags/2.0.3.GA/jbosssx/pom.xml
projects/security/security-jboss-sx/tags/2.0.3.GA/parent/pom.xml
projects/security/security-jboss-sx/tags/2.0.3.GA/pom.xml
Removed:
projects/security/security-jboss-sx/tags/2.0.3.GA/acl/pom.xml
projects/security/security-jboss-sx/tags/2.0.3.GA/acl/src/main/java/org/jboss/security/acl/ACLEntryImpl.java
projects/security/security-jboss-sx/tags/2.0.3.GA/acl/src/main/java/org/jboss/security/acl/ACLImpl.java
projects/security/security-jboss-sx/tags/2.0.3.GA/acl/src/main/java/org/jboss/security/acl/ACLProviderImpl.java
projects/security/security-jboss-sx/tags/2.0.3.GA/acl/src/main/java/org/jboss/security/acl/EntitlementEntry.java
projects/security/security-jboss-sx/tags/2.0.3.GA/acl/src/tests/java/org/jboss/test/security/acl/PersistenceTestCase.java
projects/security/security-jboss-sx/tags/2.0.3.GA/assembly/pom.xml
projects/security/security-jboss-sx/tags/2.0.3.GA/identity/pom.xml
projects/security/security-jboss-sx/tags/2.0.3.GA/jbosssx-client/pom.xml
projects/security/security-jboss-sx/tags/2.0.3.GA/jbosssx-mc-int/pom.xml
projects/security/security-jboss-sx/tags/2.0.3.GA/jbosssx/pom.xml
projects/security/security-jboss-sx/tags/2.0.3.GA/parent/pom.xml
projects/security/security-jboss-sx/tags/2.0.3.GA/pom.xml
Log:
[maven-release-plugin] copy for tag 2.0.3.GA
Copied: projects/security/security-jboss-sx/tags/2.0.3.GA (from rev 85172, projects/security/security-jboss-sx/branches/Branch_2_0)
Deleted: projects/security/security-jboss-sx/tags/2.0.3.GA/acl/pom.xml
===================================================================
--- projects/security/security-jboss-sx/branches/Branch_2_0/acl/pom.xml 2009-03-03 17:42:05 UTC (rev 85172)
+++ projects/security/security-jboss-sx/tags/2.0.3.GA/acl/pom.xml 2009-03-05 23:51:08 UTC (rev 85373)
@@ -1,122 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <groupId>org.jboss.security</groupId>
- <artifactId>jbosssx-parent</artifactId>
- <version>2.0.2-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>jboss-security-acl-impl</artifactId>
- <packaging>jar</packaging>
- <name>JBoss Security ACL Implementation</name>
- <url>http://labs.jboss.org/portal/jbosssecurity/</url>
- <description>JBoss Security is a cross cutting project that handles security for the JEMS projects</description>
- <licenses>
- <license>
- <name>lgpl</name>
- <url>http://repository.jboss.com/licenses/lgpl.txt</url>
- </license>
- </licenses>
- <organization>
- <name>JBoss Inc.</name>
- <url>http://www.jboss.org</url>
- </organization>
- <profiles>
- <!-- mvn install -Psecurity-manager -->
- <profile>
- <id>security-manager</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <properties>
- <test.env>-Dtest.basedir=${basedir}/target/test-classes</test.env>
- <policy.file>${basedir}/src/tests/resources/java.policy</policy.file>
- <surefire.jvm.args>-Djava.security.manager -Djava.security.policy=${policy.file} ${test.env}</surefire.jvm.args>
- </properties>
- </profile>
- <!-- mvn install -Psecurity-manager-debug -->
- <!-- Best Practice: mvn install -Psecurity-manager-debug 2>&1 > logfile2>&1 > logfile -->
- <profile>
- <id>security-manager-debug</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <properties>
- <test.env>-Dtest.basedir=${basedir}/target/test-classes</test.env>
- <policy.file>${basedir}/src/tests/resources/java.policy</policy.file>
- <surefire.jvm.args>-Djava.security.manager -Djava.security.policy=${policy.file} -Djava.security.debug=failure,access ${test.env}</surefire.jvm.args>
- </properties>
- </profile>
- </profiles>
- <build>
- <sourceDirectory>src/main/java</sourceDirectory>
- <outputDirectory>target/classes</outputDirectory>
- <testSourceDirectory>src/tests/java</testSourceDirectory>
- <testOutputDirectory>target/test-classes</testOutputDirectory>
- <finalName>${artifactId}</finalName>
- <resources>
- <resource>
- <directory>${basedir}</directory>
- <includes>
- <include>JBossORG-EULA.txt</include>
- </includes>
- </resource>
- <resource>
- <directory>src/main/resources</directory>
- <includes>
- <include>**/*.dtd</include>
- <include>**/*.xsd</include>
- </includes>
- </resource>
- </resources>
- <testResources>
- <testResource>
- <directory>src/tests/resources/</directory>
- <includes>
- <include>**/*.xml</include>
- </includes>
- </testResource>
- </testResources>
- </build>
- <dependencies>
- <dependency>
- <groupId>jboss</groupId>
- <artifactId>jboss-logging-log4j</artifactId>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate</artifactId>
- <version>3.2.4.sp1</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-annotations</artifactId>
- <version>3.3.0.ga</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-entitymanager</artifactId>
- <version>3.3.1.ga</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>hsqldb</groupId>
- <artifactId>hsqldb</artifactId>
- <version>1.8.0.2</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.security</groupId>
- <artifactId>identity-impl</artifactId>
- <version>${project.version}</version>
- <scope>compile</scope>
- </dependency>
- </dependencies>
-</project>
Copied: projects/security/security-jboss-sx/tags/2.0.3.GA/acl/pom.xml (from rev 85372, projects/security/security-jboss-sx/branches/Branch_2_0/acl/pom.xml)
===================================================================
--- projects/security/security-jboss-sx/tags/2.0.3.GA/acl/pom.xml (rev 0)
+++ projects/security/security-jboss-sx/tags/2.0.3.GA/acl/pom.xml 2009-03-05 23:51:08 UTC (rev 85373)
@@ -0,0 +1,122 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jbosssx-parent</artifactId>
+ <version>2.0.3.GA</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>jboss-security-acl-impl</artifactId>
+ <packaging>jar</packaging>
+ <name>JBoss Security ACL Implementation</name>
+ <url>http://labs.jboss.org/portal/jbosssecurity/</url>
+ <description>JBoss Security is a cross cutting project that handles security for the JEMS projects</description>
+ <licenses>
+ <license>
+ <name>lgpl</name>
+ <url>http://repository.jboss.com/licenses/lgpl.txt</url>
+ </license>
+ </licenses>
+ <organization>
+ <name>JBoss Inc.</name>
+ <url>http://www.jboss.org</url>
+ </organization>
+ <profiles>
+ <!-- mvn install -Psecurity-manager -->
+ <profile>
+ <id>security-manager</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <properties>
+ <test.env>-Dtest.basedir=${basedir}/target/test-classes</test.env>
+ <policy.file>${basedir}/src/tests/resources/java.policy</policy.file>
+ <surefire.jvm.args>-Djava.security.manager -Djava.security.policy=${policy.file} ${test.env}</surefire.jvm.args>
+ </properties>
+ </profile>
+ <!-- mvn install -Psecurity-manager-debug -->
+ <!-- Best Practice: mvn install -Psecurity-manager-debug 2>&1 > logfile2>&1 > logfile -->
+ <profile>
+ <id>security-manager-debug</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <properties>
+ <test.env>-Dtest.basedir=${basedir}/target/test-classes</test.env>
+ <policy.file>${basedir}/src/tests/resources/java.policy</policy.file>
+ <surefire.jvm.args>-Djava.security.manager -Djava.security.policy=${policy.file} -Djava.security.debug=failure,access ${test.env}</surefire.jvm.args>
+ </properties>
+ </profile>
+ </profiles>
+ <build>
+ <sourceDirectory>src/main/java</sourceDirectory>
+ <outputDirectory>target/classes</outputDirectory>
+ <testSourceDirectory>src/tests/java</testSourceDirectory>
+ <testOutputDirectory>target/test-classes</testOutputDirectory>
+ <finalName>${artifactId}</finalName>
+ <resources>
+ <resource>
+ <directory>${basedir}</directory>
+ <includes>
+ <include>JBossORG-EULA.txt</include>
+ </includes>
+ </resource>
+ <resource>
+ <directory>src/main/resources</directory>
+ <includes>
+ <include>**/*.dtd</include>
+ <include>**/*.xsd</include>
+ </includes>
+ </resource>
+ </resources>
+ <testResources>
+ <testResource>
+ <directory>src/tests/resources/</directory>
+ <includes>
+ <include>**/*.xml</include>
+ </includes>
+ </testResource>
+ </testResources>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-logging-log4j</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate</artifactId>
+ <version>3.2.4.sp1</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-annotations</artifactId>
+ <version>3.3.0.ga</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-entitymanager</artifactId>
+ <version>3.3.1.ga</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ <version>1.8.0.2</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>identity-impl</artifactId>
+ <version>${project.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
+</project>
Deleted: projects/security/security-jboss-sx/tags/2.0.3.GA/acl/src/main/java/org/jboss/security/acl/ACLEntryImpl.java
===================================================================
--- projects/security/security-jboss-sx/branches/Branch_2_0/acl/src/main/java/org/jboss/security/acl/ACLEntryImpl.java 2009-03-03 17:42:05 UTC (rev 85172)
+++ projects/security/security-jboss-sx/tags/2.0.3.GA/acl/src/main/java/org/jboss/security/acl/ACLEntryImpl.java 2009-03-05 23:51:08 UTC (rev 85373)
@@ -1,211 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.acl;
-
-import java.io.Serializable;
-
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.ManyToOne;
-import javax.persistence.PostLoad;
-import javax.persistence.PrePersist;
-import javax.persistence.Table;
-import javax.persistence.Transient;
-
-import org.jboss.security.identity.Identity;
-
-/**
- * <p>
- * This class represents an entry in the Access Control List (ACL), and associates a permission to an identity. This
- * implementation only stores permissions of type {@code BitMaskPermission}, and can also only check permissions of
- * that type.
- * </p>
- *
- * @author <a href="mailto:sguilhen at redhat.com">Stefan Guilhen</a>
- */
- at Entity
- at Table(name = "ACL_ENTRY")
-public class ACLEntryImpl implements ACLEntry, Serializable
-{
- private static final long serialVersionUID = -2985214023383451768L;
-
- @Id
- @GeneratedValue
- private long entryID;
-
- @Transient
- private BitMaskPermission permission;
-
- /* persist only the bitmask */
- private int bitMask;
-
- @Transient
- private Identity identity;
-
- /* persist the string representation of the identity */
- private String identityString;
-
- @ManyToOne
- private ACLImpl acl;
-
- /**
- * <p>
- * Builds an instance of {@code ACLEntryImpl}. This constructor is required by the JPA specification.
- * </p>
- */
- ACLEntryImpl()
- {
- }
-
- /**
- * <p>
- * Builds an instance of {@code ACLEntryImpl} with the specified permission and identity.
- * </p>
- *
- * @param permission the {@code ACLPermission} granted to the associated identity.
- * @param identity the {@code Identity} for which the permission is being granted.
- */
- public ACLEntryImpl(BitMaskPermission permission, Identity identity)
- {
- this.permission = permission;
- this.identity = identity;
- }
-
- /**
- * <p>
- * Obtains the persistent id of this {@code ACLEntryImpl}.
- * </p>
- *
- * @return a {@code long} representing the persistent id this entry.
- */
- public long getACLEntryId()
- {
- return this.entryID;
- }
-
- /**
- * <p>
- * Method called by the JPA layer before persisting the fields.
- * </p>
- */
- @PrePersist
- @SuppressWarnings("unused")
- private void setPersistentFields()
- {
- if (this.permission != null)
- this.bitMask = this.permission.getMaskValue();
- this.identityString = Util.getIdentityAsString(this.identity);
- }
-
- /**
- * <p>
- * Method called by the JPA layer after loading the persisted object.
- * </p>
- */
- @PostLoad
- @SuppressWarnings("unused")
- private void loadState()
- {
- if (this.permission != null)
- throw new IllegalStateException("ACLEntry permission has already been set");
- this.permission = new CompositeACLPermission(this.bitMask);
-
- if (this.identity != null)
- throw new IllegalStateException("ACLEntry identity has already been set");
- this.identity = Util.getIdentityFromString(identityString);
- }
-
- public ACLImpl getAcl()
- {
- return this.acl;
- }
-
- public void setAcl(ACLImpl acl)
- {
- this.acl = acl;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.jboss.security.acl.ACLEntry#getIdentity()
- */
- public Identity getIdentity()
- {
- return this.identity;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.jboss.security.acl.ACLEntry#getPermission()
- */
- public ACLPermission getPermission()
- {
- return this.permission;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.jboss.security.acl.ACLEntry#checkPermission(org.jboss.security.acl.ACLPermission)
- */
- public boolean checkPermission(ACLPermission permission)
- {
- if (!(permission instanceof BitMaskPermission))
- return false;
- BitMaskPermission bitmaskPermission = (BitMaskPermission) permission;
- // an empty permission is always part of another permission.
- if (bitmaskPermission.getMaskValue() == 0)
- return true;
- // simple implementation: if all bits match, return true.
- return (this.permission.getMaskValue() & bitmaskPermission.getMaskValue()) == bitmaskPermission.getMaskValue();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#equals(java.lang.Object)
- */
- @Override
- public boolean equals(Object obj)
- {
- if (obj instanceof ACLEntryImpl)
- {
- ACLEntryImpl entry = (ACLEntryImpl) obj;
- return entry.getIdentity().getName().equals(this.identity.getName());
- }
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#hashCode()
- */
- @Override
- public int hashCode()
- {
- return this.getIdentity().getName().hashCode();
- }
-}
Copied: projects/security/security-jboss-sx/tags/2.0.3.GA/acl/src/main/java/org/jboss/security/acl/ACLEntryImpl.java (from rev 85320, projects/security/security-jboss-sx/branches/Branch_2_0/acl/src/main/java/org/jboss/security/acl/ACLEntryImpl.java)
===================================================================
--- projects/security/security-jboss-sx/tags/2.0.3.GA/acl/src/main/java/org/jboss/security/acl/ACLEntryImpl.java (rev 0)
+++ projects/security/security-jboss-sx/tags/2.0.3.GA/acl/src/main/java/org/jboss/security/acl/ACLEntryImpl.java 2009-03-05 23:51:08 UTC (rev 85373)
@@ -0,0 +1,231 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.acl;
+
+import java.io.Serializable;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.ManyToOne;
+import javax.persistence.PostLoad;
+import javax.persistence.PrePersist;
+import javax.persistence.Table;
+import javax.persistence.Transient;
+
+import org.jboss.security.identity.Identity;
+
+/**
+ * <p>
+ * This class represents an entry in the Access Control List (ACL), and associates a permission to an identity. This
+ * implementation only stores permissions of type {@code BitMaskPermission}, and can also only check permissions of
+ * that type.
+ * </p>
+ *
+ * @author <a href="mailto:sguilhen at redhat.com">Stefan Guilhen</a>
+ */
+ at Entity
+ at Table(name = "ACL_ENTRY")
+public class ACLEntryImpl implements ACLEntry, Serializable
+{
+ private static final long serialVersionUID = -2985214023383451768L;
+
+ @Id
+ @GeneratedValue
+ private long entryID;
+
+ @Transient
+ private BitMaskPermission permission;
+
+ /* persist only the bitmask */
+ private int bitMask;
+
+ @Transient
+ private Identity identity;
+
+ /* persist the string representation of the identity or role */
+ private String identityOrRole;
+
+ @ManyToOne
+ private ACLImpl acl;
+
+ /**
+ * <p>
+ * Builds an instance of {@code ACLEntryImpl}. This constructor is required by the JPA specification.
+ * </p>
+ */
+ ACLEntryImpl()
+ {
+ }
+
+ /**
+ * <p>
+ * Builds an instance of {@code ACLEntryImpl} with the specified permission and identity.
+ * </p>
+ *
+ * @param permission the {@code ACLPermission} granted to the associated identity.
+ * @param identity the {@code Identity} for which the permission is being granted.
+ */
+ public ACLEntryImpl(BitMaskPermission permission, Identity identity)
+ {
+ this.permission = permission;
+ this.identity = identity;
+ this.identityOrRole = identity.getName();
+ }
+
+ /**
+ * <p>
+ * Builds an instance of {@code ACLEntryImpl} with the specified permission and identity/role name.
+ * </p>
+ *
+ * @param permission the {@code ACLPermission} granted to the associated identity.
+ * @param identityOrRole a {@code String} representing the identity or role name.
+ */
+ public ACLEntryImpl(BitMaskPermission permission, String identityOrRole)
+ {
+ this.permission = permission;
+ this.identityOrRole = identityOrRole;
+ }
+
+ /**
+ * <p>
+ * Obtains the persistent id of this {@code ACLEntryImpl}.
+ * </p>
+ *
+ * @return a {@code long} representing the persistent id this entry.
+ */
+ public long getACLEntryId()
+ {
+ return this.entryID;
+ }
+
+ /**
+ * <p>
+ * Method called by the JPA layer before persisting the fields.
+ * </p>
+ */
+ @PrePersist
+ @SuppressWarnings("unused")
+ private void setPersistentFields()
+ {
+ if (this.permission != null)
+ this.bitMask = this.permission.getMaskValue();
+ }
+
+ /**
+ * <p>
+ * Method called by the JPA layer after loading the persisted object.
+ * </p>
+ */
+ @PostLoad
+ @SuppressWarnings("unused")
+ private void loadState()
+ {
+ if (this.permission != null)
+ throw new IllegalStateException("ACLEntry permission has already been set");
+ this.permission = new CompositeACLPermission(this.bitMask);
+ }
+
+ public ACLImpl getAcl()
+ {
+ return this.acl;
+ }
+
+ public void setAcl(ACLImpl acl)
+ {
+ this.acl = acl;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.security.acl.ACLEntry#getIdentityOrRole()
+ */
+ public String getIdentityOrRole()
+ {
+ return this.identityOrRole;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.security.acl.ACLEntry#getIdentity()
+ */
+ public Identity getIdentity()
+ {
+ return this.identity;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.security.acl.ACLEntry#getPermission()
+ */
+ public ACLPermission getPermission()
+ {
+ return this.permission;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.security.acl.ACLEntry#checkPermission(org.jboss.security.acl.ACLPermission)
+ */
+ public boolean checkPermission(ACLPermission permission)
+ {
+ if (!(permission instanceof BitMaskPermission))
+ return false;
+ BitMaskPermission bitmaskPermission = (BitMaskPermission) permission;
+ // an empty permission is always part of another permission.
+ if (bitmaskPermission.getMaskValue() == 0)
+ return true;
+ // simple implementation: if all bits match, return true.
+ return (this.permission.getMaskValue() & bitmaskPermission.getMaskValue()) == bitmaskPermission.getMaskValue();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (obj instanceof ACLEntryImpl)
+ {
+ ACLEntryImpl entry = (ACLEntryImpl) obj;
+ return this.identityOrRole.equals(entry.identityOrRole);
+ }
+ return false;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ return this.identityOrRole.hashCode();
+ }
+}
Deleted: projects/security/security-jboss-sx/tags/2.0.3.GA/acl/src/main/java/org/jboss/security/acl/ACLImpl.java
===================================================================
--- projects/security/security-jboss-sx/branches/Branch_2_0/acl/src/main/java/org/jboss/security/acl/ACLImpl.java 2009-03-03 17:42:05 UTC (rev 85172)
+++ projects/security/security-jboss-sx/tags/2.0.3.GA/acl/src/main/java/org/jboss/security/acl/ACLImpl.java 2009-03-05 23:51:08 UTC (rev 85373)
@@ -1,264 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.acl;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.persistence.CascadeType;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.FetchType;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.OneToMany;
-import javax.persistence.Table;
-import javax.persistence.Transient;
-
-import org.hibernate.annotations.Cascade;
-import org.jboss.security.authorization.Resource;
-import org.jboss.security.identity.Identity;
-
-/**
- * <p>
- * Simple ACL implementation that keeps the entries in a Map whose keys are the identities of the entries, to provide
- * fast access.
- * </p>
- *
- * @author <a href="mailto:sguilhen at redhat.com">Stefan Guilhen</a>
- */
- at Entity
- at Table(name = "ACL")
-public class ACLImpl implements ACL, Serializable
-{
- private static final long serialVersionUID = -6390609071167528812L;
-
- @Id
- @GeneratedValue
- private long aclID;
-
- @Transient
- private Resource resource;
-
- @Column(name = "resource")
- private String resourceAsString;
-
- @Transient
- private Map<Identity, ACLEntry> entriesMap;
-
- @OneToMany(mappedBy = "acl", fetch = FetchType.EAGER, cascade =
- {CascadeType.REMOVE, CascadeType.PERSIST})
- @Cascade(
- {org.hibernate.annotations.CascadeType.DELETE_ORPHAN})
- private Collection<ACLEntryImpl> entries;
-
- /**
- * <p>
- * Builds an instance of {@code ACLImpl}. This constructor is required by the JPA specification.
- * </p>
- */
- ACLImpl()
- {
- }
-
- /**
- * <p>
- * Builds an instance of {@code ACLImpl} for the specified resource.
- * </p>
- *
- * @param resource a reference to the {@code Resource} associated with the ACL being constructed.
- */
- public ACLImpl(Resource resource)
- {
- this(resource, new ArrayList<ACLEntry>());
- }
-
- /**
- * <p>
- * Builds an instance of {@code ACLImpl} for the specified resource, and initialize it with the specified entries.
- * </p>
- *
- * @param resource a reference to the {@code Resource} associated with the ACL being constructed.
- * @param entries a {@code Collection} containing the ACL's initial entries.
- */
- public ACLImpl(Resource resource, Collection<ACLEntry> entries)
- {
- this(Util.getResourceAsString(resource), entries);
- this.resource = resource;
- }
-
- public ACLImpl(String resourceString, Collection<ACLEntry> entries)
- {
- this.resourceAsString = resourceString;
- this.entries = new ArrayList<ACLEntryImpl>();
- if (entries != null)
- {
- for (ACLEntry entry : entries)
- {
- ACLEntryImpl entryImpl = (ACLEntryImpl) entry;
- entryImpl.setAcl(this);
- this.entries.add(entryImpl);
- }
- }
- this.initEntriesMap();
- }
-
- /**
- * <p>
- * Obtains the persistent id of this {@code ACLImpl}.
- * </p>
- *
- * @return a {@code long} representing the persistent id this ACL.
- */
- public long getACLId()
- {
- return this.aclID;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.jboss.security.acl.ACL#addEntry(org.jboss.security.acl.ACLEntry)
- */
- public boolean addEntry(ACLEntry entry)
- {
- if (this.entriesMap == null)
- this.initEntriesMap();
-
- // don't add a null entry or an entry that already existSELECT * FROM ACL_ENTRYs.
- if (entry == null || this.entriesMap.get(entry.getIdentity()) != null)
- return false;
- this.entries.add((ACLEntryImpl) entry);
- ((ACLEntryImpl) entry).setAcl(this);
- this.entriesMap.put(entry.getIdentity(), entry);
- return true;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.jboss.security.acl.ACL#removeEntry(org.jboss.security.acl.ACLEntry)
- */
- public boolean removeEntry(ACLEntry entry)
- {
- if (this.entriesMap == null)
- this.initEntriesMap();
- this.entriesMap.remove(entry.getIdentity());
- return this.entries.remove(entry);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.jboss.security.acl.ACL#getEntries()
- */
- public Collection<? extends ACLEntry> getEntries()
- {
- if (this.entriesMap == null)
- this.initEntriesMap();
- return Collections.unmodifiableCollection(this.entries);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.jboss.security.acl.ACL#getEntry(org.jboss.security.identity.Identity)
- */
- public ACLEntry getEntry(Identity identity)
- {
- return this.entriesMap.get(identity);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.jboss.security.acl.ACL#isGranted(org.jboss.security.acl.ACLPermission,
- * org.jboss.security.identity.Identity)
- */
- public boolean isGranted(ACLPermission permission, Identity identity)
- {
- if (this.entriesMap == null)
- this.initEntriesMap();
-
- // lookup the entry corresponding to the specified identity.
- ACLEntry entry = this.entriesMap.get(identity);
- if (entry != null)
- {
- // check the permission associated with the identity.
- return entry.checkPermission(permission);
- }
- return false;
- }
-
- /**
- * <p>
- * Obtains the stringfied representation of the resource associated with this {@code ACL}.
- * </p>
- *
- * @return a {@code String} representation of the resource.
- */
- public String getResourceAsString()
- {
- return this.resourceAsString;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.jboss.security.acl.ACL#getResource()
- */
- public Resource getResource()
- {
- return this.resource;
- }
-
- /**
- * <p>
- * Sets the resource associated with this {@code ACL}.
- * </p>
- *
- * @param resource a reference to the {@code Resource} associated with this {@code ACL}.
- */
- public void setResource(Resource resource)
- {
- if (this.resource != null)
- throw new IllegalStateException("ACL resource has already been set");
- this.resource = resource;
- }
-
- /**
- * <p>
- * Initializes the entries map of this {@code ACL} instance.
- * </p>
- */
- private void initEntriesMap()
- {
- this.entriesMap = new HashMap<Identity, ACLEntry>();
- for (ACLEntry entry : this.entries)
- this.entriesMap.put(entry.getIdentity(), entry);
- }
-
-}
Copied: projects/security/security-jboss-sx/tags/2.0.3.GA/acl/src/main/java/org/jboss/security/acl/ACLImpl.java (from rev 85320, projects/security/security-jboss-sx/branches/Branch_2_0/acl/src/main/java/org/jboss/security/acl/ACLImpl.java)
===================================================================
--- projects/security/security-jboss-sx/tags/2.0.3.GA/acl/src/main/java/org/jboss/security/acl/ACLImpl.java (rev 0)
+++ projects/security/security-jboss-sx/tags/2.0.3.GA/acl/src/main/java/org/jboss/security/acl/ACLImpl.java 2009-03-05 23:51:08 UTC (rev 85373)
@@ -0,0 +1,278 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.acl;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.OneToMany;
+import javax.persistence.Table;
+import javax.persistence.Transient;
+
+import org.hibernate.annotations.Cascade;
+import org.jboss.security.authorization.Resource;
+import org.jboss.security.identity.Identity;
+
+/**
+ * <p>
+ * Simple ACL implementation that keeps the entries in a Map whose keys are the identities of the entries, to provide
+ * fast access.
+ * </p>
+ *
+ * @author <a href="mailto:sguilhen at redhat.com">Stefan Guilhen</a>
+ */
+ at Entity
+ at Table(name = "ACL")
+public class ACLImpl implements ACL, Serializable
+{
+ private static final long serialVersionUID = -6390609071167528812L;
+
+ @Id
+ @GeneratedValue
+ private long aclID;
+
+ @Transient
+ private Resource resource;
+
+ @Column(name = "resource")
+ private String resourceAsString;
+
+ @Transient
+ private Map<String, ACLEntry> entriesMap;
+
+ @OneToMany(mappedBy = "acl", fetch = FetchType.EAGER, cascade =
+ {CascadeType.REMOVE, CascadeType.PERSIST})
+ @Cascade(
+ {org.hibernate.annotations.CascadeType.DELETE_ORPHAN})
+ private Collection<ACLEntryImpl> entries;
+
+ /**
+ * <p>
+ * Builds an instance of {@code ACLImpl}. This constructor is required by the JPA specification.
+ * </p>
+ */
+ ACLImpl()
+ {
+ }
+
+ /**
+ * <p>
+ * Builds an instance of {@code ACLImpl} for the specified resource.
+ * </p>
+ *
+ * @param resource a reference to the {@code Resource} associated with the ACL being constructed.
+ */
+ public ACLImpl(Resource resource)
+ {
+ this(resource, new ArrayList<ACLEntry>());
+ }
+
+ /**
+ * <p>
+ * Builds an instance of {@code ACLImpl} for the specified resource, and initialize it with the specified entries.
+ * </p>
+ *
+ * @param resource a reference to the {@code Resource} associated with the ACL being constructed.
+ * @param entries a {@code Collection} containing the ACL's initial entries.
+ */
+ public ACLImpl(Resource resource, Collection<ACLEntry> entries)
+ {
+ this(Util.getResourceAsString(resource), entries);
+ this.resource = resource;
+ }
+
+ public ACLImpl(String resourceString, Collection<ACLEntry> entries)
+ {
+ this.resourceAsString = resourceString;
+ this.entries = new ArrayList<ACLEntryImpl>();
+ if (entries != null)
+ {
+ for (ACLEntry entry : entries)
+ {
+ ACLEntryImpl entryImpl = (ACLEntryImpl) entry;
+ entryImpl.setAcl(this);
+ this.entries.add(entryImpl);
+ }
+ }
+ this.initEntriesMap();
+ }
+
+ /**
+ * <p>
+ * Obtains the persistent id of this {@code ACLImpl}.
+ * </p>
+ *
+ * @return a {@code long} representing the persistent id this ACL.
+ */
+ public long getACLId()
+ {
+ return this.aclID;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.security.acl.ACL#addEntry(org.jboss.security.acl.ACLEntry)
+ */
+ public boolean addEntry(ACLEntry entry)
+ {
+ if (this.entriesMap == null)
+ this.initEntriesMap();
+
+ // don't add a null entry or an entry that already existSELECT * FROM ACL_ENTRYs.
+ if (entry == null || this.entriesMap.get(entry.getIdentityOrRole()) != null)
+ return false;
+ this.entries.add((ACLEntryImpl) entry);
+ ((ACLEntryImpl) entry).setAcl(this);
+ this.entriesMap.put(entry.getIdentityOrRole(), entry);
+ return true;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.security.acl.ACL#removeEntry(org.jboss.security.acl.ACLEntry)
+ */
+ public boolean removeEntry(ACLEntry entry)
+ {
+ if (this.entriesMap == null)
+ this.initEntriesMap();
+ this.entriesMap.remove(entry.getIdentityOrRole());
+ return this.entries.remove(entry);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.security.acl.ACL#getEntries()
+ */
+ public Collection<? extends ACLEntry> getEntries()
+ {
+ if (this.entriesMap == null)
+ this.initEntriesMap();
+ return Collections.unmodifiableCollection(this.entries);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.security.acl.ACL#getEntry(org.jboss.security.identity.Identity)
+ */
+ public ACLEntry getEntry(Identity identity)
+ {
+ if (this.entriesMap == null)
+ this.initEntriesMap();
+ return this.entriesMap.get(identity.getName());
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.security.acl.ACL#getEntry(java.lang.String)
+ */
+ public ACLEntry getEntry(String identityOrRole)
+ {
+ if (this.entriesMap == null)
+ this.initEntriesMap();
+ return this.entriesMap.get(identityOrRole);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.security.acl.ACL#isGranted(org.jboss.security.acl.ACLPermission,
+ * org.jboss.security.identity.Identity)
+ */
+ public boolean isGranted(ACLPermission permission, Identity identity)
+ {
+ if (this.entriesMap == null)
+ this.initEntriesMap();
+
+ // lookup the entry corresponding to the specified identity.
+ ACLEntry entry = this.entriesMap.get(identity.getName());
+ if (entry != null)
+ {
+ // check the permission associated with the identity.
+ return entry.checkPermission(permission);
+ }
+ return false;
+ }
+
+ /**
+ * <p>
+ * Obtains the stringfied representation of the resource associated with this {@code ACL}.
+ * </p>
+ *
+ * @return a {@code String} representation of the resource.
+ */
+ public String getResourceAsString()
+ {
+ return this.resourceAsString;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.security.acl.ACL#getResource()
+ */
+ public Resource getResource()
+ {
+ return this.resource;
+ }
+
+ /**
+ * <p>
+ * Sets the resource associated with this {@code ACL}.
+ * </p>
+ *
+ * @param resource a reference to the {@code Resource} associated with this {@code ACL}.
+ */
+ public void setResource(Resource resource)
+ {
+ if (this.resource != null)
+ throw new IllegalStateException("ACL resource has already been set");
+ this.resource = resource;
+ }
+
+ /**
+ * <p>
+ * Initializes the entries map of this {@code ACL} instance.
+ * </p>
+ */
+ private void initEntriesMap()
+ {
+ this.entriesMap = new HashMap<String, ACLEntry>();
+ for (ACLEntry entry : this.entries)
+ this.entriesMap.put(entry.getIdentityOrRole(), entry);
+ }
+
+}
Deleted: projects/security/security-jboss-sx/tags/2.0.3.GA/acl/src/main/java/org/jboss/security/acl/ACLProviderImpl.java
===================================================================
--- projects/security/security-jboss-sx/branches/Branch_2_0/acl/src/main/java/org/jboss/security/acl/ACLProviderImpl.java 2009-03-03 17:42:05 UTC (rev 85172)
+++ projects/security/security-jboss-sx/tags/2.0.3.GA/acl/src/main/java/org/jboss/security/acl/ACLProviderImpl.java 2009-03-05 23:51:08 UTC (rev 85373)
@@ -1,277 +0,0 @@
-/*
- * 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.acl;
-
-import java.security.AccessController;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import org.jboss.security.authorization.AuthorizationException;
-import org.jboss.security.authorization.Resource;
-import org.jboss.security.authorization.ResourceKeys;
-import org.jboss.security.identity.Identity;
-
-/**
- * <p>
- * This class is the standard {@code ACLProvider} implementation.
- * </p>
- *
- * @author <a href="mailto:sguilhen at redhat.com">Stefan Guilhen</a>
- */
-public class ACLProviderImpl implements ACLProvider
-{
-
- private static final String PERSISTENCE_STRATEGY_OPTION = "persistenceStrategy";
-
- /** persistence strategy used to retrieve the ACLs */
- private ACLPersistenceStrategy strategy;
-
- /*
- * (non-Javadoc)
- *
- * @see org.jboss.security.acl.ACLProvider#initialize(java.util.Map, java.util.Map)
- */
- public void initialize(Map<String, Object> sharedState, Map<String, Object> options)
- {
- String strategyClassName = (String) options.get(PERSISTENCE_STRATEGY_OPTION);
- if (strategyClassName == null)
- strategyClassName = "org.jboss.security.acl.JPAPersistenceStrategy";
-
- try
- {
- Class<?> strategyClass = this.loadClass(strategyClassName);
- this.strategy = (ACLPersistenceStrategy) strategyClass.newInstance();
- }
- catch (Exception e)
- {
- throw new RuntimeException("Failed to instantiate persistence strategy class", e);
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.jboss.security.acl.ACLProvider#getEntitlements(java.lang.Class,
- * org.jboss.security.authorization.Resource, org.jboss.security.identity.Identity)
- */
- @SuppressWarnings("unchecked")
- public <T> Set<T> getEntitlements(Class<T> clazz, Resource resource, Identity identity)
- throws AuthorizationException
- {
- // currently we only provide sets of EntitlementEntry objects.
- if (!EntitlementEntry.class.equals(clazz))
- return null;
-
- Set<EntitlementEntry> entitlements = new HashSet<EntitlementEntry>();
- // get the initial permissions - those that apply to the specified resource.
- ACLPermission permission = this.getInitialPermissions(resource, identity);
- if (permission != null)
- this.fillEntitlements(entitlements, resource, identity, permission);
- return (Set<T>) entitlements;
- }
-
- /**
- * <p>
- * Helper method that populates the {@code entitlements} collection as it traverses through the resources. The
- * resources are visited using a depth-first search algorithm, and when each node is visited one of the following
- * happens:
- * <li>
- * <ul>
- * an ACL for the resource is located and there is an entry for the identity - the permissions assigned to the
- * identity are used to construct the {@code EntitlementEntry} object and this object is added to the collection. The
- * method is then called recursively for each one of the resource's children passing the permissions that were
- * extracted from the ACL.
- * </ul>
- * <ul>
- * an ACL for the resource is found, but there is no entry for the identity - this means the identity doesn't have
- * any permissions regarding the specified resource. Thus, no {@code EntitlementEntry} object is constructed and the
- * method simply returns. No child resources are processed as it is assumed that the identity doesn't have the right
- * to do anything in the resource's subtree.
- * </ul>
- * <ul>
- * no ACL is found - this means that the resource itself is not protected by any ACL. We assume that if a parent
- * resource has an ACL, then the permissions assigned to the parent's ACL should be used.
- * </ul>
- * </li>
- * </p>
- *
- * @param entitlements a reference for the collection of {@code EntitlementEntry} objects that is being constructed.
- * @param resource the {@code Resource} being visited.
- * @param identity the {@code Identity} for which the entitlements are being built.
- * @param permission the {@code ACLPermission} to be used in case no ACL is found for the resource being visited.
- */
- @SuppressWarnings("unchecked")
- private void fillEntitlements(Set<EntitlementEntry> entitlements, Resource resource, Identity identity,
- ACLPermission permission)
- {
- ACLPermission currentPermission = permission;
-
- ACL acl = this.strategy.getACL(resource);
- if (acl != null)
- {
- ACLEntry entry = acl.getEntry(identity);
- // null entry means the identity has no permissions over the specified resource.
- if (entry == null)
- return;
- currentPermission = entry.getPermission();
- entitlements.add(new EntitlementEntry(resource, currentPermission));
- }
- else
- {
- // if resource's ACL is null, build an entry using the permission parameter.
- entitlements.add(new EntitlementEntry(resource, currentPermission));
- }
-
- // iterate through the sub-resources (if any), adding their entries to the entitlements collection.
- Collection<Resource> childResources = (Collection<Resource>) resource.getMap().get(ResourceKeys.CHILD_RESOURCES);
- if (childResources != null)
- {
- for (Resource childResource : childResources)
- fillEntitlements(entitlements, childResource, identity, currentPermission);
- }
- }
-
- /**
- * <p>
- * This method retrieves the permissions the specified identity has over the specified resource. It starts by looking
- * for the resource's ACL. If one is found and if the ACL has entry for the identity, the respective permissions are
- * returned. If no entry is found, we assume the identity hasn't been assigned any permissions and {@code null} is
- * returned.
- * </p>
- * <p>
- * If the resource doesn't have an associated ACL, we start looking for an ACL in the parent resource recursively,
- * until an ACL is located or until no parent resource is found. In the first case, the algorithm described above is
- * used to return the identity's permissions. In the latter case, we return all permissions (lack of an ACL means
- * that the resource is not protected and the user should be granted all permissions).
- * </p>
- *
- * @param resource the {@code Resource} for which we want to discover the permissions that have been assigned to the
- * specified identity.
- * @param identity the {@code Identity} for which we want to discover the permissions regarding the specified
- * resource.
- * @return an {@code ACLPermission} containing the permissions that have been assigned to the identity with respect
- * to the specified resource, or {@code null} if the identity has no permissions at all.
- */
- private ACLPermission getInitialPermissions(Resource resource, Identity identity)
- {
- ACL acl = this.strategy.getACL(resource);
- // if no ACL was found, try to find a parent ACL.
- if (acl == null)
- {
- Resource parent = (Resource) resource.getMap().get(ResourceKeys.PARENT_RESOURCE);
- if (parent != null)
- return getInitialPermissions(parent, identity);
- // no ACL was found and no parent resource exists - identity has all permissions as resource is not protected.
- return new CompositeACLPermission(BasicACLPermission.values());
- }
- // if an ACL was found, return the permissions associated with the specified identity.
- ACLEntry entry = acl.getEntry(identity);
- if (entry != null)
- return entry.getPermission();
- // the absence of an entry means that the identity has no permissions over the specified resource.
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.jboss.security.acl.ACLProvider#getPersistenceStrategy()
- */
- public ACLPersistenceStrategy getPersistenceStrategy()
- {
- return this.strategy;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.jboss.security.acl.ACLProvider#setPersistenceStrategy(org.jboss.security.acl.ACLPersistenceStrategy)
- */
- public void setPersistenceStrategy(ACLPersistenceStrategy strategy)
- {
- if (strategy == null)
- throw new IllegalArgumentException("PersistenceStrategy cannot be null");
- this.strategy = strategy;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.jboss.security.acl.ACLProvider#isAccessGranted(org.jboss.security.authorization.Resource,
- * org.jboss.security.identity.Identity, org.jboss.security.acl.ACLPermission)
- */
- public boolean isAccessGranted(Resource resource, Identity identity, ACLPermission permission)
- throws AuthorizationException
- {
- if (this.strategy != null)
- {
- ACL acl = strategy.getACL(resource);
- if (acl != null)
- return acl.isGranted(permission, identity);
- else
- throw new AuthorizationException("Unable to locate an ACL for the resource " + resource);
- }
- throw new AuthorizationException("Unable to retrieve ACL: persistece strategy not set");
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.jboss.security.acl.ACLProvider#tearDown()
- */
- public boolean tearDown()
- {
- return true;
- }
-
- /**
- * <p>
- * Loads the specified class using a {@code PrivilegedExceptionAction}.
- * </p>
- *
- * @param name a {@code String} containing the fully-qualified name of the class to be loaded.
- * @return a reference to the loaded {@code Class}.
- * @throws PrivilegedActionException if an error occurs while loading the specified class.
- */
- private Class<?> loadClass(final String name) throws PrivilegedActionException
- {
- return AccessController.doPrivileged(new PrivilegedExceptionAction<Class<?>>()
- {
- public Class<?> run() throws PrivilegedActionException
- {
- try
- {
- ClassLoader loader = Thread.currentThread().getContextClassLoader();
- return loader.loadClass(name);
- }
- catch (Exception e)
- {
- throw new PrivilegedActionException(e);
- }
- }
- });
- }
-}
\ No newline at end of file
Copied: projects/security/security-jboss-sx/tags/2.0.3.GA/acl/src/main/java/org/jboss/security/acl/ACLProviderImpl.java (from rev 85320, projects/security/security-jboss-sx/branches/Branch_2_0/acl/src/main/java/org/jboss/security/acl/ACLProviderImpl.java)
===================================================================
--- projects/security/security-jboss-sx/tags/2.0.3.GA/acl/src/main/java/org/jboss/security/acl/ACLProviderImpl.java (rev 0)
+++ projects/security/security-jboss-sx/tags/2.0.3.GA/acl/src/main/java/org/jboss/security/acl/ACLProviderImpl.java 2009-03-05 23:51:08 UTC (rev 85373)
@@ -0,0 +1,288 @@
+/*
+ * 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.acl;
+
+import java.security.AccessController;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.jboss.security.authorization.AuthorizationException;
+import org.jboss.security.authorization.Resource;
+import org.jboss.security.authorization.ResourceKeys;
+import org.jboss.security.identity.Identity;
+
+/**
+ * <p>
+ * This class is the standard {@code ACLProvider} implementation. The access control decisions are based on the name of
+ * the specified identity (that is, it assumes that entries in an ACL are keyed by the name of the identity and not by
+ * other attributes, like the its roles).
+ * </p>
+ *
+ * @author <a href="mailto:sguilhen at redhat.com">Stefan Guilhen</a>
+ */
+public class ACLProviderImpl implements ACLProvider
+{
+
+ private static final String PERSISTENCE_STRATEGY_OPTION = "persistenceStrategy";
+
+ /** persistence strategy used to retrieve the ACLs */
+ protected ACLPersistenceStrategy strategy;
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.security.acl.ACLProvider#initialize(java.util.Map, java.util.Map)
+ */
+ public void initialize(Map<String, Object> sharedState, Map<String, Object> options)
+ {
+ String strategyClassName = (String) options.get(PERSISTENCE_STRATEGY_OPTION);
+ if (strategyClassName == null)
+ strategyClassName = "org.jboss.security.acl.JPAPersistenceStrategy";
+
+ try
+ {
+ Class<?> strategyClass = this.loadClass(strategyClassName);
+ this.strategy = (ACLPersistenceStrategy) strategyClass.newInstance();
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Failed to instantiate persistence strategy class", e);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.security.acl.ACLProvider#getEntitlements(java.lang.Class,
+ * org.jboss.security.authorization.Resource, org.jboss.security.identity.Identity)
+ */
+ @SuppressWarnings("unchecked")
+ public <T> Set<T> getEntitlements(Class<T> clazz, Resource resource, Identity identity)
+ throws AuthorizationException
+ {
+ // currently we only provide sets of EntitlementEntry objects.
+ if (!EntitlementEntry.class.equals(clazz))
+ return null;
+
+ Set<EntitlementEntry> entitlements = new HashSet<EntitlementEntry>();
+ // get the initial permissions - those that apply to the specified resource.
+ ACLPermission permission = this.getInitialPermissions(resource, identity.getName());
+ if (permission != null)
+ this.fillEntitlements(entitlements, resource, identity.getName(), permission);
+ return (Set<T>) entitlements;
+ }
+
+ /**
+ * <p>
+ * Helper method that populates the {@code entitlements} collection as it traverses through the resources. The
+ * resources are visited using a depth-first search algorithm, and when each node is visited one of the following
+ * happens:
+ * <li>
+ * <ul>
+ * an ACL for the resource is located and there is an entry for the identity - the permissions assigned to the
+ * identity are used to construct the {@code EntitlementEntry} object and this object is added to the collection. The
+ * method is then called recursively for each one of the resource's children passing the permissions that were
+ * extracted from the ACL.
+ * </ul>
+ * <ul>
+ * an ACL for the resource is found, but there is no entry for the identity - this means the identity doesn't have
+ * any permissions regarding the specified resource. Thus, no {@code EntitlementEntry} object is constructed and the
+ * method simply returns. No child resources are processed as it is assumed that the identity doesn't have the right
+ * to do anything in the resource's subtree.
+ * </ul>
+ * <ul>
+ * no ACL is found - this means that the resource itself is not protected by any ACL. We assume that if a parent
+ * resource has an ACL, then the permissions assigned to the parent's ACL should be used.
+ * </ul>
+ * </li>
+ * </p>
+ *
+ * @param entitlements a reference for the collection of {@code EntitlementEntry} objects that is being constructed.
+ * @param resource the {@code Resource} being visited.
+ * @param identityName a {@code String} representing the identity for which the entitlements are being built.
+ * @param permission the {@code ACLPermission} to be used in case no ACL is found for the resource being visited.
+ */
+ @SuppressWarnings("unchecked")
+ protected void fillEntitlements(Set<EntitlementEntry> entitlements, Resource resource, String identityName,
+ ACLPermission permission)
+ {
+ ACLPermission currentPermission = permission;
+
+ ACL acl = this.strategy.getACL(resource);
+ if (acl != null)
+ {
+ ACLEntry entry = acl.getEntry(identityName);
+ // null entry means the identity has no permissions over the specified resource.
+ if (entry == null)
+ return;
+ currentPermission = entry.getPermission();
+ entitlements.add(new EntitlementEntry(resource, currentPermission, identityName));
+ }
+ else
+ {
+ // if resource's ACL is null, build an entry using the permission parameter.
+ entitlements.add(new EntitlementEntry(resource, currentPermission, identityName));
+ }
+
+ // iterate through the sub-resources (if any), adding their entries to the entitlements collection.
+ Collection<Resource> childResources = (Collection<Resource>) resource.getMap().get(ResourceKeys.CHILD_RESOURCES);
+ if (childResources != null)
+ {
+ for (Resource childResource : childResources)
+ fillEntitlements(entitlements, childResource, identityName, currentPermission);
+ }
+ }
+
+ /**
+ * <p>
+ * This method retrieves the permissions the specified identity has over the specified resource. It starts by looking
+ * for the resource's ACL. If one is found and if the ACL has entry for the identity, the respective permissions are
+ * returned. If no entry is found, we assume the identity hasn't been assigned any permissions and {@code null} is
+ * returned.
+ * </p>
+ * <p>
+ * If the resource doesn't have an associated ACL, we start looking for an ACL in the parent resource recursively,
+ * until an ACL is located or until no parent resource is found. In the first case, the algorithm described above is
+ * used to return the identity's permissions. In the latter case, we return all permissions (lack of an ACL means
+ * that the resource is not protected and the user should be granted all permissions).
+ * </p>
+ *
+ * @param resource the {@code Resource} for which we want to discover the permissions that have been assigned to the
+ * specified identity.
+ * @param identityName a {@code String} representing the identity for which we want to discover the permissions
+ * regarding the specified resource.
+ * @return an {@code ACLPermission} containing the permissions that have been assigned to the identity with respect
+ * to the specified resource, or {@code null} if the identity has no permissions at all.
+ */
+ protected ACLPermission getInitialPermissions(Resource resource, String identityName)
+ {
+ ACL acl = this.strategy.getACL(resource);
+ // if no ACL was found, try to find a parent ACL.
+ if (acl == null)
+ {
+ Resource parent = (Resource) resource.getMap().get(ResourceKeys.PARENT_RESOURCE);
+ if (parent != null)
+ return getInitialPermissions(parent, identityName);
+ // no ACL was found and no parent resource exists - identity has all permissions as resource is not protected.
+ return new CompositeACLPermission(BasicACLPermission.values());
+ }
+ // if an ACL was found, return the permissions associated with the specified identity.
+ ACLEntry entry = acl.getEntry(identityName);
+ if (entry != null)
+ return entry.getPermission();
+ // the absence of an entry means that the identity has no permissions over the specified resource.
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.security.acl.ACLProvider#getPersistenceStrategy()
+ */
+ public ACLPersistenceStrategy getPersistenceStrategy()
+ {
+ return this.strategy;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.security.acl.ACLProvider#setPersistenceStrategy(org.jboss.security.acl.ACLPersistenceStrategy)
+ */
+ public void setPersistenceStrategy(ACLPersistenceStrategy strategy)
+ {
+ if (strategy == null)
+ throw new IllegalArgumentException("PersistenceStrategy cannot be null");
+ this.strategy = strategy;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.security.acl.ACLProvider#isAccessGranted(org.jboss.security.authorization.Resource,
+ * org.jboss.security.identity.Identity, org.jboss.security.acl.ACLPermission)
+ */
+ public boolean isAccessGranted(Resource resource, Identity identity, ACLPermission permission)
+ throws AuthorizationException
+ {
+ if (this.strategy != null)
+ {
+ ACL acl = strategy.getACL(resource);
+ if (acl != null)
+ {
+ ACLEntry entry = acl.getEntry(identity);
+ if (entry != null)
+ {
+ // check the permission associated with the identity.
+ return entry.checkPermission(permission);
+ }
+ // no entry for identity = deny access
+ return false;
+ }
+ else
+ throw new AuthorizationException("Unable to locate an ACL for the resource " + resource);
+ }
+ throw new AuthorizationException("Unable to retrieve ACL: persistece strategy not set");
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.security.acl.ACLProvider#tearDown()
+ */
+ public boolean tearDown()
+ {
+ return true;
+ }
+
+ /**
+ * <p>
+ * Loads the specified class using a {@code PrivilegedExceptionAction}.
+ * </p>
+ *
+ * @param name a {@code String} containing the fully-qualified name of the class to be loaded.
+ * @return a reference to the loaded {@code Class}.
+ * @throws PrivilegedActionException if an error occurs while loading the specified class.
+ */
+ protected Class<?> loadClass(final String name) throws PrivilegedActionException
+ {
+ return AccessController.doPrivileged(new PrivilegedExceptionAction<Class<?>>()
+ {
+ public Class<?> run() throws PrivilegedActionException
+ {
+ try
+ {
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+ return loader.loadClass(name);
+ }
+ catch (Exception e)
+ {
+ throw new PrivilegedActionException(e);
+ }
+ }
+ });
+ }
+}
\ No newline at end of file
Deleted: projects/security/security-jboss-sx/tags/2.0.3.GA/acl/src/main/java/org/jboss/security/acl/EntitlementEntry.java
===================================================================
--- projects/security/security-jboss-sx/branches/Branch_2_0/acl/src/main/java/org/jboss/security/acl/EntitlementEntry.java 2009-03-03 17:42:05 UTC (rev 85172)
+++ projects/security/security-jboss-sx/tags/2.0.3.GA/acl/src/main/java/org/jboss/security/acl/EntitlementEntry.java 2009-03-05 23:51:08 UTC (rev 85373)
@@ -1,66 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.acl;
-
-import org.jboss.security.authorization.Resource;
-
-/**
- * <p>
- * This class represents a standard entry in the collection returned by the {@code ACLProvider.getEntitlements} method.
- * It contains the permissions that a particular identity has over an specific resource.
- * </p>
- *
- * @author <a href="mailto:sguilhen at redhat.com">Stefan Guilhen</a>
- */
-public class EntitlementEntry
-{
- private final Resource resource;
-
- private final ACLPermission permission;
-
- /**
- * <p>
- * Creates an instance of {@code EntitlementEntry} with the specified resource and permissions.
- * </p>
- *
- * @param resource a reference to the {@code Resource} object.
- * @param permission the permissions a particular identity has over the specified resource.
- */
- public EntitlementEntry(Resource resource, ACLPermission permission)
- {
- if(resource == null || permission == null)
- throw new IllegalArgumentException("Illegal null value for resource or permission");
- this.resource = resource;
- this.permission = permission;
- }
-
- public Resource getResource()
- {
- return this.resource;
- }
-
- public ACLPermission getPermission()
- {
- return this.permission;
- }
-
-}
Copied: projects/security/security-jboss-sx/tags/2.0.3.GA/acl/src/main/java/org/jboss/security/acl/EntitlementEntry.java (from rev 85320, projects/security/security-jboss-sx/branches/Branch_2_0/acl/src/main/java/org/jboss/security/acl/EntitlementEntry.java)
===================================================================
--- projects/security/security-jboss-sx/tags/2.0.3.GA/acl/src/main/java/org/jboss/security/acl/EntitlementEntry.java (rev 0)
+++ projects/security/security-jboss-sx/tags/2.0.3.GA/acl/src/main/java/org/jboss/security/acl/EntitlementEntry.java 2009-03-05 23:51:08 UTC (rev 85373)
@@ -0,0 +1,75 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.acl;
+
+import org.jboss.security.authorization.Resource;
+
+/**
+ * <p>
+ * This class represents a standard entry in the collection returned by the {@code ACLProvider.getEntitlements} method.
+ * It contains the permissions that a particular identity or role has over an specific resource.
+ * </p>
+ *
+ * @author <a href="mailto:sguilhen at redhat.com">Stefan Guilhen</a>
+ */
+public class EntitlementEntry
+{
+ private final Resource resource;
+
+ private final ACLPermission permission;
+
+ private final String identityOrRole;
+
+ /**
+ * <p>
+ * Creates an instance of {@code EntitlementEntry} with the specified resource and permissions.
+ * </p>
+ *
+ * @param resource a reference to the {@code Resource} object.
+ * @param permission the permissions a particular identity has over the specified resource.
+ * @param identityOrRole a {@code String} containing the name of the identity or the role.
+ */
+ public EntitlementEntry(Resource resource, ACLPermission permission, String identityOrRole)
+ {
+ if(resource == null || permission == null)
+ throw new IllegalArgumentException("Illegal null value for resource or permission");
+ this.resource = resource;
+ this.permission = permission;
+ this.identityOrRole = identityOrRole;
+ }
+
+ public Resource getResource()
+ {
+ return this.resource;
+ }
+
+ public ACLPermission getPermission()
+ {
+ return this.permission;
+ }
+
+ public String getIdentityOrRole()
+ {
+ return this.identityOrRole;
+ }
+
+}
Copied: projects/security/security-jboss-sx/tags/2.0.3.GA/acl/src/main/java/org/jboss/security/acl/RoleBasedACLProviderImpl.java (from rev 85320, projects/security/security-jboss-sx/branches/Branch_2_0/acl/src/main/java/org/jboss/security/acl/RoleBasedACLProviderImpl.java)
===================================================================
--- projects/security/security-jboss-sx/tags/2.0.3.GA/acl/src/main/java/org/jboss/security/acl/RoleBasedACLProviderImpl.java (rev 0)
+++ projects/security/security-jboss-sx/tags/2.0.3.GA/acl/src/main/java/org/jboss/security/acl/RoleBasedACLProviderImpl.java 2009-03-05 23:51:08 UTC (rev 85373)
@@ -0,0 +1,133 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.acl;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.jboss.security.authorization.AuthorizationException;
+import org.jboss.security.authorization.Resource;
+import org.jboss.security.identity.Identity;
+import org.jboss.security.identity.Role;
+import org.jboss.security.identity.RoleGroup;
+
+/**
+ * <p>
+ * Implementation of {@code ACLProvider} that uses the identity roles when checking if access to a protected resource
+ * should be granted or not. If no roles are associated with the specified identity, then the default implementation,
+ * which is based on the identity name, is used. Otherwise, {@code #isAccessGranted()} iterates over the roles and if
+ * one of the roles has sufficient permissions, then access is granted.
+ * </p>
+ *
+ * @author <a href="mailto:sguilhen at redhat.com">Stefan Guilhen</a>
+ */
+public class RoleBasedACLProviderImpl extends ACLProviderImpl
+{
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public <T> Set<T> getEntitlements(Class<T> clazz, Resource resource, Identity identity)
+ throws AuthorizationException
+ {
+ if (identity.getRole() == null)
+ return super.getEntitlements(clazz, resource, identity);
+
+ // currently we only provide sets of EntitlementEntry objects.
+ if (!EntitlementEntry.class.equals(clazz))
+ return null;
+
+ Set<EntitlementEntry> entitlements = new HashSet<EntitlementEntry>();
+ // fill the entitlements for each role.
+ List<Role> roles = new ArrayList<Role>();
+ this.getAllRoles(identity.getRole(), roles);
+
+ for (Role role : roles)
+ {
+ // get the initial permissions - those that apply to the specified resource.
+ ACLPermission permission = super.getInitialPermissions(resource, role.getRoleName());
+ if (permission != null)
+ super.fillEntitlements(entitlements, resource, role.getRoleName(), permission);
+ }
+ return (Set<T>) entitlements;
+ }
+
+ /**
+ * <p>
+ * This method overrides the default implementation to use roles instead of the identity name when checking for
+ * permissions. If the specified identity has one or more roles associated with it, this implementation will use
+ * these roles to check if the identity should be granted access to the resource or not.
+ * </p>
+ */
+ @Override
+ public boolean isAccessGranted(Resource resource, Identity identity, ACLPermission permission)
+ throws AuthorizationException
+ {
+ // if there are no roles associated with the identity, use the default implementation
+ if (identity.getRole() == null)
+ return super.isAccessGranted(resource, identity, permission);
+
+ if (super.strategy != null)
+ {
+ ACL acl = strategy.getACL(resource);
+ if (acl != null)
+ {
+ // check if any of the identity's roles has access to the resource.
+ List<Role> roles = new ArrayList<Role>();
+ this.getAllRoles(identity.getRole(), roles);
+
+ for (Role role : roles)
+ {
+ ACLEntry entry = acl.getEntry(role.getRoleName());
+ if (entry != null && entry.checkPermission(permission))
+ return true;
+ }
+ return false;
+ }
+ else
+ throw new AuthorizationException("Unable to locate an ACL for the resource " + resource);
+ }
+ throw new AuthorizationException("Unable to retrieve ACL: persistece strategy not set");
+ }
+
+ /**
+ * <p>
+ * This method traverses the role tree that has the specified root role and puts all simple (i.e. not an instance of
+ * RoleGroup) roles into the specified roles list.
+ * </p>
+ *
+ * @param role the root of the role tree.
+ * @param roles the {@code List<Role>} that contains the simple roles of the tree.
+ */
+ protected void getAllRoles(Role role, List<Role> roles)
+ {
+ if (role instanceof RoleGroup)
+ {
+ RoleGroup group = (RoleGroup) role;
+ for (Role nestedRole : group.getRoles())
+ getAllRoles(nestedRole, roles);
+ }
+ else
+ roles.add(role);
+ }
+}
Deleted: projects/security/security-jboss-sx/tags/2.0.3.GA/acl/src/tests/java/org/jboss/test/security/acl/PersistenceTestCase.java
===================================================================
--- projects/security/security-jboss-sx/branches/Branch_2_0/acl/src/tests/java/org/jboss/test/security/acl/PersistenceTestCase.java 2009-03-03 17:42:05 UTC (rev 85172)
+++ projects/security/security-jboss-sx/tags/2.0.3.GA/acl/src/tests/java/org/jboss/test/security/acl/PersistenceTestCase.java 2009-03-05 23:51:08 UTC (rev 85373)
@@ -1,344 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.test.security.acl;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.persistence.EntityManager;
-import javax.persistence.EntityManagerFactory;
-import javax.persistence.EntityTransaction;
-import javax.persistence.Persistence;
-
-import junit.framework.TestCase;
-
-import org.jboss.security.acl.ACL;
-import org.jboss.security.acl.ACLEntry;
-import org.jboss.security.acl.ACLEntryImpl;
-import org.jboss.security.acl.ACLImpl;
-import org.jboss.security.acl.BasicACLPermission;
-import org.jboss.security.acl.CompositeACLPermission;
-import org.jboss.security.acl.Util;
-import org.jboss.security.identity.plugins.IdentityFactory;
-
-/**
- * <p>
- * This {@code TestCase} tests the functionality of the persistence layer added to the {@code ACL} implementation classes.
- * It uses an in-memory hsql test database, so there is no need to perform any special database cleanup in case one of the
- * tests fail. Every time the tests are run a clean new database is used.
- * </p>
- *
- * @author <a href="mailto:sguilhen at redhat.com">Stefan Guilhen</a>
- */
-public class PersistenceTestCase extends TestCase
-{
- private EntityManagerFactory entityManagerFactory;
-
- private EntityManager entityManager;
-
- private List<ACLEntryImpl> persistedEntries;
-
- private List<ACLImpl> persistedACLs;
-
- /*
- * (non-Javadoc)
- * @see junit.framework.TestCase#setUp()
- */
- @Override
- protected void setUp() throws Exception
- {
- this.entityManagerFactory = Persistence.createEntityManagerFactory("ACL");
- this.entityManager = entityManagerFactory.createEntityManager();
- this.persistedACLs = new ArrayList<ACLImpl>();
- this.persistedEntries = new ArrayList<ACLEntryImpl>();
-
- // create the test entries.
- this.persistedEntries
- .add(new ACLEntryImpl(BasicACLPermission.READ, IdentityFactory.createIdentity("Identity-1")));
- this.persistedEntries.add(new ACLEntryImpl(new CompositeACLPermission(BasicACLPermission.CREATE,
- BasicACLPermission.READ), IdentityFactory.createIdentity("Identity-2")));
- this.persistedEntries.add(new ACLEntryImpl(new CompositeACLPermission(BasicACLPermission.values()),
- IdentityFactory.createIdentity("Identity-3")));
-
- // create the test acls.
- this.persistedACLs.add(new ACLImpl(new TestResource(100, "Resource-1")));
- this.persistedACLs.add(new ACLImpl(new TestResource(200, "Resource-2"), new ArrayList<ACLEntry>(
- this.persistedEntries)));
-
- // persist everything.
- for (ACL acl : this.persistedACLs)
- this.persistEntity(acl);
- }
-
- /*
- * (non-Javadoc)
- * @see junit.framework.TestCase#tearDown()
- */
- @Override
- protected void tearDown() throws Exception
- {
- // remove the persisted entities - removing the acl also removes the entries.
- for (ACLImpl acl : this.persistedACLs)
- {
- // re-attach the acl before removing.
- ACLImpl attachedACL = this.entityManager.find(ACLImpl.class, acl.getACLId());
- this.removeEntity(attachedACL);
- }
-
- // assert the acls have been removed.
- for (ACLImpl acl : this.persistedACLs)
- assertNull(this.entityManager.find(ACLImpl.class, acl.getACLId()));
-
- // assert the entries have been also removed.
- for (ACLEntryImpl entry : this.persistedEntries)
- assertNull(this.entityManager.find(ACLEntryImpl.class, entry.getACLEntryId()));
-
- if (this.entityManager != null)
- entityManager.close();
- this.entityManagerFactory.close();
- }
-
- /**
- * <p>
- * Tests persisting the {@code ACLEntry} objects to a database.
- * </p>
- *
- * @throws Exception if an error occurs when running the test.
- */
- public void testPersistACLEntry() throws Exception
- {
- // assert the entries have been created by checking if the auto-generated id has been set on each entry.
- assertTrue("Entry1 id value has not been generated", this.persistedEntries.get(0).getACLEntryId() > 0);
- assertTrue("Entry2 id value has not been generated", this.persistedEntries.get(1).getACLEntryId() > 0);
- assertTrue("Entry3 id value has not been generated", this.persistedEntries.get(2).getACLEntryId() > 0);
-
- }
-
- /**
- * <p>
- * Tests searching for the persisted {@code ACLEntry} objects.
- * </p>
- *
- * @throws Exception if an error occurs when running the test.
- */
- public void testSearchACLEntry() throws Exception
- {
- // clear the entity manager so that it goes to the database when searching for entries.
- this.entityManager.clear();
-
- // load the entries from the database using their primary key and validate them.
- for (ACLEntryImpl entry : this.persistedEntries)
- {
- ACLEntryImpl loadedEntry = this.entityManager.find(ACLEntryImpl.class, entry.getACLEntryId());
- assertNotNull("Entry could not be retrieved by primary key", loadedEntry);
- assertEquals(entry, loadedEntry);
- }
-
- // execute some queries and validate the results.
- ACLEntryImpl entry = this.persistedEntries.get(1);
- ACLEntryImpl queryResult = (ACLEntryImpl) this.entityManager.createQuery(
- "SELECT e FROM ACLEntryImpl e WHERE e.identityString LIKE '"
- + Util.getIdentityAsString(entry.getIdentity()) + "'").getSingleResult();
- assertNotNull("Entry2 could not be retrieved by it's identity", queryResult);
- assertEquals(entry, queryResult);
-
- entry = this.persistedEntries.get(0);
- queryResult = (ACLEntryImpl) this.entityManager.createQuery(
- "SELECT e FROM ACLEntryImpl e WHERE e.bitMask = " + BasicACLPermission.READ.getMaskValue())
- .getSingleResult();
- assertNotNull("Entry1 could not be retrieved by it's bitmask value", queryResult);
- assertEquals(entry, queryResult);
- }
-
- /**
- * <p>
- * Tests persisting the {@code ACL} objects to a database.
- * </p>
- *
- * @throws Exception if an error occurs when running the test.
- */
- public void testPersistACL() throws Exception
- {
- // assert the ACLs and their associated entries have been persisted
- for (ACLImpl acl : this.persistedACLs)
- {
- assertTrue("ACL id value has not been generated", acl.getACLId() > 0);
- for (ACLEntry entry : acl.getEntries())
- assertTrue("ACL entry has not been persisted", ((ACLEntryImpl) entry).getACLEntryId() > 0);
- }
- }
-
- /**
- * <p>
- * Tests searching for the persisted {@code ACL} objects.
- * </p>
- *
- * @throws Exception if an error occurs when running the test.
- */
- public void testSearchACL() throws Exception
- {
- // clear the entity manager's cache.
- this.entityManager.clear();
-
- // load the ACLs from the database using their primary key and validate them.
- ACLImpl loadedACL1 = this.entityManager.find(ACLImpl.class, this.persistedACLs.get(0).getACLId());
- assertNotNull("ACL1 could not be retrieved", loadedACL1);
- assertEquals("Loaded ACL contains unexpected number of entries", 0, loadedACL1.getEntries().size());
- assertNull(loadedACL1.getResource());
-
- ACLImpl loadedACL2 = this.entityManager.find(ACLImpl.class, this.persistedACLs.get(1).getACLId());
- assertNotNull("ACL2 could not be retrieved", loadedACL2);
- assertEquals("Loaded ACL contains unexpected number of entries", 3, loadedACL2.getEntries().size());
- assertTrue(loadedACL2.getEntries().contains(this.persistedEntries.get(0)));
- assertTrue(loadedACL2.getEntries().contains(this.persistedEntries.get(1)));
- assertTrue(loadedACL2.getEntries().contains(this.persistedEntries.get(2)));
- assertNull(loadedACL2.getResource());
-
- // find the ACLs using the resource and validate the result.
- ACLImpl acl = this.persistedACLs.get(0);
- ACLImpl queryResult = (ACLImpl) this.entityManager.createQuery(
- "SELECT a FROM ACLImpl a WHERE a.resourceAsString LIKE '" + Util.getResourceAsString(acl.getResource())
- + "'").getSingleResult();
- assertNotNull("ACL1 could not be retrieved by it's resource", queryResult);
- assertEquals("Queried ACL id does not match the expected id", acl.getACLId(), queryResult.getACLId());
- assertEquals("Queried ACL contains unexpected number of entries", 0, queryResult.getEntries().size());
-
- acl = this.persistedACLs.get(1);
- queryResult = (ACLImpl) this.entityManager.createQuery(
- "SELECT a FROM ACLImpl a WHERE a.resourceAsString LIKE '" + Util.getResourceAsString(acl.getResource())
- + "'").getSingleResult();
- assertNotNull("ACL2 could not be retrieved by it's resource", queryResult);
- assertEquals("Queried ACL id does not match the expected id", acl.getACLId(), queryResult.getACLId());
- assertEquals("Queried ACL contains unexpected number of entries", 3, queryResult.getEntries().size());
- assertTrue(queryResult.getEntries().contains(this.persistedEntries.get(0)));
- assertTrue(queryResult.getEntries().contains(this.persistedEntries.get(1)));
- assertTrue(queryResult.getEntries().contains(this.persistedEntries.get(2)));
-
- }
-
- /**
- * <p>
- * Tests updating the persisted {@code ACL} objects.
- * </p>
- *
- * @throws Exception if an error occurs when running the test.
- */
- public void testUpdateACL() throws Exception
- {
- // add some entries to the acls and remove one of the existing entries from ACL2.
- ACLEntryImpl entry4 = new ACLEntryImpl(BasicACLPermission.CREATE, IdentityFactory.createIdentity("Identity-4"));
- ACLEntryImpl entry5 = new ACLEntryImpl(new CompositeACLPermission(BasicACLPermission.CREATE,
- BasicACLPermission.DELETE), IdentityFactory.createIdentity("Identity-5"));
- ACLEntryImpl entry6 = new ACLEntryImpl(new CompositeACLPermission(BasicACLPermission.values()), IdentityFactory
- .createIdentity("Identity-6"));
-
- ACLImpl acl1 = null;
- ACLImpl acl2 = null;
- EntityTransaction transaction = this.entityManager.getTransaction();
- transaction.begin();
- try
- {
- acl1 = this.entityManager.merge(this.persistedACLs.get(0));
- acl1.addEntry(entry4);
- acl1.addEntry(entry5);
-
- acl2 = this.entityManager.merge(this.persistedACLs.get(1));
- acl2.addEntry(entry6);
- acl2.removeEntry(this.persistedEntries.get(0));
- transaction.commit();
- }
- catch (RuntimeException re)
- {
- re.printStackTrace();
- transaction.rollback();
- }
-
- // add the new entries to the persisted entries collection.
- this.persistedEntries.add(entry4);
- this.persistedEntries.add(entry5);
- this.persistedEntries.add(entry6);
-
- // clear the entity manager's cache.
- this.entityManager.clear();
-
- // load the ACLs again and validate the changes.
- ACLImpl loadedACL1 = this.entityManager.find(ACLImpl.class, acl1.getACLId());
- assertNotNull("ACL1 could not be retrieved", loadedACL1);
- assertEquals("Loaded ACL contains unexpected number of entries", 2, loadedACL1.getEntries().size());
- assertTrue(loadedACL1.getEntries().contains(entry4));
- assertTrue(loadedACL1.getEntries().contains(entry5));
-
- ACLImpl loadedACL2 = this.entityManager.find(ACLImpl.class, acl2.getACLId());
- assertNotNull("ACL2 could not be retrieved", loadedACL2);
- assertEquals("Loaded AC2 contains unexpected number of entries", 3, loadedACL2.getEntries().size());
- assertFalse(loadedACL2.getEntries().contains(this.persistedEntries.get(0)));
- assertTrue(loadedACL2.getEntries().contains(this.persistedEntries.get(1)));
- assertTrue(loadedACL2.getEntries().contains(this.persistedEntries.get(2)));
- assertTrue(loadedACL2.getEntries().contains(entry6));
- }
-
- /**
- * <p>
- * Persists the specified entity to the database.
- * </p>
- *
- * @param entity an {@code Object} representing the entity to be persisted.
- */
- private void persistEntity(Object entity)
- {
- EntityTransaction transaction = this.entityManager.getTransaction();
- transaction.begin();
- try
- {
- this.entityManager.persist(entity);
- transaction.commit();
- }
- catch (RuntimeException re)
- {
- re.printStackTrace();
- transaction.rollback();
- }
- }
-
- /**
- * <p>
- * Removes the specified entity from the database.
- * </p>
- *
- * @param entity an {@code Object} representing the entity to be removed.
- */
- private void removeEntity(Object entity)
- {
- EntityTransaction transaction = this.entityManager.getTransaction();
- transaction.begin();
- try
- {
- this.entityManager.remove(entity);
- transaction.commit();
- }
- catch (RuntimeException re)
- {
- re.printStackTrace();
- transaction.rollback();
- }
- }
-}
Copied: projects/security/security-jboss-sx/tags/2.0.3.GA/acl/src/tests/java/org/jboss/test/security/acl/PersistenceTestCase.java (from rev 85320, projects/security/security-jboss-sx/branches/Branch_2_0/acl/src/tests/java/org/jboss/test/security/acl/PersistenceTestCase.java)
===================================================================
--- projects/security/security-jboss-sx/tags/2.0.3.GA/acl/src/tests/java/org/jboss/test/security/acl/PersistenceTestCase.java (rev 0)
+++ projects/security/security-jboss-sx/tags/2.0.3.GA/acl/src/tests/java/org/jboss/test/security/acl/PersistenceTestCase.java 2009-03-05 23:51:08 UTC (rev 85373)
@@ -0,0 +1,346 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.test.security.acl;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.persistence.EntityManager;
+import javax.persistence.EntityManagerFactory;
+import javax.persistence.EntityTransaction;
+import javax.persistence.Persistence;
+
+import junit.framework.TestCase;
+
+import org.jboss.security.acl.ACL;
+import org.jboss.security.acl.ACLEntry;
+import org.jboss.security.acl.ACLEntryImpl;
+import org.jboss.security.acl.ACLImpl;
+import org.jboss.security.acl.BasicACLPermission;
+import org.jboss.security.acl.CompositeACLPermission;
+import org.jboss.security.acl.Util;
+import org.jboss.security.identity.plugins.IdentityFactory;
+
+/**
+ * <p>
+ * This {@code TestCase} tests the functionality of the persistence layer added to the {@code ACL} implementation
+ * classes. It uses an in-memory hsql test database, so there is no need to perform any special database cleanup in case
+ * one of the tests fail. Every time the tests are run a clean new database is used.
+ * </p>
+ *
+ * @author <a href="mailto:sguilhen at redhat.com">Stefan Guilhen</a>
+ */
+public class PersistenceTestCase extends TestCase
+{
+ private EntityManagerFactory entityManagerFactory;
+
+ private EntityManager entityManager;
+
+ private List<ACLEntryImpl> persistedEntries;
+
+ private List<ACLImpl> persistedACLs;
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see junit.framework.TestCase#setUp()
+ */
+ @Override
+ protected void setUp() throws Exception
+ {
+ this.entityManagerFactory = Persistence.createEntityManagerFactory("ACL");
+ this.entityManager = entityManagerFactory.createEntityManager();
+ this.persistedACLs = new ArrayList<ACLImpl>();
+ this.persistedEntries = new ArrayList<ACLEntryImpl>();
+
+ // create the test entries.
+ this.persistedEntries
+ .add(new ACLEntryImpl(BasicACLPermission.READ, IdentityFactory.createIdentity("Identity-1")));
+ this.persistedEntries.add(new ACLEntryImpl(new CompositeACLPermission(BasicACLPermission.CREATE,
+ BasicACLPermission.READ), IdentityFactory.createIdentity("Identity-2")));
+ this.persistedEntries.add(new ACLEntryImpl(new CompositeACLPermission(BasicACLPermission.values()),
+ IdentityFactory.createIdentity("Identity-3")));
+
+ // create the test acls.
+ this.persistedACLs.add(new ACLImpl(new TestResource(100, "Resource-1")));
+ this.persistedACLs.add(new ACLImpl(new TestResource(200, "Resource-2"), new ArrayList<ACLEntry>(
+ this.persistedEntries)));
+
+ // persist everything.
+ for (ACL acl : this.persistedACLs)
+ this.persistEntity(acl);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see junit.framework.TestCase#tearDown()
+ */
+ @Override
+ protected void tearDown() throws Exception
+ {
+ // remove the persisted entities - removing the acl also removes the entries.
+ for (ACLImpl acl : this.persistedACLs)
+ {
+ // re-attach the acl before removing.
+ ACLImpl attachedACL = this.entityManager.find(ACLImpl.class, acl.getACLId());
+ this.removeEntity(attachedACL);
+ }
+
+ // assert the acls have been removed.
+ for (ACLImpl acl : this.persistedACLs)
+ assertNull(this.entityManager.find(ACLImpl.class, acl.getACLId()));
+
+ // assert the entries have been also removed.
+ for (ACLEntryImpl entry : this.persistedEntries)
+ assertNull(this.entityManager.find(ACLEntryImpl.class, entry.getACLEntryId()));
+
+ if (this.entityManager != null)
+ entityManager.close();
+ this.entityManagerFactory.close();
+ }
+
+ /**
+ * <p>
+ * Tests persisting the {@code ACLEntry} objects to a database.
+ * </p>
+ *
+ * @throws Exception if an error occurs when running the test.
+ */
+ public void testPersistACLEntry() throws Exception
+ {
+ // assert the entries have been created by checking if the auto-generated id has been set on each entry.
+ assertTrue("Entry1 id value has not been generated", this.persistedEntries.get(0).getACLEntryId() > 0);
+ assertTrue("Entry2 id value has not been generated", this.persistedEntries.get(1).getACLEntryId() > 0);
+ assertTrue("Entry3 id value has not been generated", this.persistedEntries.get(2).getACLEntryId() > 0);
+
+ }
+
+ /**
+ * <p>
+ * Tests searching for the persisted {@code ACLEntry} objects.
+ * </p>
+ *
+ * @throws Exception if an error occurs when running the test.
+ */
+ public void testSearchACLEntry() throws Exception
+ {
+ // clear the entity manager so that it goes to the database when searching for entries.
+ this.entityManager.clear();
+
+ // load the entries from the database using their primary key and validate them.
+ for (ACLEntryImpl entry : this.persistedEntries)
+ {
+ ACLEntryImpl loadedEntry = this.entityManager.find(ACLEntryImpl.class, entry.getACLEntryId());
+ assertNotNull("Entry could not be retrieved by primary key", loadedEntry);
+ assertEquals(entry, loadedEntry);
+ }
+
+ // execute some queries and validate the results.
+ ACLEntryImpl entry = this.persistedEntries.get(1);
+ ACLEntryImpl queryResult = (ACLEntryImpl) this.entityManager.createQuery(
+ "SELECT e FROM ACLEntryImpl e WHERE e.identityOrRole LIKE '"
+ + entry.getIdentityOrRole() + "'").getSingleResult();
+ assertNotNull("Entry2 could not be retrieved by it's identity", queryResult);
+ assertEquals(entry, queryResult);
+
+ entry = this.persistedEntries.get(0);
+ queryResult = (ACLEntryImpl) this.entityManager.createQuery(
+ "SELECT e FROM ACLEntryImpl e WHERE e.bitMask = " + BasicACLPermission.READ.getMaskValue())
+ .getSingleResult();
+ assertNotNull("Entry1 could not be retrieved by it's bitmask value", queryResult);
+ assertEquals(entry, queryResult);
+ }
+
+ /**
+ * <p>
+ * Tests persisting the {@code ACL} objects to a database.
+ * </p>
+ *
+ * @throws Exception if an error occurs when running the test.
+ */
+ public void testPersistACL() throws Exception
+ {
+ // assert the ACLs and their associated entries have been persisted
+ for (ACLImpl acl : this.persistedACLs)
+ {
+ assertTrue("ACL id value has not been generated", acl.getACLId() > 0);
+ for (ACLEntry entry : acl.getEntries())
+ assertTrue("ACL entry has not been persisted", ((ACLEntryImpl) entry).getACLEntryId() > 0);
+ }
+ }
+
+ /**
+ * <p>
+ * Tests searching for the persisted {@code ACL} objects.
+ * </p>
+ *
+ * @throws Exception if an error occurs when running the test.
+ */
+ public void testSearchACL() throws Exception
+ {
+ // clear the entity manager's cache.
+ this.entityManager.clear();
+
+ // load the ACLs from the database using their primary key and validate them.
+ ACLImpl loadedACL1 = this.entityManager.find(ACLImpl.class, this.persistedACLs.get(0).getACLId());
+ assertNotNull("ACL1 could not be retrieved", loadedACL1);
+ assertEquals("Loaded ACL contains unexpected number of entries", 0, loadedACL1.getEntries().size());
+ assertNull(loadedACL1.getResource());
+
+ ACLImpl loadedACL2 = this.entityManager.find(ACLImpl.class, this.persistedACLs.get(1).getACLId());
+ assertNotNull("ACL2 could not be retrieved", loadedACL2);
+ assertEquals("Loaded ACL contains unexpected number of entries", 3, loadedACL2.getEntries().size());
+ assertTrue(loadedACL2.getEntries().contains(this.persistedEntries.get(0)));
+ assertTrue(loadedACL2.getEntries().contains(this.persistedEntries.get(1)));
+ assertTrue(loadedACL2.getEntries().contains(this.persistedEntries.get(2)));
+ assertNull(loadedACL2.getResource());
+
+ // find the ACLs using the resource and validate the result.
+ ACLImpl acl = this.persistedACLs.get(0);
+ ACLImpl queryResult = (ACLImpl) this.entityManager.createQuery(
+ "SELECT a FROM ACLImpl a WHERE a.resourceAsString LIKE '" + Util.getResourceAsString(acl.getResource())
+ + "'").getSingleResult();
+ assertNotNull("ACL1 could not be retrieved by it's resource", queryResult);
+ assertEquals("Queried ACL id does not match the expected id", acl.getACLId(), queryResult.getACLId());
+ assertEquals("Queried ACL contains unexpected number of entries", 0, queryResult.getEntries().size());
+
+ acl = this.persistedACLs.get(1);
+ queryResult = (ACLImpl) this.entityManager.createQuery(
+ "SELECT a FROM ACLImpl a WHERE a.resourceAsString LIKE '" + Util.getResourceAsString(acl.getResource())
+ + "'").getSingleResult();
+ assertNotNull("ACL2 could not be retrieved by it's resource", queryResult);
+ assertEquals("Queried ACL id does not match the expected id", acl.getACLId(), queryResult.getACLId());
+ assertEquals("Queried ACL contains unexpected number of entries", 3, queryResult.getEntries().size());
+ assertTrue(queryResult.getEntries().contains(this.persistedEntries.get(0)));
+ assertTrue(queryResult.getEntries().contains(this.persistedEntries.get(1)));
+ assertTrue(queryResult.getEntries().contains(this.persistedEntries.get(2)));
+
+ }
+
+ /**
+ * <p>
+ * Tests updating the persisted {@code ACL} objects.
+ * </p>
+ *
+ * @throws Exception if an error occurs when running the test.
+ */
+ public void testUpdateACL() throws Exception
+ {
+ // add some entries to the acls and remove one of the existing entries from ACL2.
+ ACLEntryImpl entry4 = new ACLEntryImpl(BasicACLPermission.CREATE, IdentityFactory.createIdentity("Identity-4"));
+ ACLEntryImpl entry5 = new ACLEntryImpl(new CompositeACLPermission(BasicACLPermission.CREATE,
+ BasicACLPermission.DELETE), IdentityFactory.createIdentity("Identity-5"));
+ ACLEntryImpl entry6 = new ACLEntryImpl(new CompositeACLPermission(BasicACLPermission.values()), IdentityFactory
+ .createIdentity("Identity-6"));
+
+ ACLImpl acl1 = null;
+ ACLImpl acl2 = null;
+ EntityTransaction transaction = this.entityManager.getTransaction();
+ transaction.begin();
+ try
+ {
+ acl1 = this.entityManager.merge(this.persistedACLs.get(0));
+ acl1.addEntry(entry4);
+ acl1.addEntry(entry5);
+
+ acl2 = this.entityManager.merge(this.persistedACLs.get(1));
+ acl2.addEntry(entry6);
+ acl2.removeEntry(this.persistedEntries.get(0));
+ transaction.commit();
+ }
+ catch (RuntimeException re)
+ {
+ re.printStackTrace();
+ transaction.rollback();
+ }
+
+ // add the new entries to the persisted entries collection.
+ this.persistedEntries.add(entry4);
+ this.persistedEntries.add(entry5);
+ this.persistedEntries.add(entry6);
+
+ // clear the entity manager's cache.
+ this.entityManager.clear();
+
+ // load the ACLs again and validate the changes.
+ ACLImpl loadedACL1 = this.entityManager.find(ACLImpl.class, acl1.getACLId());
+ assertNotNull("ACL1 could not be retrieved", loadedACL1);
+ assertEquals("Loaded ACL contains unexpected number of entries", 2, loadedACL1.getEntries().size());
+ assertTrue(loadedACL1.getEntries().contains(entry4));
+ assertTrue(loadedACL1.getEntries().contains(entry5));
+
+ ACLImpl loadedACL2 = this.entityManager.find(ACLImpl.class, acl2.getACLId());
+ assertNotNull("ACL2 could not be retrieved", loadedACL2);
+ assertEquals("Loaded AC2 contains unexpected number of entries", 3, loadedACL2.getEntries().size());
+ assertFalse(loadedACL2.getEntries().contains(this.persistedEntries.get(0)));
+ assertTrue(loadedACL2.getEntries().contains(this.persistedEntries.get(1)));
+ assertTrue(loadedACL2.getEntries().contains(this.persistedEntries.get(2)));
+ assertTrue(loadedACL2.getEntries().contains(entry6));
+ }
+
+ /**
+ * <p>
+ * Persists the specified entity to the database.
+ * </p>
+ *
+ * @param entity an {@code Object} representing the entity to be persisted.
+ */
+ private void persistEntity(Object entity)
+ {
+ EntityTransaction transaction = this.entityManager.getTransaction();
+ transaction.begin();
+ try
+ {
+ this.entityManager.persist(entity);
+ transaction.commit();
+ }
+ catch (RuntimeException re)
+ {
+ re.printStackTrace();
+ transaction.rollback();
+ }
+ }
+
+ /**
+ * <p>
+ * Removes the specified entity from the database.
+ * </p>
+ *
+ * @param entity an {@code Object} representing the entity to be removed.
+ */
+ private void removeEntity(Object entity)
+ {
+ EntityTransaction transaction = this.entityManager.getTransaction();
+ transaction.begin();
+ try
+ {
+ this.entityManager.remove(entity);
+ transaction.commit();
+ }
+ catch (RuntimeException re)
+ {
+ re.printStackTrace();
+ transaction.rollback();
+ }
+ }
+}
Copied: projects/security/security-jboss-sx/tags/2.0.3.GA/acl/src/tests/java/org/jboss/test/security/acl/RoleBasedACLProviderUnitTestCase.java (from rev 85320, projects/security/security-jboss-sx/branches/Branch_2_0/acl/src/tests/java/org/jboss/test/security/acl/RoleBasedACLProviderUnitTestCase.java)
===================================================================
--- projects/security/security-jboss-sx/tags/2.0.3.GA/acl/src/tests/java/org/jboss/test/security/acl/RoleBasedACLProviderUnitTestCase.java (rev 0)
+++ projects/security/security-jboss-sx/tags/2.0.3.GA/acl/src/tests/java/org/jboss/test/security/acl/RoleBasedACLProviderUnitTestCase.java 2009-03-05 23:51:08 UTC (rev 85373)
@@ -0,0 +1,125 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.test.security.acl;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import junit.framework.TestCase;
+
+import org.jboss.security.acl.ACLEntry;
+import org.jboss.security.acl.ACLEntryImpl;
+import org.jboss.security.acl.ACLPersistenceStrategy;
+import org.jboss.security.acl.ACLProvider;
+import org.jboss.security.acl.BasicACLPermission;
+import org.jboss.security.acl.CompositeACLPermission;
+import org.jboss.security.acl.JPAPersistenceStrategy;
+import org.jboss.security.acl.RoleBasedACLProviderImpl;
+import org.jboss.security.authorization.Resource;
+import org.jboss.security.identity.Identity;
+import org.jboss.security.identity.Role;
+import org.jboss.security.identity.RoleFactory;
+import org.jboss.security.identity.RoleGroup;
+import org.jboss.security.identity.plugins.IdentityFactory;
+
+/**
+ * <p>
+ * This {@code TestCase} tests the functionality implemented by the {@code RoleBasedACLProviderImpl} class.
+ * </p>
+ *
+ * @author <a href="mailto:sguilhen at redhat.com">Stefan Guilhen</a>
+ */
+public class RoleBasedACLProviderUnitTestCase extends TestCase
+{
+
+ private Resource[] resources;
+
+ private Identity identity;
+
+ private final ACLPersistenceStrategy strategy = new JPAPersistenceStrategy();
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ // build the test resources.
+ this.resources = new Resource[2];
+ for (int i = 0; i < resources.length; i++)
+ resources[i] = new TestResource(i, "Test Resource " + i);
+
+ // Identity 'john' has two roles (role1 and role2).
+ Role role1 = RoleFactory.createRole("role1");
+ Role role2 = RoleFactory.createRole("role2");
+ RoleGroup roleGroup = RoleFactory.createRoleGroup("RoleGroup");
+ roleGroup.addRole(role1);
+ roleGroup.addRole(role2);
+ this.identity = IdentityFactory.createIdentityWithRole("john", roleGroup);
+
+ // create the ACLs for the resources.
+ ACLEntry entry1 = new ACLEntryImpl(BasicACLPermission.READ, "role1");
+ ACLEntry entry2 = new ACLEntryImpl(
+ new CompositeACLPermission(BasicACLPermission.READ, BasicACLPermission.UPDATE), "role2");
+ ACLEntry entry3 = new ACLEntryImpl(new CompositeACLPermission(BasicACLPermission.values()), "role3");
+ List<ACLEntry> entries = new ArrayList<ACLEntry>();
+ entries.add(entry1);
+ entries.add(entry2);
+ entries.add(entry3);
+ this.strategy.createACL(this.resources[0], entries);
+
+ // the second ACL uses the identity name.
+ entry1 = new ACLEntryImpl(BasicACLPermission.READ, "ritchie");
+ entry2 = new ACLEntryImpl(new CompositeACLPermission(BasicACLPermission.values()), "john");
+ entries = new ArrayList<ACLEntry>();
+ entries.add(entry1);
+ entries.add(entry2);
+ this.strategy.createACL(this.resources[1], entries);
+ }
+
+ /**
+ * <p>
+ * Tests the behavior of the {@code isAccessGranted} method, which uses the identity's roles to check whether
+ * access to the resource should be granted or not.
+ * </p>
+ *
+ * @throws Exception if an error occurs while running the test.
+ */
+ public void testACLProvider() throws Exception
+ {
+ // create the RoleBasedACLProvider instance.
+ ACLProvider provider = new RoleBasedACLProviderImpl();
+ provider.setPersistenceStrategy(this.strategy);
+
+ // as john has role 2, he should be able to update resource 0.
+ assertTrue(provider.isAccessGranted(this.resources[0], this.identity, BasicACLPermission.UPDATE));
+ // none of john's roles has DELETE permission, so he should not be able to delete resource 0.
+ assertFalse(provider.isAccessGranted(this.resources[0], this.identity, BasicACLPermission.DELETE));
+
+ // now create a new identity for john that has no roles. The role-based provider should now use the
+ // identity name (default impl) when checking for permissions.
+ Identity identity = IdentityFactory.createIdentity("john");
+ assertTrue(provider.isAccessGranted(this.resources[1], identity, new CompositeACLPermission(BasicACLPermission
+ .values())));
+ // access should be denied to resource 0, as that one has an ACL based on the roles.
+ assertFalse(provider.isAccessGranted(this.resources[0], identity, BasicACLPermission.READ));
+ }
+
+}
Deleted: projects/security/security-jboss-sx/tags/2.0.3.GA/assembly/pom.xml
===================================================================
--- projects/security/security-jboss-sx/branches/Branch_2_0/assembly/pom.xml 2009-03-03 17:42:05 UTC (rev 85172)
+++ projects/security/security-jboss-sx/tags/2.0.3.GA/assembly/pom.xml 2009-03-05 23:51:08 UTC (rev 85373)
@@ -1,62 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <groupId>org.jboss.security</groupId>
- <artifactId>jbosssx-parent</artifactId>
- <version>2.0.2-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.jboss.security</groupId>
- <artifactId>jbosssx</artifactId>
- <packaging>pom</packaging>
- <name>JBoss Security Implementation for the JBAS - Assembly</name>
- <url>http://labs.jboss.org/portal/jbosssecurity/</url>
- <description>JBoss Security is a cross cutting project that handles security for the JEMS projects</description>
- <licenses>
- <license>
- <name>lgpl</name>
- <url>http://repository.jboss.com/licenses/lgpl.txt</url>
- </license>
- </licenses>
- <organization>
- <name>JBoss Inc.</name>
- <url>http://www.jboss.org</url>
- </organization>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>2.1</version>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>attached</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <archive>
- <manifestEntries>
- <Specification-Title>JBoss Security Implementation for the JBAS</Specification-Title>
- <Specification-Version>${project.version}</Specification-Version>
- <Specification-Vendor>Red Hat Middleware LLC</Specification-Vendor>
- <Implementation-Title>JBoss Security Implementation for the JBAS</Implementation-Title>
- <Implementation-Version>${project.version}</Implementation-Version>
- <Implementation-VendorId>org.jboss.security</Implementation-VendorId>
- <Implementation-Vendor>Red Hat Middleware LLC</Implementation-Vendor>
- <Implementation-URL>http://labs.jboss.org/portal/jbosssecurity/</Implementation-URL>
- </manifestEntries>
- </archive>
- <descriptors>
- <descriptor>src/assembly/bin.xml</descriptor>
- <descriptor>src/assembly/sources.xml</descriptor>
- </descriptors>
- </configuration>
- <inherited>false</inherited>
- </plugin>
- </plugins>
- </build>
-
-</project>
Copied: projects/security/security-jboss-sx/tags/2.0.3.GA/assembly/pom.xml (from rev 85372, projects/security/security-jboss-sx/branches/Branch_2_0/assembly/pom.xml)
===================================================================
--- projects/security/security-jboss-sx/tags/2.0.3.GA/assembly/pom.xml (rev 0)
+++ projects/security/security-jboss-sx/tags/2.0.3.GA/assembly/pom.xml 2009-03-05 23:51:08 UTC (rev 85373)
@@ -0,0 +1,62 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jbosssx-parent</artifactId>
+ <version>2.0.3.GA</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jbosssx</artifactId>
+ <packaging>pom</packaging>
+ <name>JBoss Security Implementation for the JBAS - Assembly</name>
+ <url>http://labs.jboss.org/portal/jbosssecurity/</url>
+ <description>JBoss Security is a cross cutting project that handles security for the JEMS projects</description>
+ <licenses>
+ <license>
+ <name>lgpl</name>
+ <url>http://repository.jboss.com/licenses/lgpl.txt</url>
+ </license>
+ </licenses>
+ <organization>
+ <name>JBoss Inc.</name>
+ <url>http://www.jboss.org</url>
+ </organization>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.1</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>attached</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <archive>
+ <manifestEntries>
+ <Specification-Title>JBoss Security Implementation for the JBAS</Specification-Title>
+ <Specification-Version>${project.version}</Specification-Version>
+ <Specification-Vendor>Red Hat Middleware LLC</Specification-Vendor>
+ <Implementation-Title>JBoss Security Implementation for the JBAS</Implementation-Title>
+ <Implementation-Version>${project.version}</Implementation-Version>
+ <Implementation-VendorId>org.jboss.security</Implementation-VendorId>
+ <Implementation-Vendor>Red Hat Middleware LLC</Implementation-Vendor>
+ <Implementation-URL>http://labs.jboss.org/portal/jbosssecurity/</Implementation-URL>
+ </manifestEntries>
+ </archive>
+ <descriptors>
+ <descriptor>src/assembly/bin.xml</descriptor>
+ <descriptor>src/assembly/sources.xml</descriptor>
+ </descriptors>
+ </configuration>
+ <inherited>false</inherited>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Deleted: projects/security/security-jboss-sx/tags/2.0.3.GA/identity/pom.xml
===================================================================
--- projects/security/security-jboss-sx/branches/Branch_2_0/identity/pom.xml 2009-03-03 17:42:05 UTC (rev 85172)
+++ projects/security/security-jboss-sx/tags/2.0.3.GA/identity/pom.xml 2009-03-05 23:51:08 UTC (rev 85373)
@@ -1,86 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <groupId>org.jboss.security</groupId>
- <artifactId>jbosssx-parent</artifactId>
- <version>2.0.2-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>identity-impl</artifactId>
- <packaging>jar</packaging>
- <name>JBoss Security Identity Implementation</name>
- <url>http://labs.jboss.org/portal/jbosssecurity/</url>
- <description>JBoss Security is a cross cutting project that handles security for the JEMS projects</description>
- <licenses>
- <license>
- <name>lgpl</name>
- <url>http://repository.jboss.com/licenses/lgpl.txt</url>
- </license>
- </licenses>
- <organization>
- <name>JBoss Inc.</name>
- <url>http://www.jboss.org</url>
- </organization>
- <profiles>
- <!-- mvn install -Psecurity-manager -->
- <profile>
- <id>security-manager</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <properties>
- <test.env>-Dtest.basedir=${basedir}/target/test-classes</test.env>
- <policy.file>${basedir}/src/tests/resources/java.policy</policy.file>
- <surefire.jvm.args>-Djava.security.manager -Djava.security.policy=${policy.file} ${test.env}</surefire.jvm.args>
- </properties>
- </profile>
- <!-- mvn install -Psecurity-manager-debug -->
- <!-- Best Practice: mvn install -Psecurity-manager-debug 2>&1 > logfile2>&1 > logfile -->
- <profile>
- <id>security-manager-debug</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <properties>
- <test.env>-Dtest.basedir=${basedir}/target/test-classes</test.env>
- <policy.file>${basedir}/src/tests/resources/java.policy</policy.file>
- <surefire.jvm.args>-Djava.security.manager -Djava.security.policy=${policy.file} -Djava.security.debug=failure,access ${test.env}</surefire.jvm.args>
- </properties>
- </profile>
- </profiles>
- <build>
- <finalName>${artifactId}</finalName>
- <resources>
- <resource>
- <directory>src/main</directory>
- <includes>
- <include>**/*.xml</include>
- </includes>
- </resource>
- <resource>
- <directory>${basedir}</directory>
- <includes>
- <include>JBossORG-EULA.txt</include>
- </includes>
- </resource>
- <resource>
- <directory>src/resources</directory>
- <includes>
- <include>**/*.dtd</include>
- <include>**/*.xsd</include>
- </includes>
- </resource>
- </resources>
- </build>
- <dependencies>
- <dependency>
- <groupId>org.jboss.security</groupId>
- <artifactId>jboss-security-spi</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-</project>
Copied: projects/security/security-jboss-sx/tags/2.0.3.GA/identity/pom.xml (from rev 85372, projects/security/security-jboss-sx/branches/Branch_2_0/identity/pom.xml)
===================================================================
--- projects/security/security-jboss-sx/tags/2.0.3.GA/identity/pom.xml (rev 0)
+++ projects/security/security-jboss-sx/tags/2.0.3.GA/identity/pom.xml 2009-03-05 23:51:08 UTC (rev 85373)
@@ -0,0 +1,86 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jbosssx-parent</artifactId>
+ <version>2.0.3.GA</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>identity-impl</artifactId>
+ <packaging>jar</packaging>
+ <name>JBoss Security Identity Implementation</name>
+ <url>http://labs.jboss.org/portal/jbosssecurity/</url>
+ <description>JBoss Security is a cross cutting project that handles security for the JEMS projects</description>
+ <licenses>
+ <license>
+ <name>lgpl</name>
+ <url>http://repository.jboss.com/licenses/lgpl.txt</url>
+ </license>
+ </licenses>
+ <organization>
+ <name>JBoss Inc.</name>
+ <url>http://www.jboss.org</url>
+ </organization>
+ <profiles>
+ <!-- mvn install -Psecurity-manager -->
+ <profile>
+ <id>security-manager</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <properties>
+ <test.env>-Dtest.basedir=${basedir}/target/test-classes</test.env>
+ <policy.file>${basedir}/src/tests/resources/java.policy</policy.file>
+ <surefire.jvm.args>-Djava.security.manager -Djava.security.policy=${policy.file} ${test.env}</surefire.jvm.args>
+ </properties>
+ </profile>
+ <!-- mvn install -Psecurity-manager-debug -->
+ <!-- Best Practice: mvn install -Psecurity-manager-debug 2>&1 > logfile2>&1 > logfile -->
+ <profile>
+ <id>security-manager-debug</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <properties>
+ <test.env>-Dtest.basedir=${basedir}/target/test-classes</test.env>
+ <policy.file>${basedir}/src/tests/resources/java.policy</policy.file>
+ <surefire.jvm.args>-Djava.security.manager -Djava.security.policy=${policy.file} -Djava.security.debug=failure,access ${test.env}</surefire.jvm.args>
+ </properties>
+ </profile>
+ </profiles>
+ <build>
+ <finalName>${artifactId}</finalName>
+ <resources>
+ <resource>
+ <directory>src/main</directory>
+ <includes>
+ <include>**/*.xml</include>
+ </includes>
+ </resource>
+ <resource>
+ <directory>${basedir}</directory>
+ <includes>
+ <include>JBossORG-EULA.txt</include>
+ </includes>
+ </resource>
+ <resource>
+ <directory>src/resources</directory>
+ <includes>
+ <include>**/*.dtd</include>
+ <include>**/*.xsd</include>
+ </includes>
+ </resource>
+ </resources>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jboss-security-spi</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
Deleted: projects/security/security-jboss-sx/tags/2.0.3.GA/jbosssx/pom.xml
===================================================================
--- projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx/pom.xml 2009-03-03 17:42:05 UTC (rev 85172)
+++ projects/security/security-jboss-sx/tags/2.0.3.GA/jbosssx/pom.xml 2009-03-05 23:51:08 UTC (rev 85373)
@@ -1,172 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <groupId>org.jboss.security</groupId>
- <artifactId>jbosssx-parent</artifactId>
- <version>2.0.2-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>jbosssx-bare</artifactId>
- <packaging>jar</packaging>
- <name>JBoss Security Implementation for the JBAS</name>
- <url>http://labs.jboss.org/portal/jbosssecurity/</url>
- <description>JBoss Security is a cross cutting project that handles security for the JEMS projects</description>
- <licenses>
- <license>
- <name>lgpl</name>
- <url>http://repository.jboss.com/licenses/lgpl.txt</url>
- </license>
- </licenses>
- <organization>
- <name>JBoss Inc.</name>
- <url>http://www.jboss.org</url>
- </organization>
- <profiles>
- <!-- mvn install -Psecurity-manager -->
- <profile>
- <id>security-manager</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <properties>
- <test.env>-Dtest.basedir=${basedir}/target/test-classes</test.env>
- <policy.file>${basedir}/src/tests/resources/java.policy</policy.file>
- <surefire.jvm.args>-Djava.security.manager -Djava.security.policy=${policy.file} ${test.env}</surefire.jvm.args>
- </properties>
- </profile>
- <!-- mvn install -Psecurity-manager-debug -->
- <!-- Best Practice: mvn install -Psecurity-manager-debug 2>&1 > logfile2>&1 > logfile -->
- <profile>
- <id>security-manager-debug</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <properties>
- <test.env>-Dtest.basedir=${basedir}/target/test-classes</test.env>
- <policy.file>${basedir}/src/tests/resources/java.policy</policy.file>
- <surefire.jvm.args>-Djava.security.manager -Djava.security.policy=${policy.file} -Djava.security.debug=policy,failure,access ${test.env}</surefire.jvm.args>
- </properties>
- </profile>
- </profiles>
- <build>
- <finalName>${artifactId}</finalName>
- <resources>
- <resource>
- <directory>src/main/java</directory>
- <includes>
- <include>**/*.xml</include>
- </includes>
- </resource>
- <resource>
- <directory>${basedir}</directory>
- <includes>
- <include>JBossORG-EULA.txt</include>
- </includes>
- </resource>
- <resource>
- <directory>src/resources</directory>
- <includes>
- <include>**/*.dtd</include>
- <include>**/*.xsd</include>
- </includes>
- </resource>
- <resource>
- <directory>target/generated-sources/javacc</directory>
- <includes>
- <include>**/*.class</include>
- </includes>
- </resource>
- </resources>
- <plugins>
- <!-- generate java files from grammar -->
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>javacc-maven-plugin</artifactId>
- <version>2.3-jboss-1</version>
- <configuration>
- <packageName>org/jboss/security/auth/login</packageName>
- <sourceDirectory>src/main/java</sourceDirectory>
- <isStatic>false</isStatic>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>javacc</goal>
- </goals>
- <id>javacc</id>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>org.jboss.javaee</groupId>
- <artifactId>jboss-jaspi-api</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jbossxb</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.security</groupId>
- <artifactId>jboss-security-acl-impl</artifactId>
- <version>${project.version}</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.javaee</groupId>
- <artifactId>jboss-javaee</artifactId>
- <version>5.0.0.Beta3</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>jboss</groupId>
- <artifactId>jboss-jmx</artifactId>
- <version>4.2.1.GA</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.security</groupId>
- <artifactId>jboss-xacml</artifactId>
- <version>2.0.2.GA</version>
- <scope>compile</scope>
- <exclusions>
- <exclusion>
- <groupId>org.jboss.security</groupId>
- <artifactId>jboss-sunxacml</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.jboss.security</groupId>
- <artifactId>jboss-sunxacml</artifactId>
- <version>2.0.2.GA</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.0.Beta3</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-test</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>sun-opends</groupId>
- <artifactId>OpenDS</artifactId>
- <version>1.0.0</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>sleepycat</groupId>
- <artifactId>je</artifactId>
- <version>3.2.43</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-</project>
Copied: projects/security/security-jboss-sx/tags/2.0.3.GA/jbosssx/pom.xml (from rev 85372, projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx/pom.xml)
===================================================================
--- projects/security/security-jboss-sx/tags/2.0.3.GA/jbosssx/pom.xml (rev 0)
+++ projects/security/security-jboss-sx/tags/2.0.3.GA/jbosssx/pom.xml 2009-03-05 23:51:08 UTC (rev 85373)
@@ -0,0 +1,172 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jbosssx-parent</artifactId>
+ <version>2.0.3.GA</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>jbosssx-bare</artifactId>
+ <packaging>jar</packaging>
+ <name>JBoss Security Implementation for the JBAS</name>
+ <url>http://labs.jboss.org/portal/jbosssecurity/</url>
+ <description>JBoss Security is a cross cutting project that handles security for the JEMS projects</description>
+ <licenses>
+ <license>
+ <name>lgpl</name>
+ <url>http://repository.jboss.com/licenses/lgpl.txt</url>
+ </license>
+ </licenses>
+ <organization>
+ <name>JBoss Inc.</name>
+ <url>http://www.jboss.org</url>
+ </organization>
+ <profiles>
+ <!-- mvn install -Psecurity-manager -->
+ <profile>
+ <id>security-manager</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <properties>
+ <test.env>-Dtest.basedir=${basedir}/target/test-classes</test.env>
+ <policy.file>${basedir}/src/tests/resources/java.policy</policy.file>
+ <surefire.jvm.args>-Djava.security.manager -Djava.security.policy=${policy.file} ${test.env}</surefire.jvm.args>
+ </properties>
+ </profile>
+ <!-- mvn install -Psecurity-manager-debug -->
+ <!-- Best Practice: mvn install -Psecurity-manager-debug 2>&1 > logfile2>&1 > logfile -->
+ <profile>
+ <id>security-manager-debug</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <properties>
+ <test.env>-Dtest.basedir=${basedir}/target/test-classes</test.env>
+ <policy.file>${basedir}/src/tests/resources/java.policy</policy.file>
+ <surefire.jvm.args>-Djava.security.manager -Djava.security.policy=${policy.file} -Djava.security.debug=policy,failure,access ${test.env}</surefire.jvm.args>
+ </properties>
+ </profile>
+ </profiles>
+ <build>
+ <finalName>${artifactId}</finalName>
+ <resources>
+ <resource>
+ <directory>src/main/java</directory>
+ <includes>
+ <include>**/*.xml</include>
+ </includes>
+ </resource>
+ <resource>
+ <directory>${basedir}</directory>
+ <includes>
+ <include>JBossORG-EULA.txt</include>
+ </includes>
+ </resource>
+ <resource>
+ <directory>src/resources</directory>
+ <includes>
+ <include>**/*.dtd</include>
+ <include>**/*.xsd</include>
+ </includes>
+ </resource>
+ <resource>
+ <directory>target/generated-sources/javacc</directory>
+ <includes>
+ <include>**/*.class</include>
+ </includes>
+ </resource>
+ </resources>
+ <plugins>
+ <!-- generate java files from grammar -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>javacc-maven-plugin</artifactId>
+ <version>2.3-jboss-1</version>
+ <configuration>
+ <packageName>org/jboss/security/auth/login</packageName>
+ <sourceDirectory>src/main/java</sourceDirectory>
+ <isStatic>false</isStatic>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>javacc</goal>
+ </goals>
+ <id>javacc</id>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-jaspi-api</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jbossxb</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jboss-security-acl-impl</artifactId>
+ <version>${project.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-javaee</artifactId>
+ <version>5.0.0.Beta3</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-jmx</artifactId>
+ <version>4.2.1.GA</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jboss-xacml</artifactId>
+ <version>2.0.2.GA</version>
+ <scope>compile</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jboss-sunxacml</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jboss-sunxacml</artifactId>
+ <version>2.0.2.GA</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jnpserver</artifactId>
+ <version>5.0.0.Beta3</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-test</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>sun-opends</groupId>
+ <artifactId>OpenDS</artifactId>
+ <version>1.0.0</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>sleepycat</groupId>
+ <artifactId>je</artifactId>
+ <version>3.2.43</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
Deleted: projects/security/security-jboss-sx/tags/2.0.3.GA/jbosssx-client/pom.xml
===================================================================
--- projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx-client/pom.xml 2009-03-03 17:42:05 UTC (rev 85172)
+++ projects/security/security-jboss-sx/tags/2.0.3.GA/jbosssx-client/pom.xml 2009-03-05 23:51:08 UTC (rev 85373)
@@ -1,74 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-parent</artifactId>
- <version>3</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.jboss.security</groupId>
- <artifactId>jbosssx-client</artifactId>
- <version>2.0.2-SNAPSHOT</version>
- <packaging>jar</packaging>
- <name>JBoss Security Client</name>
- <url>http://www.jboss.org</url>
- <description>JBoss Security Client Library</description>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <archive>
- <manifest>
- <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
- <addDefaultSpecificationEntries />
- </manifest>
- </archive>
- <classesDirectory>../jbosssx/target/classes</classesDirectory>
- <includes>
- <include>JBossORG-EULA.txt</include>
- <include>org/jboss/crypto/JBossSXProvider.class</include>
- <include>org/jboss/crypto/digest/*</include>
- <include>org/jboss/security/*</include>
- <include>org/jboss/security/auth/callback/*</include>
- <include>org/jboss/security/auth/login/*</include>
- <include>org/jboss/security/client/*</include>
- <include>org/jboss/security/auth/login/XMLLoginConfig.class</include>
- <include>org/jboss/security/auth/login/XMLLoginConfigMBean.class</include>
- <include>org/jboss/security/plugins/PBEUtils.class</include>
- <include>org/jboss/security/ssl/ClientSocketFactory.class</include>
- <include>org/jboss/security/ssl/RMISSLClientSocketFactory.class</include>
- <include>org/jboss/security/plugins/*SecurityContext*.class</include>
- <include>org/jboss/security/plugins/DefaultSecurityManagement.class</include>
- <include>org/jboss/resource/security/*.class</include> </includes>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.jboss.maven.plugins</groupId>
- <artifactId>maven-jboss-deploy-plugin</artifactId>
- <version>1.4</version>
- <executions>
- <execution>
- <id>jboss-deploy</id>
- <goals>
- <goal>jboss-deploy</goal>
- </goals>
- <phase>deploy</phase>
- </execution>
- </executions>
- <configuration>
- <groupId>jboss</groupId>
- <jbossDeployRoot>${jboss.repository.root}</jbossDeployRoot>
- <removeArtifactVersion>true</removeArtifactVersion>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
Copied: projects/security/security-jboss-sx/tags/2.0.3.GA/jbosssx-client/pom.xml (from rev 85372, projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx-client/pom.xml)
===================================================================
--- projects/security/security-jboss-sx/tags/2.0.3.GA/jbosssx-client/pom.xml (rev 0)
+++ projects/security/security-jboss-sx/tags/2.0.3.GA/jbosssx-client/pom.xml 2009-03-05 23:51:08 UTC (rev 85373)
@@ -0,0 +1,74 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-parent</artifactId>
+ <version>3</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jbosssx-client</artifactId>
+ <version>2.0.3.GA</version>
+ <packaging>jar</packaging>
+ <name>JBoss Security Client</name>
+ <url>http://www.jboss.org</url>
+ <description>JBoss Security Client Library</description>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <archive>
+ <manifest>
+ <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+ <addDefaultSpecificationEntries />
+ </manifest>
+ </archive>
+ <classesDirectory>../jbosssx/target/classes</classesDirectory>
+ <includes>
+ <include>JBossORG-EULA.txt</include>
+ <include>org/jboss/crypto/JBossSXProvider.class</include>
+ <include>org/jboss/crypto/digest/*</include>
+ <include>org/jboss/security/*</include>
+ <include>org/jboss/security/auth/callback/*</include>
+ <include>org/jboss/security/auth/login/*</include>
+ <include>org/jboss/security/client/*</include>
+ <include>org/jboss/security/auth/login/XMLLoginConfig.class</include>
+ <include>org/jboss/security/auth/login/XMLLoginConfigMBean.class</include>
+ <include>org/jboss/security/plugins/PBEUtils.class</include>
+ <include>org/jboss/security/ssl/ClientSocketFactory.class</include>
+ <include>org/jboss/security/ssl/RMISSLClientSocketFactory.class</include>
+ <include>org/jboss/security/plugins/*SecurityContext*.class</include>
+ <include>org/jboss/security/plugins/DefaultSecurityManagement.class</include>
+ <include>org/jboss/resource/security/*.class</include> </includes>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-jboss-deploy-plugin</artifactId>
+ <version>1.4</version>
+ <executions>
+ <execution>
+ <id>jboss-deploy</id>
+ <goals>
+ <goal>jboss-deploy</goal>
+ </goals>
+ <phase>deploy</phase>
+ </execution>
+ </executions>
+ <configuration>
+ <groupId>jboss</groupId>
+ <jbossDeployRoot>${jboss.repository.root}</jbossDeployRoot>
+ <removeArtifactVersion>true</removeArtifactVersion>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Deleted: projects/security/security-jboss-sx/tags/2.0.3.GA/jbosssx-mc-int/pom.xml
===================================================================
--- projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx-mc-int/pom.xml 2009-03-03 17:42:05 UTC (rev 85172)
+++ projects/security/security-jboss-sx/tags/2.0.3.GA/jbosssx-mc-int/pom.xml 2009-03-05 23:51:08 UTC (rev 85373)
@@ -1,113 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <parent>
- <groupId>org.jboss.security</groupId>
- <artifactId>jbosssx-parent</artifactId>
- <version>2.0.2-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>jbosssx-mc-int</artifactId>
- <packaging>jar</packaging>
- <name>JBoss Microcontainer Security Integration</name>
- <url>http://labs.jboss.org/portal/jbosssecurity/</url>
- <description>JBoss Security is a cross cutting project that handles security for the JEMS projects</description>
-
- <build>
- <finalName>${artifactId}</finalName>
- </build>
-
- <dependencies>
- <!-- Global dependencies -->
- <dependency>
- <groupId>org.jboss.security</groupId>
- <artifactId>jbosssx-bare</artifactId>
- <version>${project.version}</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.security</groupId>
- <artifactId>jboss-security-spi</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.microcontainer</groupId>
- <artifactId>jboss-kernel</artifactId>
- <version>2.0.0.Beta15</version>
- <scope>compile</scope>
- <exclusions>
- <exclusion>
- <groupId>org.jboss</groupId>
- <artifactId>jbossxb</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-reflect</artifactId>
- <version>2.0.0.Beta12</version>
- <scope>runtime</scope>
- </dependency>
-
- <!-- Test dependencies -->
- <dependency>
- <groupId>jboss</groupId>
- <artifactId>jboss-common-logging-log4j</artifactId>
- <version>2.0.4.GA</version>
- <scope>test</scope>
- <exclusions>
- <exclusion>
- <groupId>jboss</groupId>
- <artifactId>jboss-common-core</artifactId>
- </exclusion>
- <exclusion>
- <groupId>jboss</groupId>
- <artifactId>jboss-common-logging-spi</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-test</artifactId>
- <scope>test</scope>
- <exclusions>
- <exclusion>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-common-core</artifactId>
- </exclusion>
- <exclusion>
- <groupId>jboss</groupId>
- <artifactId>jboss-common-logging-spi</artifactId>
- </exclusion>
- <exclusion>
- <groupId>jboss</groupId>
- <artifactId>jboss-common-logging-log4j</artifactId>
- </exclusion>
- <exclusion>
- <groupId>jboss.profiler.jvmti</groupId>
- <artifactId>jboss-profiler-jvmti</artifactId>
- </exclusion>
- <exclusion>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- </exclusion>
- <exclusion>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant-junit</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- </dependencies>
-</project>
Copied: projects/security/security-jboss-sx/tags/2.0.3.GA/jbosssx-mc-int/pom.xml (from rev 85372, projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx-mc-int/pom.xml)
===================================================================
--- projects/security/security-jboss-sx/tags/2.0.3.GA/jbosssx-mc-int/pom.xml (rev 0)
+++ projects/security/security-jboss-sx/tags/2.0.3.GA/jbosssx-mc-int/pom.xml 2009-03-05 23:51:08 UTC (rev 85373)
@@ -0,0 +1,113 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <parent>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jbosssx-parent</artifactId>
+ <version>2.0.3.GA</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>jbosssx-mc-int</artifactId>
+ <packaging>jar</packaging>
+ <name>JBoss Microcontainer Security Integration</name>
+ <url>http://labs.jboss.org/portal/jbosssecurity/</url>
+ <description>JBoss Security is a cross cutting project that handles security for the JEMS projects</description>
+
+ <build>
+ <finalName>${artifactId}</finalName>
+ </build>
+
+ <dependencies>
+ <!-- Global dependencies -->
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jbosssx-bare</artifactId>
+ <version>${project.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jboss-security-spi</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-kernel</artifactId>
+ <version>2.0.0.Beta15</version>
+ <scope>compile</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.jboss</groupId>
+ <artifactId>jbossxb</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-reflect</artifactId>
+ <version>2.0.0.Beta12</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <!-- Test dependencies -->
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-common-logging-log4j</artifactId>
+ <version>2.0.4.GA</version>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-common-core</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-common-logging-spi</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-test</artifactId>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-common-core</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-common-logging-spi</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-common-logging-log4j</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>jboss.profiler.jvmti</groupId>
+ <artifactId>jboss-profiler-jvmti</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-junit</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+</project>
Deleted: projects/security/security-jboss-sx/tags/2.0.3.GA/parent/pom.xml
===================================================================
--- projects/security/security-jboss-sx/branches/Branch_2_0/parent/pom.xml 2009-03-03 17:42:05 UTC (rev 85172)
+++ projects/security/security-jboss-sx/tags/2.0.3.GA/parent/pom.xml 2009-03-05 23:51:08 UTC (rev 85373)
@@ -1,138 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-parent</artifactId>
- <version>4</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.jboss.security</groupId>
- <artifactId>jbosssx-parent</artifactId>
- <packaging>pom</packaging>
- <version>2.0.2-SNAPSHOT</version>
- <name>JBossSX - Parent</name>
- <url>http://labs.jboss.org/portal/jbosssecurity/</url>
- <description>JBoss Security is a cross cutting project that handles security for the JEMS projects</description>
- <licenses>
- <license>
- <name>lgpl</name>
- <url>http://repository.jboss.com/licenses/lgpl.txt</url>
- </license>
- </licenses>
- <organization>
- <name>JBoss Inc.</name>
- <url>http://www.jboss.org</url>
- </organization>
- <scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/security/security-jboss-sx/trunk</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/security/security-jboss-sx/trunk</developerConnection>
- </scm>
-
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-release-plugin</artifactId>
- <version>2.0-beta-6</version>
- <configuration>
- <tagBase>https://svn.jboss.org/repos/jbossas/projects/security/security-jboss-sx/tags</tagBase>
- </configuration>
- </plugin>
- </plugins>
- <pluginManagement>
- <plugins>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.4.3</version>
- <configuration>
- <printSummary>true</printSummary>
- <disableXmlReport>false</disableXmlReport>
- <testFailureIgnore>false</testFailureIgnore>
- <includes>
- <include>**/**TestCase.java</include>
- </includes>
- <forkMode>pertest</forkMode>
- <argLine>${surefire.jvm.args}</argLine>
- <useFile>false</useFile>
- <trimStackTrace>false</trimStackTrace>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
-
- <repositories>
- <repository>
- <id>repository.jboss.org</id>
- <name>JBoss Repository</name>
- <layout>default</layout>
- <url>http://repository.jboss.org/maven2/</url>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </repository>
-
- <repository>
- <id>snapshots.jboss.org</id>
- <name>JBoss Snapshots Repository</name>
- <layout>default</layout>
- <url>http://snapshots.jboss.org/maven2/</url>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>false</enabled>
- </releases>
- </repository>
- </repositories>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>jboss</groupId>
- <artifactId>jboss-logging-log4j</artifactId>
- <version>2.0.2.GA</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jbossxb</artifactId>
- <version>2.0.0.CR15</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.javaee</groupId>
- <artifactId>jboss-jacc-api</artifactId>
- <version>1.1.0.${org.jboss.javaee.version}</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.javaee</groupId>
- <artifactId>jboss-jaspi-api</artifactId>
- <version>1.0.0.${org.jboss.javaee.version}</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.security</groupId>
- <artifactId>jboss-security-spi</artifactId>
- <version>${org.jboss.security.spi.version}</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-test</artifactId>
- <version>1.0.4.GA</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <properties>
- <org.jboss.javaee.version>GA</org.jboss.javaee.version>
- <org.jboss.security.spi.version>2.0.2-SNAPSHOT</org.jboss.security.spi.version>
- </properties>
-</project>
Copied: projects/security/security-jboss-sx/tags/2.0.3.GA/parent/pom.xml (from rev 85372, projects/security/security-jboss-sx/branches/Branch_2_0/parent/pom.xml)
===================================================================
--- projects/security/security-jboss-sx/tags/2.0.3.GA/parent/pom.xml (rev 0)
+++ projects/security/security-jboss-sx/tags/2.0.3.GA/parent/pom.xml 2009-03-05 23:51:08 UTC (rev 85373)
@@ -0,0 +1,138 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-parent</artifactId>
+ <version>4</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jbosssx-parent</artifactId>
+ <packaging>pom</packaging>
+ <version>2.0.3.GA</version>
+ <name>JBossSX - Parent</name>
+ <url>http://labs.jboss.org/portal/jbosssecurity/</url>
+ <description>JBoss Security is a cross cutting project that handles security for the JEMS projects</description>
+ <licenses>
+ <license>
+ <name>lgpl</name>
+ <url>http://repository.jboss.com/licenses/lgpl.txt</url>
+ </license>
+ </licenses>
+ <organization>
+ <name>JBoss Inc.</name>
+ <url>http://www.jboss.org</url>
+ </organization>
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/security/security-jboss-sx/tags/2.0.3.GA</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/security/security-jboss-sx/tags/2.0.3.GA</developerConnection>
+ </scm>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-release-plugin</artifactId>
+ <version>2.0-beta-6</version>
+ <configuration>
+ <tagBase>https://svn.jboss.org/repos/jbossas/projects/security/security-jboss-sx/tags</tagBase>
+ </configuration>
+ </plugin>
+ </plugins>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.4.3</version>
+ <configuration>
+ <printSummary>true</printSummary>
+ <disableXmlReport>false</disableXmlReport>
+ <testFailureIgnore>false</testFailureIgnore>
+ <includes>
+ <include>**/**TestCase.java</include>
+ </includes>
+ <forkMode>pertest</forkMode>
+ <argLine>${surefire.jvm.args}</argLine>
+ <useFile>false</useFile>
+ <trimStackTrace>false</trimStackTrace>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+ <repositories>
+ <repository>
+ <id>repository.jboss.org</id>
+ <name>JBoss Repository</name>
+ <layout>default</layout>
+ <url>http://repository.jboss.org/maven2/</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+
+ <repository>
+ <id>snapshots.jboss.org</id>
+ <name>JBoss Snapshots Repository</name>
+ <layout>default</layout>
+ <url>http://snapshots.jboss.org/maven2/</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ </repository>
+ </repositories>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-logging-log4j</artifactId>
+ <version>2.0.2.GA</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jbossxb</artifactId>
+ <version>2.0.0.CR15</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-jacc-api</artifactId>
+ <version>1.1.0.${org.jboss.javaee.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-jaspi-api</artifactId>
+ <version>1.0.0.${org.jboss.javaee.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jboss-security-spi</artifactId>
+ <version>${org.jboss.security.spi.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-test</artifactId>
+ <version>1.0.4.GA</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <properties>
+ <org.jboss.javaee.version>GA</org.jboss.javaee.version>
+ <org.jboss.security.spi.version>2.0.3.GA</org.jboss.security.spi.version>
+ </properties>
+</project>
Deleted: projects/security/security-jboss-sx/tags/2.0.3.GA/pom.xml
===================================================================
--- projects/security/security-jboss-sx/branches/Branch_2_0/pom.xml 2009-03-03 17:42:05 UTC (rev 85172)
+++ projects/security/security-jboss-sx/tags/2.0.3.GA/pom.xml 2009-03-05 23:51:08 UTC (rev 85373)
@@ -1,94 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-parent</artifactId>
- <version>3</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.jboss.security</groupId>
- <artifactId>jbosssx-pom</artifactId>
- <version>2.0.2-SNAPSHOT</version>
- <packaging>pom</packaging>
- <name>JBoss Security Implementation for the JBAS - Parent</name>
- <url>http://labs.jboss.org/portal/jbosssecurity/</url>
- <description>JBoss Security is a cross cutting project that handles security for the JEMS projects</description>
- <licenses>
- <license>
- <name>lgpl</name>
- <url>http://repository.jboss.com/licenses/lgpl.txt</url>
- </license>
- </licenses>
- <organization>
- <name>JBoss Inc.</name>
- <url>http://www.jboss.org</url>
- </organization>
- <scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/security/security-jboss-sx/trunk</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/security/security-jboss-sx/trunk</developerConnection>
- </scm>
- <repositories>
- <repository>
- <id>repository.jboss.org</id>
- <name>JBoss Repository</name>
- <layout>default</layout>
- <url>http://repository.jboss.org/maven2/</url>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </repository>
-
- <repository>
- <id>snapshots.jboss.org</id>
- <name>JBoss Snapshots Repository</name>
- <layout>default</layout>
- <url>http://snapshots.jboss.org/maven2/</url>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>false</enabled>
- </releases>
- </repository>
- </repositories>
-
- <modules>
- <module>parent</module>
- <module>identity</module>
- <module>acl</module>
- <module>jbosssx</module>
- <module>jbosssx-client</module>
- <module>jbosssx-mc-int</module>
- <module>assembly</module>
- </modules>
-
- <profiles>
- <!-- Specify heap size for ACL tests -->
- <profile>
- <id>acl-heap-profile</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <properties>
- <surefire.jvm.args>-Xms512m -Xmx1024m</surefire.jvm.args>
- </properties>
- <modules>
- <module>acl</module>
- </modules>
- </profile>
- </profiles>
-
- <distributionManagement>
- <repository>
- <!-- Copy the distribution jar file to a local checkout of the maven repositry
- - This variable can be set in $MAVEN_HOME/conf/settings.xml -->
- <id>repository.jboss.org</id>
- <url>file://${maven.repository.root}</url>
- </repository>
- <snapshotRepository>
- <id>snapshots.jboss.org</id>
- <name>JBoss Inc. Repository</name>
- <layout>default</layout>
- <url>dav:https://snapshots.jboss.org/maven2/</url>
- </snapshotRepository>
- </distributionManagement>
-</project>
Copied: projects/security/security-jboss-sx/tags/2.0.3.GA/pom.xml (from rev 85372, projects/security/security-jboss-sx/branches/Branch_2_0/pom.xml)
===================================================================
--- projects/security/security-jboss-sx/tags/2.0.3.GA/pom.xml (rev 0)
+++ projects/security/security-jboss-sx/tags/2.0.3.GA/pom.xml 2009-03-05 23:51:08 UTC (rev 85373)
@@ -0,0 +1,94 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-parent</artifactId>
+ <version>3</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jbosssx-pom</artifactId>
+ <version>2.0.3.GA</version>
+ <packaging>pom</packaging>
+ <name>JBoss Security Implementation for the JBAS - Parent</name>
+ <url>http://labs.jboss.org/portal/jbosssecurity/</url>
+ <description>JBoss Security is a cross cutting project that handles security for the JEMS projects</description>
+ <licenses>
+ <license>
+ <name>lgpl</name>
+ <url>http://repository.jboss.com/licenses/lgpl.txt</url>
+ </license>
+ </licenses>
+ <organization>
+ <name>JBoss Inc.</name>
+ <url>http://www.jboss.org</url>
+ </organization>
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/security/security-jboss-sx/tags/2.0.3.GA</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/security/security-jboss-sx/tags/2.0.3.GA</developerConnection>
+ </scm>
+ <repositories>
+ <repository>
+ <id>repository.jboss.org</id>
+ <name>JBoss Repository</name>
+ <layout>default</layout>
+ <url>http://repository.jboss.org/maven2/</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+
+ <repository>
+ <id>snapshots.jboss.org</id>
+ <name>JBoss Snapshots Repository</name>
+ <layout>default</layout>
+ <url>http://snapshots.jboss.org/maven2/</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ </repository>
+ </repositories>
+
+ <modules>
+ <module>parent</module>
+ <module>identity</module>
+ <module>acl</module>
+ <module>jbosssx</module>
+ <module>jbosssx-client</module>
+ <module>jbosssx-mc-int</module>
+ <module>assembly</module>
+ </modules>
+
+ <profiles>
+ <!-- Specify heap size for ACL tests -->
+ <profile>
+ <id>acl-heap-profile</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <properties>
+ <surefire.jvm.args>-Xms512m -Xmx1024m</surefire.jvm.args>
+ </properties>
+ <modules>
+ <module>acl</module>
+ </modules>
+ </profile>
+ </profiles>
+
+ <distributionManagement>
+ <repository>
+ <!-- Copy the distribution jar file to a local checkout of the maven repositry
+ - This variable can be set in $MAVEN_HOME/conf/settings.xml -->
+ <id>repository.jboss.org</id>
+ <url>file://${maven.repository.root}</url>
+ </repository>
+ <snapshotRepository>
+ <id>snapshots.jboss.org</id>
+ <name>JBoss Inc. Repository</name>
+ <layout>default</layout>
+ <url>dav:https://snapshots.jboss.org/maven2/</url>
+ </snapshotRepository>
+ </distributionManagement>
+</project>
More information about the jboss-cvs-commits
mailing list