[jboss-cvs] JBossAS SVN: r67185 - in projects/security/security-spi/trunk: identity and 6 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Nov 16 13:49:02 EST 2007


Author: anil.saldhana at jboss.com
Date: 2007-11-16 13:48:59 -0500 (Fri, 16 Nov 2007)
New Revision: 67185

Added:
   projects/security/security-spi/trunk/identity/
   projects/security/security-spi/trunk/identity/pom.xml
   projects/security/security-spi/trunk/identity/src/
   projects/security/security-spi/trunk/identity/src/etc/
   projects/security/security-spi/trunk/identity/src/main/
   projects/security/security-spi/trunk/identity/src/main/org/
   projects/security/security-spi/trunk/identity/src/main/org/jboss/
   projects/security/security-spi/trunk/identity/src/main/org/jboss/security/
   projects/security/security-spi/trunk/identity/src/main/org/jboss/security/identity/
   projects/security/security-spi/trunk/identity/src/main/org/jboss/security/identity/Identity.java
   projects/security/security-spi/trunk/identity/src/main/org/jboss/security/identity/Role.java
   projects/security/security-spi/trunk/identity/src/main/org/jboss/security/identity/RoleGroup.java
   projects/security/security-spi/trunk/identity/src/main/org/jboss/security/identity/RoleType.java
   projects/security/security-spi/trunk/identity/src/resources/
   projects/security/security-spi/trunk/identity/src/tests/
Modified:
   projects/security/security-spi/trunk/
   projects/security/security-spi/trunk/.classpath
   projects/security/security-spi/trunk/pom.xml
Log:
SECURITY-93:Identity api


Property changes on: projects/security/security-spi/trunk
___________________________________________________________________
Name: svn:ignore
   - output
.metadata
target

   + target


Modified: projects/security/security-spi/trunk/.classpath
===================================================================
--- projects/security/security-spi/trunk/.classpath	2007-11-16 18:10:06 UTC (rev 67184)
+++ projects/security/security-spi/trunk/.classpath	2007-11-16 18:48:59 UTC (rev 67185)
@@ -1,6 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
 	<classpathentry kind="src" path="spi/src/tests"/>
+	<classpathentry kind="src" path="identity/src/tests"/>
+	<classpathentry kind="src" path="identity/src/main"/>
 	<classpathentry kind="src" path="authorization/src/main"/>
 	<classpathentry kind="src" path="spi/src/main"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>

Added: projects/security/security-spi/trunk/identity/pom.xml
===================================================================
--- projects/security/security-spi/trunk/identity/pom.xml	                        (rev 0)
+++ projects/security/security-spi/trunk/identity/pom.xml	2007-11-16 18:48:59 UTC (rev 67185)
@@ -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>identity-spi</artifactId>
+   <packaging>jar</packaging>
+   <name>JBoss Security Identity 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>

Added: projects/security/security-spi/trunk/identity/src/main/org/jboss/security/identity/Identity.java
===================================================================
--- projects/security/security-spi/trunk/identity/src/main/org/jboss/security/identity/Identity.java	                        (rev 0)
+++ projects/security/security-spi/trunk/identity/src/main/org/jboss/security/identity/Identity.java	2007-11-16 18:48:59 UTC (rev 67185)
@@ -0,0 +1,60 @@
+/*
+  * 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.identity;
+
+import java.security.Principal;
+import java.security.acl.Group;
+
+//$Id$
+
+/**
+ *  Identity of an entity (user, process etc)
+ *  @author Anil.Saldhana at redhat.com
+ *  @since  Nov 16, 2007 
+ *  @version $Revision$
+ */
+public interface Identity
+{  
+   /**
+    * Get the name of the identity
+    * @return
+    */
+   public String getName();
+   
+   /**
+    * Get the Role (Role or RoleGroup)
+    * @return
+    */
+   public Role getRole(); 
+   
+   /**
+    * Return a Group only if it has been set
+    * @return
+    */
+   public Group asGroup(); 
+   
+   /**
+    * Returns a Principal only if it set
+    * @return
+    */
+   public Principal asPrincipal(); 
+}
\ No newline at end of file

