Author: sohil.shah(a)jboss.com
Date: 2009-01-30 12:44:00 -0500 (Fri, 30 Jan 2009)
New Revision: 12728
Added:
modules/authorization/trunk/decision-point/
modules/authorization/trunk/decision-point/pom.xml
modules/authorization/trunk/decision-point/src/
modules/authorization/trunk/decision-point/src/main/
modules/authorization/trunk/decision-point/src/main/java/
modules/authorization/trunk/decision-point/src/main/java/org/
modules/authorization/trunk/decision-point/src/main/java/org/jboss/
modules/authorization/trunk/decision-point/src/main/java/org/jboss/security/
modules/authorization/trunk/decision-point/src/main/java/org/jboss/security/authz/
modules/authorization/trunk/decision-point/src/main/java/org/jboss/security/authz/decision/
modules/authorization/trunk/decision-point/src/main/java/org/jboss/security/authz/decision/PolicyDecisionPoint.java
modules/authorization/trunk/decision-point/src/main/resources/
modules/authorization/trunk/decision-point/src/test/
modules/authorization/trunk/decision-point/src/test/java/
modules/authorization/trunk/decision-point/src/test/resources/
modules/authorization/trunk/enforcement/src/main/java/org/jboss/security/authz/enforcement/PolicyEnforcementPointImpl.java
Modified:
modules/authorization/trunk/.classpath
modules/authorization/trunk/enforcement/src/main/java/org/jboss/security/authz/enforcement/PolicyEnforcementPoint.java
modules/authorization/trunk/enforcement/src/main/java/org/jboss/security/authz/enforcement/Request.java
modules/authorization/trunk/enforcement/src/main/java/org/jboss/security/authz/enforcement/Response.java
modules/authorization/trunk/pom.xml
Log:
adding the policy "decision-point" component
Modified: modules/authorization/trunk/.classpath
===================================================================
--- modules/authorization/trunk/.classpath 2009-01-30 16:43:12 UTC (rev 12727)
+++ modules/authorization/trunk/.classpath 2009-01-30 17:44:00 UTC (rev 12728)
@@ -7,7 +7,11 @@
<classpathentry kind="src"
path="core-components/src/main/java"/>
<classpathentry kind="src"
path="core-components/src/main/resources"/>
<classpathentry kind="src"
path="core-components/src/test/java"/>
- <classpathentry kind="src"
path="core-components/src/test/resources"/>
+ <classpathentry kind="src"
path="core-components/src/test/resources"/>
+ <classpathentry kind="src"
path="decision-point/src/main/java"/>
+ <classpathentry kind="src"
path="decision-point/src/main/resources"/>
+ <classpathentry kind="src"
path="decision-point/src/test/java"/>
+ <classpathentry kind="src"
path="decision-point/src/test/resources"/>
<classpathentry kind="src" path="enforcement/src/main/java"/>
<classpathentry kind="src"
path="enforcement/src/main/resources"/>
<classpathentry kind="src" path="enforcement/src/test/java"/>
@@ -16,10 +20,10 @@
<classpathentry kind="src"
path="provisioning/src/main/resources"/>
<classpathentry kind="src"
path="provisioning/src/test/java"/>
<classpathentry kind="src"
path="provisioning/src/test/resources"/>
- <classpathentry kind="src" path="http-authz/src/main/java"/>
- <classpathentry kind="src"
path="http-authz/src/main/resources"/>
- <classpathentry kind="src" path="http-authz/src/test/java"/>
- <classpathentry kind="src"
path="http-authz/src/test/resources"/>
+ <classpathentry kind="src"
path="http-profile/src/main/java"/>
+ <classpathentry kind="src"
path="http-profile/src/main/resources"/>
+ <classpathentry kind="src"
path="http-profile/src/test/java"/>
+ <classpathentry kind="src"
path="http-profile/src/test/resources"/>
<classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="var"
path="M2_REPO/asm/asm/1.5.3/asm-1.5.3.jar"/>
<classpathentry kind="var"
path="M2_REPO/cglib/cglib/2.1_3/cglib-2.1_3.jar"/>
Added: modules/authorization/trunk/decision-point/pom.xml
===================================================================
--- modules/authorization/trunk/decision-point/pom.xml (rev 0)
+++ modules/authorization/trunk/decision-point/pom.xml 2009-01-30 17:44:00 UTC (rev
12728)
@@ -0,0 +1,67 @@
+<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.authz</groupId>
+ <artifactId>jboss-authz-parent</artifactId>
+ <version>trunk-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>jboss-authz-decision-point</artifactId>
+ <packaging>jar</packaging>
+ <name>JBoss Authorization Policy Decision Point</name>
+ <url>http://www.jboss.org</url>
+ <description>A Policy Decision Point where all Enforcement Requests are routed
and processed</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.security.authz</groupId>
+ <artifactId>jboss-authz-common</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <!-- jboss xacml -->
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jboss-xacml</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jboss-sunxacml</artifactId>
+ </dependency>
+
+ <!-- sun jaxb -->
+ <dependency>
+ <groupId>sun-jaxb</groupId>
+ <artifactId>jaxb-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>sun-jaxb</groupId>
+ <artifactId>jaxb-impl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>sun-jaxb</groupId>
+ <artifactId>jaxb-xjc</artifactId>
+ </dependency>
+
+ <!-- junit -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.3.1</version>
+ <configuration>
+ <includes>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added:
modules/authorization/trunk/decision-point/src/main/java/org/jboss/security/authz/decision/PolicyDecisionPoint.java
===================================================================
---
modules/authorization/trunk/decision-point/src/main/java/org/jboss/security/authz/decision/PolicyDecisionPoint.java
(rev 0)
+++
modules/authorization/trunk/decision-point/src/main/java/org/jboss/security/authz/decision/PolicyDecisionPoint.java 2009-01-30
17:44:00 UTC (rev 12728)
@@ -0,0 +1,50 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, 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.authz.decision;
+
+/**
+ * This component processes all incoming Authorization requests and responds with a
response
+ *
+ * This component receives requests from native application layer Policy Enforcement
Points.
+ *
+ * This typically runs inside the Policy Server and is reachable over a network
connection
+ *
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ */
+public class PolicyDecisionPoint
+{
+ public PolicyDecisionPoint()
+ {
+
+ }
+
+ public void start()
+ {
+
+ }
+
+ public void stop()
+ {
+
+ }
+ //-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+}
Modified:
modules/authorization/trunk/enforcement/src/main/java/org/jboss/security/authz/enforcement/PolicyEnforcementPoint.java
===================================================================
---
modules/authorization/trunk/enforcement/src/main/java/org/jboss/security/authz/enforcement/PolicyEnforcementPoint.java 2009-01-30
16:43:12 UTC (rev 12727)
+++
modules/authorization/trunk/enforcement/src/main/java/org/jboss/security/authz/enforcement/PolicyEnforcementPoint.java 2009-01-30
17:44:00 UTC (rev 12728)
@@ -22,28 +22,22 @@
package org.jboss.security.authz.enforcement;
/**
+ * This component typically integrates natively with the application layer to receive
Authorization Requests
+ * It then processes the native request and routes it to the Policy Decision Point
component of the Policy Server to get a decision whether the
+ * Authorization should be granted or not or to do something else
+ *
+ * Sometimes, this component can just be a native stub that routes all requests over the
network to the Policy Server, and sometimes this component can be co-located with the
Policy Server
+ *
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
*/
-public class PolicyEnforcementPoint
+public interface PolicyEnforcementPoint
{
- public PolicyEnforcementPoint()
- {
-
- }
-
- public void start()
- {
-
- }
-
- public void stop()
- {
-
- }
- //------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- public Response checkAccess(Request request) throws EnforcementException
- {
- Response response = new Response();
- return response;
- }
+ /**
+ * Checks if Access should be granted for this particular Authorization Request
+ *
+ * @param request
+ * @return
+ * @throws EnforcementException
+ */
+ public Response checkAccess(Request request) throws EnforcementException;
}
Copied:
modules/authorization/trunk/enforcement/src/main/java/org/jboss/security/authz/enforcement/PolicyEnforcementPointImpl.java
(from rev 12727,
modules/authorization/trunk/enforcement/src/main/java/org/jboss/security/authz/enforcement/PolicyEnforcementPoint.java)
===================================================================
---
modules/authorization/trunk/enforcement/src/main/java/org/jboss/security/authz/enforcement/PolicyEnforcementPointImpl.java
(rev 0)
+++
modules/authorization/trunk/enforcement/src/main/java/org/jboss/security/authz/enforcement/PolicyEnforcementPointImpl.java 2009-01-30
17:44:00 UTC (rev 12728)
@@ -0,0 +1,56 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, 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.authz.enforcement;
+
+/**
+ * This component typically integrates natively with the application layer to receive
Authorization Requests
+ * It then processes the native request and routes it to the Policy Decision Point
component of the Policy Server to get a decision whether the
+ * Authorization should be granted or not or to do something else
+ *
+ * Sometimes, this component can just be a native stub that routes all requests over the
network to the Policy Server, and sometimes this component can be co-located with the
Policy Server
+ *
+ *
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ */
+public class PolicyEnforcementPointImpl implements PolicyEnforcementPoint
+{
+ public PolicyEnforcementPointImpl()
+ {
+
+ }
+
+ public void start()
+ {
+
+ }
+
+ public void stop()
+ {
+
+ }
+ //------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ public Response checkAccess(Request request) throws EnforcementException
+ {
+ Response response = new Response();
+ return response;
+ }
+}
Property changes on:
modules/authorization/trunk/enforcement/src/main/java/org/jboss/security/authz/enforcement/PolicyEnforcementPointImpl.java
___________________________________________________________________
Name: svn:mergeinfo
+
Modified:
modules/authorization/trunk/enforcement/src/main/java/org/jboss/security/authz/enforcement/Request.java
===================================================================
---
modules/authorization/trunk/enforcement/src/main/java/org/jboss/security/authz/enforcement/Request.java 2009-01-30
16:43:12 UTC (rev 12727)
+++
modules/authorization/trunk/enforcement/src/main/java/org/jboss/security/authz/enforcement/Request.java 2009-01-30
17:44:00 UTC (rev 12728)
@@ -31,6 +31,8 @@
import org.jboss.security.authz.model.Environment;
/**
+ * An Authorization Request
+ *
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
*/
public class Request implements Serializable
Modified:
modules/authorization/trunk/enforcement/src/main/java/org/jboss/security/authz/enforcement/Response.java
===================================================================
---
modules/authorization/trunk/enforcement/src/main/java/org/jboss/security/authz/enforcement/Response.java 2009-01-30
16:43:12 UTC (rev 12727)
+++
modules/authorization/trunk/enforcement/src/main/java/org/jboss/security/authz/enforcement/Response.java 2009-01-30
17:44:00 UTC (rev 12728)
@@ -24,6 +24,8 @@
import java.io.Serializable;
/**
+ * An Authorization Response
+ *
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
*/
public class Response implements Serializable
Modified: modules/authorization/trunk/pom.xml
===================================================================
--- modules/authorization/trunk/pom.xml 2009-01-30 16:43:12 UTC (rev 12727)
+++ modules/authorization/trunk/pom.xml 2009-01-30 17:44:00 UTC (rev 12728)
@@ -11,7 +11,8 @@
<modules>
<module>common</module>
- <module>core-components</module>
+ <module>core-components</module>
+ <module>decision-point</module>
<module>enforcement</module>
<module>provisioning</module>
<module>http-profile</module>