Author: sohil.shah(a)jboss.com
Date: 2010-06-05 15:08:51 -0400 (Sat, 05 Jun 2010)
New Revision: 1129
Added:
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/agent/
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/agent/enforcement/
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/agent/enforcement/EnforcementCacheComponent.java
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/agent/services/
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/agent/services/EnforcementStateGeneratorComponent.java
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/agent/services/PolicyComposerComponent.java
Removed:
authz/gatein/authz-plugin/trunk/client/
Modified:
authz/gatein/authz-plugin/trunk/.classpath
authz/gatein/authz-plugin/trunk/pom.xml
authz/gatein/authz-plugin/trunk/service/pom.xml
authz/gatein/authz-plugin/trunk/service/src/main/resources/conf/gatein-authz-configuration.xml
Log:
client kernel is overkill....policy components and agent components can all live inside
one container....think simple puhhhhlease!!!!
Modified: authz/gatein/authz-plugin/trunk/.classpath
===================================================================
--- authz/gatein/authz-plugin/trunk/.classpath 2010-06-05 17:24:38 UTC (rev 1128)
+++ authz/gatein/authz-plugin/trunk/.classpath 2010-06-05 19:08:51 UTC (rev 1129)
@@ -2,8 +2,6 @@
<classpath>
<classpathentry kind="src" path="service/src/main/java"/>
<classpathentry kind="src" path="service/src/test/java"/>
- <classpathentry kind="src" path="client/src/main/java"/>
- <classpathentry kind="src" path="client/src/test/java"/>
<classpathentry kind="src" path="tools/src/main/java"/>
<classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con"
path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
Modified: authz/gatein/authz-plugin/trunk/pom.xml
===================================================================
--- authz/gatein/authz-plugin/trunk/pom.xml 2010-06-05 17:24:38 UTC (rev 1128)
+++ authz/gatein/authz-plugin/trunk/pom.xml 2010-06-05 19:08:51 UTC (rev 1129)
@@ -10,7 +10,6 @@
<modules>
<module>service</module>
- <module>client</module>
<module>tools</module>
</modules>
@@ -105,6 +104,11 @@
<artifactId>policy-server</artifactId>
<version>trunk-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>org.jboss.security.authz</groupId>
+ <artifactId>agent</artifactId>
+ <version>trunk-SNAPSHOT</version>
+ </dependency>
<!-- Hibernate Dependency -->
<dependency>
Modified: authz/gatein/authz-plugin/trunk/service/pom.xml
===================================================================
--- authz/gatein/authz-plugin/trunk/service/pom.xml 2010-06-05 17:24:38 UTC (rev 1128)
+++ authz/gatein/authz-plugin/trunk/service/pom.xml 2010-06-05 19:08:51 UTC (rev 1129)
@@ -61,6 +61,10 @@
<groupId>org.jboss.security.authz</groupId>
<artifactId>policy-server</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.jboss.security.authz</groupId>
+ <artifactId>agent</artifactId>
+ </dependency>
<!-- Hibernate Dependency -->
<dependency>
Added:
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/agent/enforcement/EnforcementCacheComponent.java
===================================================================
---
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/agent/enforcement/EnforcementCacheComponent.java
(rev 0)
+++
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/agent/enforcement/EnforcementCacheComponent.java 2010-06-05
19:08:51 UTC (rev 1129)
@@ -0,0 +1,66 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2010, 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.gatein.authz.service.agent.enforcement;
+
+import org.exoplatform.container.xml.InitParams;
+import org.picocontainer.Startable;
+
+import org.jboss.security.authz.agent.enforcement.EnforcementCache;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class EnforcementCacheComponent implements Startable
+{
+ private final InitParams params;
+ private EnforcementCache enforcementCache;
+
+ public EnforcementCacheComponent(InitParams params)
+ {
+ this.params = params;
+ this.enforcementCache = new EnforcementCache();
+ }
+
+ @Override
+ public void start()
+ {
+ this.enforcementCache.start();
+ }
+
+ @Override
+ public void stop()
+ {
+ this.enforcementCache.stop();
+ }
+
+ public String getName()
+ {
+ return this.params.getValueParam("name").getValue();
+ }
+ //--------------------------------------------------------------------------------------------------------------------------------------------------------
+ public EnforcementCache getEnforcementCache()
+ {
+ return this.enforcementCache;
+ }
+}
Added:
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/agent/services/EnforcementStateGeneratorComponent.java
===================================================================
---
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/agent/services/EnforcementStateGeneratorComponent.java
(rev 0)
+++
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/agent/services/EnforcementStateGeneratorComponent.java 2010-06-05
19:08:51 UTC (rev 1129)
@@ -0,0 +1,64 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2010, 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.gatein.authz.service.agent.services;
+
+import org.exoplatform.container.xml.InitParams;
+import org.picocontainer.Startable;
+
+import org.jboss.security.authz.agent.services.EnforcementStateGenerator;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class EnforcementStateGeneratorComponent implements Startable
+{
+ private final InitParams params;
+ private EnforcementStateGenerator enforcementStateGenerator;
+
+ public EnforcementStateGeneratorComponent(InitParams params)
+ {
+ this.params = params;
+ this.enforcementStateGenerator = new EnforcementStateGenerator();
+ }
+
+ @Override
+ public void start()
+ {
+ }
+
+ @Override
+ public void stop()
+ {
+ }
+
+ public String getName()
+ {
+ return this.params.getValueParam("name").getValue();
+ }
+ //--------------------------------------------------------------------------------------------------------------------------------------------------------
+ public EnforcementStateGenerator getEnforcementStateGenerator()
+ {
+ return this.enforcementStateGenerator;
+ }
+}
Added:
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/agent/services/PolicyComposerComponent.java
===================================================================
---
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/agent/services/PolicyComposerComponent.java
(rev 0)
+++
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/agent/services/PolicyComposerComponent.java 2010-06-05
19:08:51 UTC (rev 1129)
@@ -0,0 +1,64 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2010, 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.gatein.authz.service.agent.services;
+
+import org.exoplatform.container.xml.InitParams;
+import org.picocontainer.Startable;
+
+import org.jboss.security.authz.agent.services.PolicyComposer;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class PolicyComposerComponent implements Startable
+{
+ private final InitParams params;
+ private PolicyComposer policyComposer;
+
+ public PolicyComposerComponent(InitParams params)
+ {
+ this.params = params;
+ this.policyComposer = new PolicyComposer();
+ }
+
+ @Override
+ public void start()
+ {
+ }
+
+ @Override
+ public void stop()
+ {
+ }
+
+ public String getName()
+ {
+ return this.params.getValueParam("name").getValue();
+ }
+ //--------------------------------------------------------------------------------------------------------------------------------------------------------
+ public PolicyComposer getPolicyComposer()
+ {
+ return this.policyComposer;
+ }
+}
Modified:
authz/gatein/authz-plugin/trunk/service/src/main/resources/conf/gatein-authz-configuration.xml
===================================================================
---
authz/gatein/authz-plugin/trunk/service/src/main/resources/conf/gatein-authz-configuration.xml 2010-06-05
17:24:38 UTC (rev 1128)
+++
authz/gatein/authz-plugin/trunk/service/src/main/resources/conf/gatein-authz-configuration.xml 2010-06-05
19:08:51 UTC (rev 1129)
@@ -8,7 +8,9 @@
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.
-->
<configuration
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd
http://www.exoplaform.org/xml/ns/kernel_1_1.xsd"
-
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd">
+
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd">
+
+ <!-- Policy Server Stack -->
<component>
<type>org.jboss.gatein.authz.service.event.LocalEventBusComponent</type>
<init-params>
@@ -72,4 +74,35 @@
</value-param>
</init-params>
</component>
+
+ <!-- Agent Integration Stack -->
+ <component>
+ <type>org.jboss.gatein.authz.service.agent.services.PolicyComposerComponent</type>
+ <init-params>
+ <value-param>
+ <name>name</name>
+ <value>/agent/PolicyComposer</value>
+ </value-param>
+ </init-params>
+ </component>
+
+ <component>
+ <type>org.jboss.gatein.authz.service.agent.services.EnforcementStateGeneratorComponent</type>
+ <init-params>
+ <value-param>
+ <name>name</name>
+ <value>/agent/EnforcementStateGenerator</value>
+ </value-param>
+ </init-params>
+ </component>
+
+ <component>
+ <type>org.jboss.gatein.authz.service.agent.enforcement.EnforcementCacheComponent</type>
+ <init-params>
+ <value-param>
+ <name>name</name>
+ <value>/agent/EnforcementCache</value>
+ </value-param>
+ </init-params>
+ </component>
</configuration>
\ No newline at end of file