[jboss-cvs] JBossAS SVN: r66879 - in projects/security/security-spi/trunk: authorization and 7 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Nov 8 13:00:28 EST 2007
Author: anil.saldhana at jboss.com
Date: 2007-11-08 13:00:28 -0500 (Thu, 08 Nov 2007)
New Revision: 66879
Added:
projects/security/security-spi/trunk/authorization/
projects/security/security-spi/trunk/authorization/pom.xml
projects/security/security-spi/trunk/authorization/src/
projects/security/security-spi/trunk/authorization/src/main/
projects/security/security-spi/trunk/authorization/src/main/org/
projects/security/security-spi/trunk/authorization/src/main/org/jboss/
projects/security/security-spi/trunk/authorization/src/main/org/jboss/security/
projects/security/security-spi/trunk/authorization/src/main/org/jboss/security/AuthorizationManager.java
projects/security/security-spi/trunk/authorization/src/main/org/jboss/security/BaseSecurityManager.java
projects/security/security-spi/trunk/authorization/src/main/org/jboss/security/authorization/
Removed:
projects/security/security-spi/trunk/spi/src/main/org/jboss/security/AuthorizationManager.java
projects/security/security-spi/trunk/spi/src/main/org/jboss/security/BaseSecurityManager.java
projects/security/security-spi/trunk/spi/src/main/org/jboss/security/authorization/
Modified:
projects/security/security-spi/trunk/.classpath
projects/security/security-spi/trunk/pom.xml
projects/security/security-spi/trunk/spi/pom.xml
Log:
SECURITY-91:authorization spi
Modified: projects/security/security-spi/trunk/.classpath
===================================================================
--- projects/security/security-spi/trunk/.classpath 2007-11-08 17:42:42 UTC (rev 66878)
+++ projects/security/security-spi/trunk/.classpath 2007-11-08 18:00:28 UTC (rev 66879)
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src/main"/>
- <classpathentry kind="src" path="src/tests"/>
+ <classpathentry kind="src" path="spi/src/tests"/>
+ <classpathentry kind="src" path="authorization/src/main"/>
+ <classpathentry kind="src" path="spi/src/main"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-javaee/5.0.0.Beta3/jboss-javaee-5.0.0.Beta3.jar"/>
<classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-jaspi-api/1.0-SNAPSHOT/jboss-jaspi-api-1.0-SNAPSHOT.jar"/>
- <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/>
<classpathentry kind="output" path="target/eclipse-classes"/>
</classpath>
Added: projects/security/security-spi/trunk/authorization/pom.xml
===================================================================
--- projects/security/security-spi/trunk/authorization/pom.xml (rev 0)
+++ projects/security/security-spi/trunk/authorization/pom.xml 2007-11-08 18:00:28 UTC (rev 66879)
@@ -0,0 +1,116 @@
+<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>spi-aggregator</artifactId>
+ <version>2.0.2-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>authorization-spi</artifactId>
+ <packaging>jar</packaging>
+ <name>JBoss Security Authorization SPI</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-spi/trunk/</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/security-spi/trunk/</developerConnection>
+ <url>http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/projects/security-spi/trunk/</url>
+ </scm>
+ <build>
+ <sourceDirectory>${basedir}/src/main</sourceDirectory>
+ <testSourceDirectory>${basedir}/src/tests</testSourceDirectory>
+ <testOutputDirectory>${basedir}/target/test-classes</testOutputDirectory>
+ <finalName>${artifactId}</finalName>
+ <outputDirectory>${basedir}/target/classes</outputDirectory>
+ <resources>
+ <resource>
+ <directory>${basedir}</directory>
+ <includes>
+ <include>JBossORG-EULA.txt</include>
+ </includes>
+ </resource>
+ </resources>
+ <plugins>
+ <!-- define that we wish to create src jars -->
+ <plugin>
+ <artifactId>maven-source-plugin</artifactId>
+ <version>2.0</version>
+ <inherited>true</inherited>
+ <executions>
+ <execution>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <printSummary>true</printSummary>
+ <disableXmlReport>false</disableXmlReport>
+ <testFailureIgnore>true</testFailureIgnore>
+ <includes>
+ <include>**/**TestCase.java</include>
+ </includes>
+ <forkMode>pertest</forkMode>
+ <argLine>${surefire.jvm.args}</argLine>
+ <useFile>false</useFile>
+ <trimStackTrace>false</trimStackTrace>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-jboss-deploy-plugin</artifactId>
+ <version>1.4</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>jboss-deploy</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <groupId>jboss</groupId>
+ <license>lgpl</license>
+ <jbossDeployRoot>${jboss.repository.root}</jbossDeployRoot>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <aggregate>true</aggregate>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
+</project>
Copied: projects/security/security-spi/trunk/authorization/src/main/org/jboss/security/AuthorizationManager.java (from rev 66877, projects/security/security-spi/trunk/spi/src/main/org/jboss/security/AuthorizationManager.java)
===================================================================
--- projects/security/security-spi/trunk/authorization/src/main/org/jboss/security/AuthorizationManager.java (rev 0)
+++ projects/security/security-spi/trunk/authorization/src/main/org/jboss/security/AuthorizationManager.java 2007-11-08 18:00:28 UTC (rev 66879)
@@ -0,0 +1,83 @@
+/*
+ * 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;
+
+import java.security.Principal;
+import java.security.acl.Group;
+import java.util.Map;
+import java.util.Set;
+
+import org.jboss.security.authorization.AuthorizationException;
+import org.jboss.security.authorization.Resource;
+
+//$Id$
+
+/**
+ * Generalized Authorization Manager Interface.
+ * <br/><br/>
+ * <b>Replaces the legacy RealmMapping interface</b>
+ * @see org.jboss.security.RealmMapping
+ * @author <a href="mailto:Anil.Saldhana at jboss.org">Anil Saldhana</a>
+ * @since Jan 2, 2006
+ * @version $Revision$
+ */
+public interface AuthorizationManager extends BaseSecurityManager
+{
+ /**
+ * Authorize a resource
+ * @param resource
+ * @return
+ * @throws AuthorizationException
+ */
+ public int authorize(Resource resource) throws AuthorizationException;
+
+
+ /** Validates the application domain roles to which the operational
+ environment Principal belongs.
+ @param principal the caller principal as known in the operation environment.
+ @param roles The Set<Principal> for the application domain roles that the
+ principal is to be validated against.
+ @return true if the principal has at least one of the roles in the roles set,
+ false otherwise.
+ */
+ public boolean doesUserHaveRole(Principal principal, Set roles);
+
+
+ /** Return the set of domain roles the principal has been assigned.
+ @return The Set<Principal> for the application domain roles that the
+ principal has been assigned.
+ */
+ public Set getUserRoles(Principal principal);
+
+ /**
+ * Trust usecases may have a need to determine the roles of the target
+ * principal which has been derived via a principal from another domain
+ * by the Authentication Manager
+ * An implementation of this interface may have to contact a trust provider
+ * for additional information about the principal
+ * @param targetPrincipal Principal applicable in current domain
+ * @param contextMap Read-Only Contextual Information that may be useful for the
+ * implementation in determining the roles.
+ * @return roles from the target domain
+ */
+ public Group getTargetRoles(Principal targetPrincipal, Map contextMap);
+ }
Copied: projects/security/security-spi/trunk/authorization/src/main/org/jboss/security/BaseSecurityManager.java (from rev 66877, projects/security/security-spi/trunk/spi/src/main/org/jboss/security/BaseSecurityManager.java)
===================================================================
--- projects/security/security-spi/trunk/authorization/src/main/org/jboss/security/BaseSecurityManager.java (rev 0)
+++ projects/security/security-spi/trunk/authorization/src/main/org/jboss/security/BaseSecurityManager.java 2007-11-08 18:00:28 UTC (rev 66879)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, 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;
+
+
+//$Id$
+
+/**
+ * Interface that defines common behavior among
+ * the various Security Managers
+ * @author Anil.Saldhana at redhat.com
+ * @since Sep 10, 2007
+ * @version $Revision$
+ */
+public interface BaseSecurityManager
+{
+ /** Get the security domain from which the security manager is from. Every
+ security manager belongs to a named domain. The meaning of the security
+ domain name depends on the implementation. Examples range from as fine
+ grained as the name of EJBs to J2EE application names to DNS domain names.
+ @return the security domain name. May be null in which case the security
+ manager belongs to the logical default domain.
+ */
+ String getSecurityDomain();
+}
Copied: projects/security/security-spi/trunk/authorization/src/main/org/jboss/security/authorization (from rev 66877, projects/security/security-spi/trunk/spi/src/main/org/jboss/security/authorization)
Modified: projects/security/security-spi/trunk/pom.xml
===================================================================
--- projects/security/security-spi/trunk/pom.xml 2007-11-08 17:42:42 UTC (rev 66878)
+++ projects/security/security-spi/trunk/pom.xml 2007-11-08 18:00:28 UTC (rev 66879)
@@ -23,6 +23,7 @@
<url>http://www.jboss.org</url>
</organization>
<modules>
+ <module>authorization</module>
<module>spi</module>
</modules>
<distributionManagement>
Modified: projects/security/security-spi/trunk/spi/pom.xml
===================================================================
--- projects/security/security-spi/trunk/spi/pom.xml 2007-11-08 17:42:42 UTC (rev 66878)
+++ projects/security/security-spi/trunk/spi/pom.xml 2007-11-08 18:00:28 UTC (rev 66879)
@@ -114,6 +114,11 @@
<version>1.0-BETA1</version>
</dependency>
<dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>authorization-spi</artifactId>
+ <version>2.0.2-SNAPSHOT</version>
+ </dependency>
+ <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
Deleted: projects/security/security-spi/trunk/spi/src/main/org/jboss/security/AuthorizationManager.java
===================================================================
--- projects/security/security-spi/trunk/spi/src/main/org/jboss/security/AuthorizationManager.java 2007-11-08 17:42:42 UTC (rev 66878)
+++ projects/security/security-spi/trunk/spi/src/main/org/jboss/security/AuthorizationManager.java 2007-11-08 18:00:28 UTC (rev 66879)
@@ -1,83 +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;
-
-import java.security.Principal;
-import java.security.acl.Group;
-import java.util.Map;
-import java.util.Set;
-
-import org.jboss.security.authorization.AuthorizationException;
-import org.jboss.security.authorization.Resource;
-
-//$Id$
-
-/**
- * Generalized Authorization Manager Interface.
- * <br/><br/>
- * <b>Replaces the legacy RealmMapping interface</b>
- * @see org.jboss.security.RealmMapping
- * @author <a href="mailto:Anil.Saldhana at jboss.org">Anil Saldhana</a>
- * @since Jan 2, 2006
- * @version $Revision$
- */
-public interface AuthorizationManager extends BaseSecurityManager
-{
- /**
- * Authorize a resource
- * @param resource
- * @return
- * @throws AuthorizationException
- */
- public int authorize(Resource resource) throws AuthorizationException;
-
-
- /** Validates the application domain roles to which the operational
- environment Principal belongs.
- @param principal the caller principal as known in the operation environment.
- @param roles The Set<Principal> for the application domain roles that the
- principal is to be validated against.
- @return true if the principal has at least one of the roles in the roles set,
- false otherwise.
- */
- public boolean doesUserHaveRole(Principal principal, Set roles);
-
-
- /** Return the set of domain roles the principal has been assigned.
- @return The Set<Principal> for the application domain roles that the
- principal has been assigned.
- */
- public Set getUserRoles(Principal principal);
-
- /**
- * Trust usecases may have a need to determine the roles of the target
- * principal which has been derived via a principal from another domain
- * by the Authentication Manager
- * An implementation of this interface may have to contact a trust provider
- * for additional information about the principal
- * @param targetPrincipal Principal applicable in current domain
- * @param contextMap Read-Only Contextual Information that may be useful for the
- * implementation in determining the roles.
- * @return roles from the target domain
- */
- public Group getTargetRoles(Principal targetPrincipal, Map contextMap);
- }
Deleted: projects/security/security-spi/trunk/spi/src/main/org/jboss/security/BaseSecurityManager.java
===================================================================
--- projects/security/security-spi/trunk/spi/src/main/org/jboss/security/BaseSecurityManager.java 2007-11-08 17:42:42 UTC (rev 66878)
+++ projects/security/security-spi/trunk/spi/src/main/org/jboss/security/BaseSecurityManager.java 2007-11-08 18:00:28 UTC (rev 66879)
@@ -1,44 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2007, 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;
-
-
-//$Id$
-
-/**
- * Interface that defines common behavior among
- * the various Security Managers
- * @author Anil.Saldhana at redhat.com
- * @since Sep 10, 2007
- * @version $Revision$
- */
-public interface BaseSecurityManager
-{
- /** Get the security domain from which the security manager is from. Every
- security manager belongs to a named domain. The meaning of the security
- domain name depends on the implementation. Examples range from as fine
- grained as the name of EJBs to J2EE application names to DNS domain names.
- @return the security domain name. May be null in which case the security
- manager belongs to the logical default domain.
- */
- String getSecurityDomain();
-}
More information about the jboss-cvs-commits
mailing list