Added: projects/security/security-spi/trunk/identity/src/main/org/jboss/security/identity/Role.java
===================================================================
--- projects/security/security-spi/trunk/identity/src/main/org/jboss/security/identity/Role.java	                        (rev 0)
+++ projects/security/security-spi/trunk/identity/src/main/org/jboss/security/identity/Role.java	2007-11-16 18:48:59 UTC (rev 67185)
@@ -0,0 +1,45 @@
+/*
+ * 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.identity;
+
+//$Id$
+
+/**
+ *  Represents a Role
+ *  @author Anil.Saldhana at redhat.com
+ *  @since  Nov 16, 2007 
+ *  @version $Revision$
+ */
+public interface Role
+{ 
+   /**
+    * Get Name of the Role
+    * @return
+    */
+   public String getRoleName();
+   
+   /**
+    * Get type of role
+    * @return simple,group
+    */
+   public RoleType getType();
+}
\ No newline at end of file

Added: projects/security/security-spi/trunk/identity/src/main/org/jboss/security/identity/RoleGroup.java
===================================================================
--- projects/security/security-spi/trunk/identity/src/main/org/jboss/security/identity/RoleGroup.java	                        (rev 0)
+++ projects/security/security-spi/trunk/identity/src/main/org/jboss/security/identity/RoleGroup.java	2007-11-16 18:48:59 UTC (rev 67185)
@@ -0,0 +1,37 @@
+/*
+  * 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.identity;
+
+import java.util.List;
+
+//$Id$
+
+/**
+ *  Represents a group of roles
+ *  @author Anil.Saldhana at redhat.com
+ *  @since  Nov 16, 2007 
+ *  @version $Revision$
+ */
+public interface RoleGroup extends Role
+{  
+   public List<Role> getRoles(); 
+}
\ No newline at end of file

Added: projects/security/security-spi/trunk/identity/src/main/org/jboss/security/identity/RoleType.java
===================================================================
--- projects/security/security-spi/trunk/identity/src/main/org/jboss/security/identity/RoleType.java	                        (rev 0)
+++ projects/security/security-spi/trunk/identity/src/main/org/jboss/security/identity/RoleType.java	2007-11-16 18:48:59 UTC (rev 67185)
@@ -0,0 +1,35 @@
+/*
+  * 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.identity;
+
+//$Id$
+
+/**
+ *  Type of Role
+ *  @author Anil.Saldhana at redhat.com
+ *  @since  Nov 16, 2007 
+ *  @version $Revision$
+ */
+public enum RoleType 
+{
+  simple,group;
+}

Modified: projects/security/security-spi/trunk/pom.xml
===================================================================
--- projects/security/security-spi/trunk/pom.xml	2007-11-16 18:10:06 UTC (rev 67184)
+++ projects/security/security-spi/trunk/pom.xml	2007-11-16 18:48:59 UTC (rev 67185)
@@ -47,9 +47,24 @@
      </plugins>
    </build>
    <modules>
+     <module>identity</module>
      <module>authorization</module>
      <module>spi</module>
    </modules>
+   <dependencies>
+      <dependency>
+         <groupId>org.jboss.javaee</groupId>
+         <artifactId>jboss-jaspi-api</artifactId>
+         <version>1.0-BETA1</version>
+         <scope>compile</scope>
+      </dependency>
+      <dependency>
+         <groupId>junit</groupId>
+         <artifactId>junit</artifactId>
+         <version>3.8.1</version>
+         <scope>compile</scope>
+      </dependency>
+   </dependencies>
    <distributionManagement>
       <repository>
         <!-- Copy the distribution jar file to a local checkout of the maven repository 




More information about the jboss-cvs-commits mailing list