Author: sohil.shah(a)jboss.com
Date: 2010-06-12 18:05:26 -0400 (Sat, 12 Jun 2010)
New Revision: 1131
Added:
authz/gatein/authz-plugin/trunk/service/src/main/resources/conf/configuration.xml
authz/gatein/authz-plugin/trunk/service/src/main/resources/conf/portal/configuration.xml
authz/gatein/authz-plugin/trunk/service/src/main/resources/hibernate.cfg.xml
Removed:
authz/gatein/authz-plugin/trunk/service/src/main/resources/conf/gatein-authz-configuration.xml
authz/gatein/authz-plugin/trunk/service/src/main/resources/conf/portal/gatein-authz-configuration.xml
Modified:
authz/gatein/authz-plugin/trunk/service/pom.xml
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/SecurityService.java
Log:
fixing kernel integration
Modified: authz/gatein/authz-plugin/trunk/service/pom.xml
===================================================================
--- authz/gatein/authz-plugin/trunk/service/pom.xml 2010-06-05 20:14:48 UTC (rev 1130)
+++ authz/gatein/authz-plugin/trunk/service/pom.xml 2010-06-12 22:05:26 UTC (rev 1131)
@@ -20,7 +20,8 @@
<artifactId>tools</artifactId>
<version>${project.version}</version>
</dependency>
-
+
+ <!-- GateIn Kernel -->
<dependency>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>exo.kernel.commons</artifactId>
@@ -44,6 +45,10 @@
<dependency>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>exo.kernel.component.ext.cache.impl.jboss.v3</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>picocontainer</groupId>
+ <artifactId>picocontainer</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
@@ -51,12 +56,8 @@
<version>1.5.6</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>picocontainer</groupId>
- <artifactId>picocontainer</artifactId>
- </dependency>
- <!-- authz -->
+ <!-- Authz -->
<dependency>
<groupId>org.jboss.security.authz</groupId>
<artifactId>policy-server</artifactId>
@@ -66,7 +67,6 @@
<artifactId>agent</artifactId>
</dependency>
- <!-- Hibernate Dependency -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
@@ -76,7 +76,6 @@
<artifactId>hsqldb</artifactId>
</dependency>
- <!-- Drools -->
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-core</artifactId>
Modified:
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/SecurityService.java
===================================================================
---
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/SecurityService.java 2010-06-05
20:14:48 UTC (rev 1130)
+++
authz/gatein/authz-plugin/trunk/service/src/main/java/org/jboss/gatein/authz/service/SecurityService.java 2010-06-12
22:05:26 UTC (rev 1131)
@@ -41,9 +41,9 @@
public void start()
{
//TODO: log message using GateIn Logging Framework
- URL rootURL =
getClass().getResource("/conf/gatein-authz-configuration.xml");
+ /*URL rootURL =
getClass().getResource("/conf/gatein-authz-configuration.xml");
URL portalURL =
getClass().getResource("/conf/portal/gatein-authz-configuration.xml");
- new ContainerBuilder().withRoot(rootURL).withPortal(portalURL).build();
+ new ContainerBuilder().withRoot(rootURL).withPortal(portalURL).build();*/
}
public void stop()
Copied: authz/gatein/authz-plugin/trunk/service/src/main/resources/conf/configuration.xml
(from rev 1130,
authz/gatein/authz-plugin/trunk/service/src/main/resources/conf/gatein-authz-configuration.xml)
===================================================================
--- authz/gatein/authz-plugin/trunk/service/src/main/resources/conf/configuration.xml
(rev 0)
+++
authz/gatein/authz-plugin/trunk/service/src/main/resources/conf/configuration.xml 2010-06-12
22:05:26 UTC (rev 1131)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+ <!--
+
+ Copyright (C) 2009 eXo Platform SAS. 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.
+ -->
+<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">
+</configuration>
\ No newline at end of file
Deleted:
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
20:14:48 UTC (rev 1130)
+++
authz/gatein/authz-plugin/trunk/service/src/main/resources/conf/gatein-authz-configuration.xml 2010-06-12
22:05:26 UTC (rev 1131)
@@ -1,138 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
- <!--
-
- Copyright (C) 2009 eXo Platform SAS. 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.
- -->
-<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">
-
- <!-- Policy Server Stack -->
- <component>
- <type>org.jboss.gatein.authz.service.event.LocalEventBusComponent</type>
- <init-params>
- <value-param>
- <name>name</name>
- <value>/policy-server/EventBus</value>
- </value-param>
- </init-params>
- </component>
-
- <component>
- <type>org.jboss.gatein.authz.service.tools.HibernateServiceComponent</type>
- <init-params>
- <value-param>
- <name>name</name>
- <value>/policy-server/HibernateService</value>
- </value-param>
- </init-params>
- </component>
-
- <component>
- <type>org.jboss.gatein.authz.service.provisioning.RelationalDBPolicyStoreComponent</type>
- <init-params>
- <value-param>
- <name>name</name>
- <value>/policy-server/PolicyStore</value>
- </value-param>
- </init-params>
- </component>
-
- <component>
- <type>org.jboss.gatein.authz.service.plugin.DroolsRuleManagerComponent</type>
- <init-params>
- <value-param>
- <name>name</name>
- <value>/policy-server/DroolsRuleManager</value>
- </value-param>
- </init-params>
- </component>
-
- <component>
- <type>org.jboss.gatein.authz.service.decision.PolicyDecisionPointComponent</type>
- <init-params>
- <value-param>
- <name>name</name>
- <value>/policy-server/PolicyDecisionPoint</value>
- </value-param>
- <value-param>
- <name>debug</name>
- <value>true</value>
- </value-param>
- </init-params>
- </component>
-
- <component>
- <type>org.jboss.gatein.authz.service.PolicyServerComponent</type>
- <init-params>
- <value-param>
- <name>name</name>
- <value>/policy-server/PolicyServer</value>
- </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>
-
- <component>
- <type>org.jboss.gatein.authz.service.agent.services.LocalEventObserverComponent</type>
- <init-params>
- <value-param>
- <name>name</name>
- <value>/agent/ServerEventObserver</value>
- </value-param>
- </init-params>
- </component>
-
- <component>
- <type>org.jboss.gatein.authz.service.agent.enforcement.LocalEnforcementPointComponent</type>
- <init-params>
- <value-param>
- <name>name</name>
- <value>/agent/LocalEnforcementPoint</value>
- </value-param>
- </init-params>
- </component>
-
- <component>
- <type>org.jboss.gatein.authz.service.agent.provisioning.LocalPolicyProvisionerComponent</type>
- <init-params>
- <value-param>
- <name>name</name>
- <value>/agent/LocalPolicyProvisioner</value>
- </value-param>
- </init-params>
- </component>
-</configuration>
\ No newline at end of file
Copied:
authz/gatein/authz-plugin/trunk/service/src/main/resources/conf/portal/configuration.xml
(from rev 1130,
authz/gatein/authz-plugin/trunk/service/src/main/resources/conf/portal/gatein-authz-configuration.xml)
===================================================================
---
authz/gatein/authz-plugin/trunk/service/src/main/resources/conf/portal/configuration.xml
(rev 0)
+++
authz/gatein/authz-plugin/trunk/service/src/main/resources/conf/portal/configuration.xml 2010-06-12
22:05:26 UTC (rev 1131)
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+ <!--
+
+ Copyright (C) 2009 eXo Platform SAS. 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.
+ -->
+<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">
+
+ <!-- Policy Server Stack -->
+ <component>
+ <type>org.jboss.gatein.authz.service.event.LocalEventBusComponent</type>
+ <init-params>
+ <value-param>
+ <name>name</name>
+ <value>/policy-server/EventBus</value>
+ </value-param>
+ </init-params>
+ </component>
+
+ <component>
+ <type>org.jboss.gatein.authz.service.tools.HibernateServiceComponent</type>
+ <init-params>
+ <value-param>
+ <name>name</name>
+ <value>/policy-server/HibernateService</value>
+ </value-param>
+ </init-params>
+ </component>
+
+ <component>
+ <type>org.jboss.gatein.authz.service.provisioning.RelationalDBPolicyStoreComponent</type>
+ <init-params>
+ <value-param>
+ <name>name</name>
+ <value>/policy-server/PolicyStore</value>
+ </value-param>
+ </init-params>
+ </component>
+
+ <component>
+ <type>org.jboss.gatein.authz.service.plugin.DroolsRuleManagerComponent</type>
+ <init-params>
+ <value-param>
+ <name>name</name>
+ <value>/policy-server/DroolsRuleManager</value>
+ </value-param>
+ </init-params>
+ </component>
+
+ <component>
+ <type>org.jboss.gatein.authz.service.decision.PolicyDecisionPointComponent</type>
+ <init-params>
+ <value-param>
+ <name>name</name>
+ <value>/policy-server/PolicyDecisionPoint</value>
+ </value-param>
+ <value-param>
+ <name>debug</name>
+ <value>true</value>
+ </value-param>
+ </init-params>
+ </component>
+
+ <component>
+ <type>org.jboss.gatein.authz.service.PolicyServerComponent</type>
+ <init-params>
+ <value-param>
+ <name>name</name>
+ <value>/policy-server/PolicyServer</value>
+ </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>
+
+ <component>
+ <type>org.jboss.gatein.authz.service.agent.services.LocalEventObserverComponent</type>
+ <init-params>
+ <value-param>
+ <name>name</name>
+ <value>/agent/ServerEventObserver</value>
+ </value-param>
+ </init-params>
+ </component>
+
+ <component>
+ <type>org.jboss.gatein.authz.service.agent.enforcement.LocalEnforcementPointComponent</type>
+ <init-params>
+ <value-param>
+ <name>name</name>
+ <value>/agent/LocalEnforcementPoint</value>
+ </value-param>
+ </init-params>
+ </component>
+
+ <component>
+ <type>org.jboss.gatein.authz.service.agent.provisioning.LocalPolicyProvisionerComponent</type>
+ <init-params>
+ <value-param>
+ <name>name</name>
+ <value>/agent/LocalPolicyProvisioner</value>
+ </value-param>
+ </init-params>
+ </component>
+</configuration>
\ No newline at end of file
Deleted:
authz/gatein/authz-plugin/trunk/service/src/main/resources/conf/portal/gatein-authz-configuration.xml
===================================================================
---
authz/gatein/authz-plugin/trunk/service/src/main/resources/conf/portal/gatein-authz-configuration.xml 2010-06-05
20:14:48 UTC (rev 1130)
+++
authz/gatein/authz-plugin/trunk/service/src/main/resources/conf/portal/gatein-authz-configuration.xml 2010-06-12
22:05:26 UTC (rev 1131)
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
- <!--
-
- Copyright (C) 2009 eXo Platform SAS. 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.
- -->
-<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">
-
-</configuration>
\ No newline at end of file
Added: authz/gatein/authz-plugin/trunk/service/src/main/resources/hibernate.cfg.xml
===================================================================
--- authz/gatein/authz-plugin/trunk/service/src/main/resources/hibernate.cfg.xml
(rev 0)
+++
authz/gatein/authz-plugin/trunk/service/src/main/resources/hibernate.cfg.xml 2010-06-12
22:05:26 UTC (rev 1131)
@@ -0,0 +1,59 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD//EN"
+ "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+
+<hibernate-configuration>
+ <session-factory>
+ <!-- Database connection settings -->
+ <property
name="connection.driver_class">org.hsqldb.jdbcDriver</property>
+ <property
name="connection.url">jdbc:hsqldb:file:target/testdb</property>
+ <property name="connection.username">sa</property>
+ <property name="connection.password"></property>
+
+ <!-- JDBC connection pool (use the built-in) -->
+ <property name="connection.pool_size">1</property>
+
+ <!-- SQL dialect -->
+ <property
name="dialect">org.hibernate.dialect.HSQLDialect</property>
+
+ <!-- Enable Hibernate's automatic session context management -->
+ <property
name="current_session_context_class">thread</property>
+
+ <!-- Disable the second-level cache -->
+ <property
name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
+
+ <!-- Echo all executed SQL to stdout -->
+ <property name="show_sql">true</property>
+
+ <!--
+ Drop and re-create the database schema on startup
+ -->
+ <property name="hbm2ddl.auto">create</property>
+
+ <mapping resource="policy.hbm.xml"/>
+ </session-factory>
+</hibernate-configuration>
\ No newline at end of file