gatein SVN: r693 - in portal/trunk/docs/user-guide: en and 1 other directories.
by do-not-reply@jboss.org
Author: sohil.shah(a)jboss.com
Date: 2009-11-19 13:14:17 -0500 (Thu, 19 Nov 2009)
New Revision: 693
Added:
portal/trunk/docs/user-guide/en/modules/SSO.xml
Modified:
portal/trunk/docs/user-guide/
portal/trunk/docs/user-guide/en/master.xml
Log:
adding sso component chapter
Property changes on: portal/trunk/docs/user-guide
___________________________________________________________________
Name: svn:ignore
- *.iml
.idea
+ *.iml
.idea
target
Modified: portal/trunk/docs/user-guide/en/master.xml
===================================================================
--- portal/trunk/docs/user-guide/en/master.xml 2009-11-19 17:33:42 UTC (rev 692)
+++ portal/trunk/docs/user-guide/en/master.xml 2009-11-19 18:14:17 UTC (rev 693)
@@ -118,6 +118,9 @@
<!-- Gadgets -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="modules/Gadgets.xml" />
+
+ <!-- Single Sign On -->
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="modules/SSO.xml" />
<!--
Added: portal/trunk/docs/user-guide/en/modules/SSO.xml
===================================================================
--- portal/trunk/docs/user-guide/en/modules/SSO.xml (rev 0)
+++ portal/trunk/docs/user-guide/en/modules/SSO.xml 2009-11-19 18:14:17 UTC (rev 693)
@@ -0,0 +1,173 @@
+<!--
+
+ 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.
+
+-->
+
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook V4.4//EN" "http://www.oasis-open.org/docbook/sgml/4.4/docbookx.dtd">
+<chapter>
+<title>Single Sign On</title>
+
+ <section>
+ <title>Overview of SSO</title>
+ <para>Portal as an integration and aggregation platform provides some form of SSO by itself. When you log into
+ the portal you gain access to many systems through portlets using a single identity. Still in many cases you
+ need to integrate the portal infrastructure with other SSO enabled systems. There are many different Identity Management
+ solutions on the market. In most cases each SSO framework provides its own way to plug into Java EE application.
+ </para>
+ </section>
+
+ <section>
+ <title>CAS - Central Authentication Service</title>
+ <para>This Single Sign On plugin enables seamless integration between GateIn Portal and the CAS Single Sign On Framework.
+ Details about CAS can be found <ulink url="http://www.ja-sig.org/products/cas/">here</ulink>
+ </para>
+ <section>
+ <title>Integration</title>
+ <section>
+ <title>From source</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Check out the GateIn SSO component from SVN using the following command:
+ <programlisting>
+ <![CDATA[
+svn co http://anonsvn.jboss.org/repos/gatein/components/sso/tags/<appropriate sso component version>
+ ]]>
+ </programlisting>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Update <emphasis>packaging/profiles.xml</emphasis> to reflect the directories where your local JBoss AS 5.1.0.GA and Tomcat 6.0.2 are installed
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section>
+ <title>Install CAS plugin into a designated CAS (3.3.4) server</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <programlisting>
+ <![CDATA[
+ mvn -Pplugin-cas-install install
+ ]]>
+ </programlisting>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section>
+ <title>Install CAS GateIn Agent into the designated GateIn server</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <programlisting>
+ <![CDATA[
+ mvn -Pgatein-cas-install install
+ ]]>
+ </programlisting>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ </section>
+ <section>
+ <title>CAS Server Plugin Configuration</title>
+ <para>
+ The CAS Server Plugin makes secure authentication callbacks to a RESTful service installed on the remote GateIn server in order to authenticate a user.
+ In order for the plugin to function correctly, it needs to be properly configured to connect to this service. This configuration is done via the
+ <emphasis>cas.war/WEB-INF/deployerConfigContext.xml</emphasis> file.
+ </para>
+ <para>
+ <programlisting>
+ <![CDATA[
+ <!--
+ Note: Modify the Plugin Configuration based on the actual information of a GateIn instance.
+ The instance can be anywhere on the internet...Not on localhost where CAS is running
+ -->
+ <bean class="org.gatein.sso.cas.plugin.AuthenticationPlugin">
+ <property name="gateInHost"><value>localhost</value></property>
+ <property name="gateInPort"><value>8080</value></property>
+ <property name="gateInContext"><value>portal</value></property>
+ </bean>
+ ]]>
+ </programlisting>
+ </para>
+ </section>
+ <section>
+ <title>GateIn Agent Configuration</title>
+ <para>
+ In a Single Sign On usecase, the GateIn server re-directs all "private" resource requests to the CAS server for authentication first. The CAS server can be
+ located anywhere on the Internet, and this information must be properly configured within the GateIn instance. This configuration needs to be done in 3 files
+ <itemizedlist>
+ <listitem>
+ <emphasis>gatein.ear/02portal.war/groovy/portal/webui/UILoginForm.gtmpl</emphasis>
+ <para>
+ <programlisting>
+ <![CDATA[
+ <script>
+ <%=uicomponent.event("Close");%>
+ window.location = 'http://localhost:8888/cas/login?service=http://localhost:8080/portal/priv...';
+ </script>
+ ]]>
+ </programlisting>
+ </para>
+ </listitem>
+ <listitem>
+ <emphasis>gatein.ear/02portal.war/login/jsp/login.jsp</emphasis>
+ <para>
+ <programlisting>
+ <![CDATA[
+ <html>
+ <head>
+ <script type="text/javascript">
+ window.location = 'http://localhost:8888/cas/login?service=http://localhost:8080/portal/priv...';
+ </script>
+ </head>
+ <body>
+ </body>
+ </html>
+ ]]>
+ </programlisting>
+ </para>
+ </listitem>
+ <listitem>
+ <emphasis>gatein.ear/02portal.war/WEB-INF/web.xml</emphasis>
+ <para>
+ <programlisting>
+ <![CDATA[
+ <servlet>
+ <servlet-name>InitiateLoginServlet</servlet-name>
+ <servlet-class>org.gatein.sso.agent.GenericSSOAgent</servlet-class>
+ <init-param>
+ <param-name>casServerUrl</param-name>
+ <param-value>http://localhost:8888/cas</param-value>
+ </init-param>
+ </servlet>
+ ]]>
+ </programlisting>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+
+ </section>
+ </section>
+</chapter>
\ No newline at end of file
15 years, 1 month
gatein SVN: r692 - tools/maven/parent/trunk.
by do-not-reply@jboss.org
Author: aheritier
Date: 2009-11-19 12:33:42 -0500 (Thu, 19 Nov 2009)
New Revision: 692
Modified:
tools/maven/parent/trunk/pom.xml
Log:
upgrade jboss-parent to v 5-beta-5
Modified: tools/maven/parent/trunk/pom.xml
===================================================================
--- tools/maven/parent/trunk/pom.xml 2009-11-19 17:16:02 UTC (rev 691)
+++ tools/maven/parent/trunk/pom.xml 2009-11-19 17:33:42 UTC (rev 692)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.jboss</groupId>
<artifactId>jboss-parent</artifactId>
- <version>5-beta-4</version>
+ <version>5-beta-5</version>
</parent>
<name>GateIn - Maven parent</name>
@@ -80,8 +80,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<configuration>
- <!-- This is a workaroud for MSOURCES-44 -->
- <includePom>true</includePom>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
15 years, 1 month
gatein SVN: r691 - in components/sso/trunk: packaging/cas and 1 other directory.
by do-not-reply@jboss.org
Author: sohil.shah(a)jboss.com
Date: 2009-11-19 12:16:02 -0500 (Thu, 19 Nov 2009)
New Revision: 691
Modified:
components/sso/trunk/packaging/cas/pom.xml
components/sso/trunk/pom.xml
Log:
pom fixes
Modified: components/sso/trunk/packaging/cas/pom.xml
===================================================================
--- components/sso/trunk/packaging/cas/pom.xml 2009-11-19 17:08:09 UTC (rev 690)
+++ components/sso/trunk/packaging/cas/pom.xml 2009-11-19 17:16:02 UTC (rev 691)
@@ -54,6 +54,7 @@
<plugin>
<groupId>org.jvnet.maven-antrun-extended-plugin</groupId>
<artifactId>maven-antrun-extended-plugin</artifactId>
+ <version>1.40</version>
<executions>
<execution>
<id>agent-package</id>
@@ -131,6 +132,7 @@
<plugin>
<groupId>org.jvnet.maven-antrun-extended-plugin</groupId>
<artifactId>maven-antrun-extended-plugin</artifactId>
+ <version>1.40</version>
<executions>
<execution>
<id>plugin-tomcat-package</id>
Modified: components/sso/trunk/pom.xml
===================================================================
--- components/sso/trunk/pom.xml 2009-11-19 17:08:09 UTC (rev 690)
+++ components/sso/trunk/pom.xml 2009-11-19 17:16:02 UTC (rev 691)
@@ -16,6 +16,13 @@
<version>trunk-SNAPSHOT</version>
<packaging>pom</packaging>
+ <parent>
+ <groupId>org.gatein</groupId>
+ <artifactId>gatein-parent</artifactId>
+ <version>1.0.0-Beta03</version>
+ </parent>
+
+
<name>Gatein Single Sign On Integration</name>
<url>http://www.jboss.org/gatein</url>
<description>Gatein Single Sign On Integration</description>
15 years, 1 month
gatein SVN: r690 - components/sso/trunk.
by do-not-reply@jboss.org
Author: sohil.shah(a)jboss.com
Date: 2009-11-19 12:08:09 -0500 (Thu, 19 Nov 2009)
New Revision: 690
Modified:
components/sso/trunk/.classpath
Log:
eclipse fix
Modified: components/sso/trunk/.classpath
===================================================================
--- components/sso/trunk/.classpath 2009-11-19 17:04:01 UTC (rev 689)
+++ components/sso/trunk/.classpath 2009-11-19 17:08:09 UTC (rev 690)
@@ -7,7 +7,7 @@
<classpathentry kind="src" path="gatein-cas-plugin/src/main/java"/>
<classpathentry kind="src" path="gatein-cas-plugin/src/test/java"/>
<classpathentry kind="src" path="gatein-josso-plugin/src/main/java"/>
- <classpathentry kind="src" path="gatein-opensso-plugin/src/main/java"/>
+ <!-- <classpathentry kind="src" path="gatein-opensso-plugin/src/main/java"/> -->
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="var" path="M2_REPO/org/jasig/cas/cas-server-core/3.3.4/cas-server-core-3.3.4.jar" sourcepath="M2_REPO/org/jasig/cas/cas-server-core/3.3.4/cas-server-core-3.3.4-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/apache-log4j/log4j/1.2.14/log4j-1.2.14.jar" sourcepath="M2_REPO/apache-log4j/log4j/1.2.14/log4j-1.2.14-sources.jar"/>
@@ -15,8 +15,10 @@
<classpathentry kind="var" path="M2_REPO/javax/ws/rs/jsr311-api/1.0/jsr311-api-1.0.jar" sourcepath="M2_REPO/javax/ws/rs/jsr311-api/1.0/jsr311-api-1.0-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/picocontainer/picocontainer/1.1/picocontainer-1.1.jar"/>
<classpathentry kind="var" path="M2_REPO/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar"/>
+ <!--
<classpathentry kind="var" path="M2_REPO/opensso/amserver/8.0/amserver-8.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/opensso/opensso/8.0/opensso-8.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/opensso/opensso/8.0/opensso-8.0.jar"/>
+ -->
<classpathentry kind="var" path="M2_REPO/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar" sourcepath="M2_REPO/javax/servlet/servlet-api/2.5/servlet-api-2.5-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/jasig/cas/cas-client-core/3.1.9/cas-client-core-3.1.9.jar"/>
<classpathentry kind="var" path="M2_REPO/org/josso/josso-basic-authscheme/1.8.1/josso-basic-authscheme-1.8.1.jar"/>
15 years, 1 month
gatein SVN: r689 - in components/sso/trunk: auth-callback and 3 other directories.
by do-not-reply@jboss.org
Author: sohil.shah(a)jboss.com
Date: 2009-11-19 12:04:01 -0500 (Thu, 19 Nov 2009)
New Revision: 689
Modified:
components/sso/trunk/agent/
components/sso/trunk/auth-callback/
components/sso/trunk/gatein-cas-plugin/
components/sso/trunk/gatein-josso-plugin/
components/sso/trunk/packaging/cas/
Log:
ignores
Property changes on: components/sso/trunk/agent
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: components/sso/trunk/auth-callback
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: components/sso/trunk/gatein-cas-plugin
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: components/sso/trunk/gatein-josso-plugin
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: components/sso/trunk/packaging/cas
___________________________________________________________________
Name: svn:ignore
+ target
15 years, 1 month
gatein SVN: r688 - in components/sso: trunk and 108 other directories.
by do-not-reply@jboss.org
Author: sohil.shah(a)jboss.com
Date: 2009-11-19 11:54:43 -0500 (Thu, 19 Nov 2009)
New Revision: 688
Added:
components/sso/trunk/
components/sso/trunk/.classpath
components/sso/trunk/.project
components/sso/trunk/README
components/sso/trunk/agent/
components/sso/trunk/agent/pom.xml
components/sso/trunk/agent/src/
components/sso/trunk/agent/src/main/
components/sso/trunk/agent/src/main/config/
components/sso/trunk/agent/src/main/config/josso/
components/sso/trunk/agent/src/main/config/josso/portal.war/
components/sso/trunk/agent/src/main/config/josso/portal.war/WEB-INF/
components/sso/trunk/agent/src/main/config/josso/portal.war/WEB-INF/classes/
components/sso/trunk/agent/src/main/config/josso/portal.war/WEB-INF/classes/josso-agent-config.xml
components/sso/trunk/agent/src/main/config/josso/portal.war/WEB-INF/web.xml
components/sso/trunk/agent/src/main/config/josso/portal.war/groovy/
components/sso/trunk/agent/src/main/config/josso/portal.war/groovy/portal/
components/sso/trunk/agent/src/main/config/josso/portal.war/groovy/portal/webui/
components/sso/trunk/agent/src/main/config/josso/portal.war/groovy/portal/webui/UILoginForm.gtmpl
components/sso/trunk/agent/src/main/config/josso/portal.war/login/
components/sso/trunk/agent/src/main/config/josso/portal.war/login/jsp/
components/sso/trunk/agent/src/main/config/josso/portal.war/login/jsp/login.jsp
components/sso/trunk/agent/src/main/java/
components/sso/trunk/agent/src/main/java/org/
components/sso/trunk/agent/src/main/java/org/gatein/
components/sso/trunk/agent/src/main/java/org/gatein/sso/
components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/
components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/GenericSSOAgent.java
components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/cas/
components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/cas/CASAgent.java
components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/josso/
components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/josso/JOSSOAgent.java
components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/login/
components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/login/SSOLoginModule.java
components/sso/trunk/agent/src/test/
components/sso/trunk/agent/src/test/java/
components/sso/trunk/agent/src/test/java/org/
components/sso/trunk/agent/src/test/java/org/gatein/
components/sso/trunk/agent/src/test/java/org/gatein/sso/
components/sso/trunk/agent/src/test/java/org/gatein/sso/agent/
components/sso/trunk/agent/src/test/java/org/gatein/sso/agent/cas/
components/sso/trunk/agent/src/test/java/org/gatein/sso/agent/cas/TestCASTicketValidation.java
components/sso/trunk/agent/src/test/java/org/gatein/sso/agent/josso/
components/sso/trunk/agent/src/test/java/org/gatein/sso/agent/josso/TestAssertionValidation.java
components/sso/trunk/agent/src/test/resources/
components/sso/trunk/agent/src/test/resources/josso-agent-config.xml
components/sso/trunk/agent/src/test/resources/log4j.properties
components/sso/trunk/auth-callback/
components/sso/trunk/auth-callback/pom.xml
components/sso/trunk/auth-callback/src/
components/sso/trunk/auth-callback/src/main/
components/sso/trunk/auth-callback/src/main/java/
components/sso/trunk/auth-callback/src/main/java/org/
components/sso/trunk/auth-callback/src/main/java/org/gatein/
components/sso/trunk/auth-callback/src/main/java/org/gatein/sso/
components/sso/trunk/auth-callback/src/main/java/org/gatein/sso/authentication/
components/sso/trunk/auth-callback/src/main/java/org/gatein/sso/authentication/callback/
components/sso/trunk/auth-callback/src/main/java/org/gatein/sso/authentication/callback/AuthenticationHandler.java
components/sso/trunk/auth-callback/src/main/resources/
components/sso/trunk/auth-callback/src/main/resources/conf/
components/sso/trunk/auth-callback/src/main/resources/conf/portal/
components/sso/trunk/auth-callback/src/main/resources/conf/portal/configuration.xml
components/sso/trunk/auth-callback/src/test/
components/sso/trunk/auth-callback/src/test/java/
components/sso/trunk/auth-callback/src/test/resources/
components/sso/trunk/gatein-cas-plugin/
components/sso/trunk/gatein-cas-plugin/pom.xml
components/sso/trunk/gatein-cas-plugin/src/
components/sso/trunk/gatein-cas-plugin/src/main/
components/sso/trunk/gatein-cas-plugin/src/main/java/
components/sso/trunk/gatein-cas-plugin/src/main/java/org/
components/sso/trunk/gatein-cas-plugin/src/main/java/org/gatein/
components/sso/trunk/gatein-cas-plugin/src/main/java/org/gatein/sso/
components/sso/trunk/gatein-cas-plugin/src/main/java/org/gatein/sso/cas/
components/sso/trunk/gatein-cas-plugin/src/main/java/org/gatein/sso/cas/plugin/
components/sso/trunk/gatein-cas-plugin/src/main/java/org/gatein/sso/cas/plugin/AuthenticationPlugin.java
components/sso/trunk/gatein-cas-plugin/src/main/resources/
components/sso/trunk/gatein-cas-plugin/src/main/resources/log4j.properties
components/sso/trunk/gatein-cas-plugin/src/test/
components/sso/trunk/gatein-cas-plugin/src/test/java/
components/sso/trunk/gatein-cas-plugin/src/test/java/org/
components/sso/trunk/gatein-cas-plugin/src/test/java/org/gatein/
components/sso/trunk/gatein-cas-plugin/src/test/java/org/gatein/sso/
components/sso/trunk/gatein-cas-plugin/src/test/java/org/gatein/sso/cas/
components/sso/trunk/gatein-cas-plugin/src/test/java/org/gatein/sso/cas/plugin/
components/sso/trunk/gatein-cas-plugin/src/test/java/org/gatein/sso/cas/plugin/TestAuthenticationPlugin.java
components/sso/trunk/gatein-cas-plugin/src/test/resources/
components/sso/trunk/gatein-josso-plugin/
components/sso/trunk/gatein-josso-plugin/pom.xml
components/sso/trunk/gatein-josso-plugin/src/
components/sso/trunk/gatein-josso-plugin/src/main/
components/sso/trunk/gatein-josso-plugin/src/main/config/
components/sso/trunk/gatein-josso-plugin/src/main/config/.directory
components/sso/trunk/gatein-josso-plugin/src/main/config/WEB-INF/
components/sso/trunk/gatein-josso-plugin/src/main/config/WEB-INF/gatein.properties
components/sso/trunk/gatein-josso-plugin/src/main/config/josso-gateway-config.xml
components/sso/trunk/gatein-josso-plugin/src/main/config/josso-gateway-gatein-stores.xml
components/sso/trunk/gatein-josso-plugin/src/main/java/
components/sso/trunk/gatein-josso-plugin/src/main/java/org/
components/sso/trunk/gatein-josso-plugin/src/main/java/org/gatein/
components/sso/trunk/gatein-josso-plugin/src/main/java/org/gatein/sso/
components/sso/trunk/gatein-josso-plugin/src/main/java/org/gatein/sso/josso/
components/sso/trunk/gatein-josso-plugin/src/main/java/org/gatein/sso/josso/plugin/
components/sso/trunk/gatein-josso-plugin/src/main/java/org/gatein/sso/josso/plugin/GateinIdentityPlugin.java
components/sso/trunk/gatein-opensso-plugin/
components/sso/trunk/gatein-opensso-plugin/amserver.jar
components/sso/trunk/gatein-opensso-plugin/opensso.jar
components/sso/trunk/gatein-opensso-plugin/pom.xml
components/sso/trunk/gatein-opensso-plugin/src/
components/sso/trunk/gatein-opensso-plugin/src/main/
components/sso/trunk/gatein-opensso-plugin/src/main/config/
components/sso/trunk/gatein-opensso-plugin/src/main/config/AuthenticationPlugin.xml
components/sso/trunk/gatein-opensso-plugin/src/main/java/
components/sso/trunk/gatein-opensso-plugin/src/main/java/org/
components/sso/trunk/gatein-opensso-plugin/src/main/java/org/gatein/
components/sso/trunk/gatein-opensso-plugin/src/main/java/org/gatein/sso/
components/sso/trunk/gatein-opensso-plugin/src/main/java/org/gatein/sso/opensso/
components/sso/trunk/gatein-opensso-plugin/src/main/java/org/gatein/sso/opensso/plugin/
components/sso/trunk/gatein-opensso-plugin/src/main/java/org/gatein/sso/opensso/plugin/AuthenticationPlugin.java
components/sso/trunk/gatein-opensso-plugin/src/main/java/org/gatein/sso/opensso/plugin/GateInPrincipal.java
components/sso/trunk/gatein-opensso-plugin/target/
components/sso/trunk/gatein-opensso-plugin/target/classes/
components/sso/trunk/gatein-opensso-plugin/target/classes/org/
components/sso/trunk/gatein-opensso-plugin/target/classes/org/gatein/
components/sso/trunk/gatein-opensso-plugin/target/classes/org/gatein/sso/
components/sso/trunk/gatein-opensso-plugin/target/classes/org/gatein/sso/opensso/
components/sso/trunk/gatein-opensso-plugin/target/classes/org/gatein/sso/opensso/plugin/
components/sso/trunk/gatein-opensso-plugin/target/classes/org/gatein/sso/opensso/plugin/AuthenticationPlugin.class
components/sso/trunk/gatein-opensso-plugin/target/classes/org/gatein/sso/opensso/plugin/GateInPrincipal.class
components/sso/trunk/gatein-opensso-plugin/target/gatein-opensso-plugin-trunk-SNAPSHOT.jar
components/sso/trunk/gatein-opensso-plugin/target/maven-archiver/
components/sso/trunk/gatein-opensso-plugin/target/maven-archiver/pom.properties
components/sso/trunk/packaging/
components/sso/trunk/packaging/cas/
components/sso/trunk/packaging/cas/pom.xml
components/sso/trunk/packaging/cas/src/
components/sso/trunk/packaging/cas/src/main/
components/sso/trunk/packaging/cas/src/main/config/
components/sso/trunk/packaging/cas/src/main/config/gatein/
components/sso/trunk/packaging/cas/src/main/config/gatein/jboss/
components/sso/trunk/packaging/cas/src/main/config/gatein/jboss/server/
components/sso/trunk/packaging/cas/src/main/config/gatein/jboss/server/default/
components/sso/trunk/packaging/cas/src/main/config/gatein/jboss/server/default/conf/
components/sso/trunk/packaging/cas/src/main/config/gatein/jboss/server/default/conf/login-config.xml
components/sso/trunk/packaging/cas/src/main/config/gatein/portal.war/
components/sso/trunk/packaging/cas/src/main/config/gatein/portal.war/WEB-INF/
components/sso/trunk/packaging/cas/src/main/config/gatein/portal.war/WEB-INF/web.xml
components/sso/trunk/packaging/cas/src/main/config/gatein/portal.war/groovy/
components/sso/trunk/packaging/cas/src/main/config/gatein/portal.war/groovy/portal/
components/sso/trunk/packaging/cas/src/main/config/gatein/portal.war/groovy/portal/webui/
components/sso/trunk/packaging/cas/src/main/config/gatein/portal.war/groovy/portal/webui/UILoginForm.gtmpl
components/sso/trunk/packaging/cas/src/main/config/gatein/portal.war/login/
components/sso/trunk/packaging/cas/src/main/config/gatein/portal.war/login/jsp/
components/sso/trunk/packaging/cas/src/main/config/gatein/portal.war/login/jsp/login.jsp
components/sso/trunk/packaging/cas/src/main/config/plugin/
components/sso/trunk/packaging/cas/src/main/config/plugin/WEB-INF/
components/sso/trunk/packaging/cas/src/main/config/plugin/WEB-INF/deployerConfigContext.xml
components/sso/trunk/packaging/josso/
components/sso/trunk/packaging/opensso/
components/sso/trunk/packaging/pom.xml
components/sso/trunk/packaging/profiles.xml
components/sso/trunk/pom.xml
Log:
sso module
Added: components/sso/trunk/.classpath
===================================================================
--- components/sso/trunk/.classpath (rev 0)
+++ components/sso/trunk/.classpath 2009-11-19 16:54:43 UTC (rev 688)
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="agent/src/main/java"/>
+ <classpathentry kind="src" path="agent/src/test/java"/>
+ <classpathentry kind="src" path="auth-callback/src/main/java"/>
+ <classpathentry kind="src" path="auth-callback/src/test/java"/>
+ <classpathentry kind="src" path="gatein-cas-plugin/src/main/java"/>
+ <classpathentry kind="src" path="gatein-cas-plugin/src/test/java"/>
+ <classpathentry kind="src" path="gatein-josso-plugin/src/main/java"/>
+ <classpathentry kind="src" path="gatein-opensso-plugin/src/main/java"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="var" path="M2_REPO/org/jasig/cas/cas-server-core/3.3.4/cas-server-core-3.3.4.jar" sourcepath="M2_REPO/org/jasig/cas/cas-server-core/3.3.4/cas-server-core-3.3.4-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/apache-log4j/log4j/1.2.14/log4j-1.2.14.jar" sourcepath="M2_REPO/apache-log4j/log4j/1.2.14/log4j-1.2.14-sources.jar"/>
+
+ <classpathentry kind="var" path="M2_REPO/javax/ws/rs/jsr311-api/1.0/jsr311-api-1.0.jar" sourcepath="M2_REPO/javax/ws/rs/jsr311-api/1.0/jsr311-api-1.0-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/picocontainer/picocontainer/1.1/picocontainer-1.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/opensso/amserver/8.0/amserver-8.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/opensso/opensso/8.0/opensso-8.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar" sourcepath="M2_REPO/javax/servlet/servlet-api/2.5/servlet-api-2.5-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jasig/cas/cas-client-core/3.1.9/cas-client-core-3.1.9.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/josso/josso-basic-authscheme/1.8.1/josso-basic-authscheme-1.8.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/josso/josso-agent/1.8.1/josso-agent-1.8.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/josso/josso-agent-shared/1.8.1/josso-agent-shared-1.8.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/josso/josso-common/1.8.1/josso-common-1.8.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/josso/josso-core/1.8.1/josso-core-1.8.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/josso/josso-protocol-client/1.8.1/josso-protocol-client-1.8.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/josso/josso-servlet-agent/1.8.1/josso-servlet-agent-1.8.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/josso/josso-ws/1.8.1/josso-ws-1.8.1.jar"/>
+
+ <classpathentry kind="var" path="M2_REPO/org/exoplatform/core/exo.core.component.database/2.3.0-Beta02/exo.core.component.database-2.3.0-Beta02.jar" sourcepath="M2_REPO/org/exoplatform/core/exo.core.component.database/2.3.0-Beta02/exo.core.component.database-2.3.0-Beta02-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/exoplatform/core/exo.core.component.document/2.3.0-Beta02/exo.core.component.document-2.3.0-Beta02.jar" sourcepath="M2_REPO/org/exoplatform/core/exo.core.component.document/2.3.0-Beta02/exo.core.component.document-2.3.0-Beta02-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/exoplatform/core/exo.core.component.organization.api/2.3.0-Beta02/exo.core.component.organization.api-2.3.0-Beta02.jar" sourcepath="M2_REPO/org/exoplatform/core/exo.core.component.organization.api/2.3.0-Beta02/exo.core.component.organization.api-2.3.0-Beta02-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/exoplatform/core/exo.core.component.script.groovy/2.3.0-Beta02/exo.core.component.script.groovy-2.3.0-Beta02.jar" sourcepath="M2_REPO/org/exoplatform/core/exo.core.component.script.groovy/2.3.0-Beta02/exo.core.component.script.groovy-2.3.0-Beta02-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/exoplatform/core/exo.core.component.security.core/2.3.0-Beta02/exo.core.component.security.core-2.3.0-Beta02.jar" sourcepath="M2_REPO/org/exoplatform/core/exo.core.component.security.core/2.3.0-Beta02/exo.core.component.security.core-2.3.0-Beta02-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/exoplatform/core/exo.core.component.xml-processing/2.3.0-Beta02/exo.core.component.xml-processing-2.3.0-Beta02.jar" sourcepath="M2_REPO/org/exoplatform/core/exo.core.component.xml-processing/2.3.0-Beta02/exo.core.component.xml-processing-2.3.0-Beta02-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/exoplatform/jcr/exo.jcr.component.core/1.12.0-Beta02/exo.jcr.component.core-1.12.0-Beta02.jar" sourcepath="M2_REPO/org/exoplatform/jcr/exo.jcr.component.core/1.12.0-Beta02/exo.jcr.component.core-1.12.0-Beta02-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/exoplatform/jcr/exo.jcr.component.ext/1.12.0-Beta02/exo.jcr.component.ext-1.12.0-Beta02.jar" sourcepath="M2_REPO/org/exoplatform/jcr/exo.jcr.component.ext/1.12.0-Beta02/exo.jcr.component.ext-1.12.0-Beta02-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/exoplatform/kernel/exo.kernel.commons/2.2.0-Beta02/exo.kernel.commons-2.2.0-Beta02.jar" sourcepath="M2_REPO/org/exoplatform/kernel/exo.kernel.commons/2.2.0-Beta02/exo.kernel.commons-2.2.0-Beta02-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/exoplatform/kernel/exo.kernel.component.cache/2.2.0-Beta02/exo.kernel.component.cache-2.2.0-Beta02.jar" sourcepath="M2_REPO/org/exoplatform/kernel/exo.kernel.component.cache/2.2.0-Beta02/exo.kernel.component.cache-2.2.0-Beta02-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/exoplatform/kernel/exo.kernel.component.command/2.2.0-Beta02/exo.kernel.component.command-2.2.0-Beta02.jar" sourcepath="M2_REPO/org/exoplatform/kernel/exo.kernel.component.command/2.2.0-Beta02/exo.kernel.component.command-2.2.0-Beta02-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/exoplatform/kernel/exo.kernel.component.common/2.2.0-Beta02/exo.kernel.component.common-2.2.0-Beta02.jar" sourcepath="M2_REPO/org/exoplatform/kernel/exo.kernel.component.common/2.2.0-Beta02/exo.kernel.component.common-2.2.0-Beta02-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/exoplatform/kernel/exo.kernel.component.remote/2.2.0-Beta02/exo.kernel.component.remote-2.2.0-Beta02.jar" sourcepath="M2_REPO/org/exoplatform/kernel/exo.kernel.component.remote/2.2.0-Beta02/exo.kernel.component.remote-2.2.0-Beta02-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/exoplatform/kernel/exo.kernel.container/2.2.0-Beta02/exo.kernel.container-2.2.0-Beta02.jar" sourcepath="M2_REPO/org/exoplatform/kernel/exo.kernel.container/2.2.0-Beta02/exo.kernel.container-2.2.0-Beta02-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/exoplatform/portal/exo.portal.component.common/3.0.0-CR01-SNAPSHOT/exo.portal.component.common-3.0.0-CR01-SNAPSHOT.jar" sourcepath="M2_REPO/org/exoplatform/portal/exo.portal.component.common/3.0.0-CR01-SNAPSHOT/exo.portal.component.common-3.0.0-CR01-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/exoplatform/portal/exo.portal.component.scripting/3.0.0-CR01-SNAPSHOT/exo.portal.component.scripting-3.0.0-CR01-SNAPSHOT.jar" sourcepath="M2_REPO/org/exoplatform/portal/exo.portal.component.scripting/3.0.0-CR01-SNAPSHOT/exo.portal.component.scripting-3.0.0-CR01-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/exoplatform/portal/exo.portal.component.web/3.0.0-CR01-SNAPSHOT/exo.portal.component.web-3.0.0-CR01-SNAPSHOT.jar" sourcepath="M2_REPO/org/exoplatform/portal/exo.portal.component.web/3.0.0-CR01-SNAPSHOT/exo.portal.component.web-3.0.0-CR01-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/exoplatform/portal/exo.portal.component.xml-parser/3.0.0-CR01-SNAPSHOT/exo.portal.component.xml-parser-3.0.0-CR01-SNAPSHOT.jar" sourcepath="M2_REPO/org/exoplatform/portal/exo.portal.component.xml-parser/3.0.0-CR01-SNAPSHOT/exo.portal.component.xml-parser-3.0.0-CR01-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/exoplatform/tool/exo.tool.framework.junit/1.2.0/exo.tool.framework.junit-1.2.0.jar" sourcepath="M2_REPO/org/exoplatform/tool/exo.tool.framework.junit/1.2.0/exo.tool.framework.junit-1.2.0-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/exoplatform/ws/exo.ws.commons/2.1.0-Beta02/exo.ws.commons-2.1.0-Beta02.jar" sourcepath="M2_REPO/org/exoplatform/ws/exo.ws.commons/2.1.0-Beta02/exo.ws.commons-2.1.0-Beta02-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/exoplatform/ws/exo.ws.frameworks.json/2.1.0-Beta02/exo.ws.frameworks.json-2.1.0-Beta02.jar" sourcepath="M2_REPO/org/exoplatform/ws/exo.ws.frameworks.json/2.1.0-Beta02/exo.ws.frameworks.json-2.1.0-Beta02-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/exoplatform/ws/exo.ws.rest.core/2.1.0-Beta02/exo.ws.rest.core-2.1.0-Beta02.jar" sourcepath="M2_REPO/org/exoplatform/ws/exo.ws.rest.core/2.1.0-Beta02/exo.ws.rest.core-2.1.0-Beta02-sources.jar"/>
+
+ <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: components/sso/trunk/.project
===================================================================
--- components/sso/trunk/.project (rev 0)
+++ components/sso/trunk/.project 2009-11-19 16:54:43 UTC (rev 688)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>gatein-sso-trunk</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: components/sso/trunk/README
===================================================================
--- components/sso/trunk/README (rev 0)
+++ components/sso/trunk/README 2009-11-19 16:54:43 UTC (rev 688)
@@ -0,0 +1,41 @@
+Instructions:
+-----------------
+
+Build All:
+---------------------------------
+* mvn clean install
+
+or
+
+* mvn clean package
+
+
+
+
+
+Install CAS plugin into a designated CAS (3.3.4) server:
+-------------------------------------------------
+Step 1: Go to the packaging directory: cd packaging
+
+Step 2: Update the profiles.xml to reflect the directories where your local JBoss AS 5.1.0.GA and Tomcat 6.0.2 are installed
+
+Step 3: mvn -Pplugin-cas-install install
+
+
+
+Install CAS GateIn Agent into the designated GateIn server:
+-----------------------------------------------------------
+Step 1: Go to the packaging directory: cd packaging
+
+Step 2: Update the profiles.xml to reflect the directories where your local JBoss AS 5.1.0.GA and Tomcat 6.0.2 are installed
+
+Step 3: mvn -Pgatein-cas-install install
+
+
+
+Under Construction:
+---------------------
+
+* JOSSO 1.8.1 integration
+
+* OpenSSO 8.0 Update1 integration
\ No newline at end of file
Added: components/sso/trunk/agent/pom.xml
===================================================================
--- components/sso/trunk/agent/pom.xml (rev 0)
+++ components/sso/trunk/agent/pom.xml 2009-11-19 16:54:43 UTC (rev 688)
@@ -0,0 +1,194 @@
+<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.gatein.sso</groupId>
+ <artifactId>gatein-sso-parent</artifactId>
+ <relativePath>../pom.xml</relativePath>
+ <version>trunk-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>agent</artifactId>
+ <packaging>jar</packaging>
+ <name>Gatein SSO Agent</name>
+
+ <properties>
+ <!-- ChangeMe to your specific local environment -->
+ <gatein.location>/home/soshah/projects/gatein/runtime/jboss/server/default</gatein.location>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.gatein.sso</groupId>
+ <artifactId>auth-callback</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.component.web</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.core</groupId>
+ <artifactId>exo.core.component.organization.api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jasig.cas</groupId>
+ <artifactId>cas-client-core</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.josso</groupId>
+ <artifactId>josso-agent</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.josso</groupId>
+ <artifactId>josso-servlet-agent</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.josso</groupId>
+ <artifactId>josso-agent-shared</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.josso</groupId>
+ <artifactId>josso-protocol-client</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.3.1</version>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+
+ <!-- profile for packaging and deploying this plugin into a cas server -->
+ <profiles>
+ <profile>
+ <id>integration-tests</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.3.1</version>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <!--
+ TODO: move this into packaging module
+ -->
+ <!--
+ <profile>
+ <id>josso-agent</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.jvnet.maven-antrun-extended-plugin</groupId>
+ <artifactId>maven-antrun-extended-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>josso-agent-package</id>
+ <phase>package</phase>
+ <configuration>
+ <tasks>
+ <echo message="Preparing the JOSSO Agent for GateIn"/>
+
+
+ <delete dir="${basedir}/target/josso"/>
+ <mkdir dir="${basedir}/target/josso"/>
+
+ <unjar src="${settings.localRepository}/org/exoplatform/portal/exo.portal.web.portal/${org.exoplatform.portal.version}/exo.portal.web.portal-${org.exoplatform.portal.version}.war"
+ dest="${basedir}/target/josso/portal.war" overwrite="true"/>
+
+
+ <copy todir="${basedir}/target/josso/portal.war" overwrite="true">
+ <fileset dir="${basedir}/src/main/config/josso/portal.war"/>
+ </copy>
+
+
+ <jar destfile="${basedir}/target/josso/02portal.war" basedir="${basedir}/target/josso/portal.war"/>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>josso-agent-install</id>
+ <phase>install</phase>
+ <configuration>
+ <tasks>
+ <echo message="Deploying the JOSSO Agent for GateIn"/>
+
+ <copy file="${basedir}/target/josso/02portal.war"
+ todir="${gatein.location}/deploy/gatein.ear"
+ overwrite="true"/>
+
+
+ <copy file="${settings.localRepository}/org/gatein/sso/auth-callback/${project.version}/auth-callback-${project.version}.jar"
+ todir="${gatein.location}/deploy/gatein.ear/lib"
+ overwrite="true"/>
+
+
+ <copy file="${settings.localRepository}/org/gatein/sso/agent/${project.version}/agent-${project.version}.jar"
+ todir="${gatein.location}/deploy/gatein.ear/lib"
+ overwrite="true"/>
+
+
+
+ <copy file="${settings.localRepository}/org/josso/josso-agent/${version.josso}/josso-agent-${version.josso}.jar"
+ todir="${gatein.location}/deploy/gatein.ear/lib"
+ overwrite="true"/>
+
+ <copy file="${settings.localRepository}/org/josso/josso-servlet-agent/${version.josso}/josso-servlet-agent-${version.josso}.jar"
+ todir="${gatein.location}/deploy/gatein.ear/lib"
+ overwrite="true"/>
+
+ <copy file="${settings.localRepository}/org/josso/josso-agent-shared/${version.josso}/josso-agent-shared-${version.josso}.jar"
+ todir="${gatein.location}/deploy/gatein.ear/lib"
+ overwrite="true"/>
+
+ <copy file="${settings.localRepository}/org/josso/josso-protocol-client/${version.josso}/josso-protocol-client-${version.josso}.jar"
+ todir="${gatein.location}/deploy/gatein.ear/lib"
+ overwrite="true"/>
+
+ <copy file="${settings.localRepository}/org/josso/josso-common/${version.josso}/josso-common-${version.josso}.jar"
+ todir="${gatein.location}/deploy/gatein.ear/lib"
+ overwrite="true"/>
+
+ <copy file="${settings.localRepository}/org/josso/josso-core/${version.josso}/josso-core-${version.josso}.jar"
+ todir="${gatein.location}/deploy/gatein.ear/lib"
+ overwrite="true"/>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ -->
+ </profiles>
+</project>
+
Added: components/sso/trunk/agent/src/main/config/josso/portal.war/WEB-INF/classes/josso-agent-config.xml
===================================================================
--- components/sso/trunk/agent/src/main/config/josso/portal.war/WEB-INF/classes/josso-agent-config.xml (rev 0)
+++ components/sso/trunk/agent/src/main/config/josso/portal.war/WEB-INF/classes/josso-agent-config.xml 2009-11-19 16:54:43 UTC (rev 688)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<s:beans xmlns:s="http://www.springframework.org/schema/beans"
+ xmlns:gen-svlt="urn:org:josso:agent:generic-servlet"
+ xmlns:agent="urn:org:josso:agent:core"
+ xmlns:protocol="urn:org:josso:protocol:client"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+
+<gen-svlt:agent name="josso-tomcat60-agent" sessionAccessMinInterval="1000">
+
+ <gatewayLoginUrl>http://localhost:8888/josso/signon/login.do</gatewayLoginUrl>
+ <gatewayLogoutUrl>http://localhost:8888/josso/signon/logout.do</gatewayLogoutUrl>
+
+ <gatewayServiceLocator>
+ <protocol:ws-service-locator endpoint="localhost:8888"/>
+ </gatewayServiceLocator>
+ <configuration>
+ <agent:agent-configuration>
+ <agent:partner-apps>
+ <agent:partner-app id="portal" context="/portal"/>
+ </agent:partner-apps>
+ </agent:agent-configuration>
+ </configuration>
+ <parametersBuilders>
+ <agent:vhost-parameters-builder/>
+ <agent:appctx-parameters-builder/>
+ </parametersBuilders>
+ </gen-svlt:agent>
+</s:beans>
\ No newline at end of file
Added: components/sso/trunk/agent/src/main/config/josso/portal.war/WEB-INF/web.xml
===================================================================
--- components/sso/trunk/agent/src/main/config/josso/portal.war/WEB-INF/web.xml (rev 0)
+++ components/sso/trunk/agent/src/main/config/josso/portal.war/WEB-INF/web.xml 2009-11-19 16:54:43 UTC (rev 688)
@@ -0,0 +1,312 @@
+<?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.
+
+-->
+
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+ <display-name>portal</display-name>
+
+ <context-param>
+ <param-name>org.exoplatform.frameworks.jcr.command.web.fckeditor.digitalAssetsWorkspace</param-name>
+ <param-value>portal</param-value>
+ <description>Binary assets workspace name</description>
+ </context-param>
+
+ <context-param>
+ <param-name>org.exoplatform.frameworks.jcr.command.web.fckeditor.digitalAssetsPath</param-name>
+ <param-value>/</param-value>
+ <description>Binary assets path</description>
+ </context-param>
+
+ <!-- ================================================================== -->
+ <!-- RESOURCE FILTER TO CACHE MERGED JAVASCRIPT AND CSS -->
+ <!-- ================================================================== -->
+ <filter>
+ <filter-name>GenericFilter</filter-name>
+ <filter-class>org.exoplatform.web.filter.GenericFilter</filter-class>
+ </filter>
+ <filter>
+ <filter-name>ResourceRequestFilter</filter-name>
+ <filter-class>org.exoplatform.portal.application.ResourceRequestFilter</filter-class>
+ </filter>
+
+ <filter>
+ <filter-name>ThreadLocalSessionProviderInitializedFilter</filter-name>
+ <filter-class>org.exoplatform.frameworks.jcr.web.ThreadLocalSessionProviderInitializedFilter</filter-class>
+ </filter>
+
+ <filter>
+ <filter-name>SetCurrentIdentityFilter</filter-name>
+ <filter-class>org.exoplatform.services.security.web.SetCurrentIdentityFilter</filter-class>
+ </filter>
+
+ <filter>
+ <filter-name>RestEncodingFilter</filter-name>
+ <filter-class>org.exoplatform.services.rest.servlet.RestEncodingFilter</filter-class>
+ <init-param>
+ <param-name>REQUEST_ENCODING</param-name>
+ <param-value>UTF-8</param-value>
+ </init-param>
+ </filter>
+
+ <filter>
+ <filter-name>CacheUserProfileFilter</filter-name>
+ <filter-class>org.exoplatform.web.CacheUserProfileFilter</filter-class>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>GenericFilter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+ <filter-mapping>
+ <filter-name>ResourceRequestFilter</filter-name>
+ <url-pattern>*.css</url-pattern>
+ </filter-mapping>
+
+ <filter-mapping>
+ <filter-name>ResourceRequestFilter</filter-name>
+ <url-pattern>*.gif</url-pattern>
+ </filter-mapping>
+
+ <filter-mapping>
+ <filter-name>ResourceRequestFilter</filter-name>
+ <url-pattern>*.png</url-pattern>
+ </filter-mapping>
+
+ <filter-mapping>
+ <filter-name>ResourceRequestFilter</filter-name>
+ <url-pattern>*.jpg</url-pattern>
+ </filter-mapping>
+
+ <filter-mapping>
+ <filter-name>ResourceRequestFilter</filter-name>
+ <url-pattern>/javascript/*</url-pattern>
+ </filter-mapping>
+
+ <filter-mapping>
+ <filter-name>SetCurrentIdentityFilter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+ <filter-mapping>
+ <filter-name>CacheUserProfileFilter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+ <filter-mapping>
+ <filter-name>RestEncodingFilter</filter-name>
+ <url-pattern>/rest/*</url-pattern>
+ </filter-mapping>
+
+ <filter-mapping>
+ <filter-name>ThreadLocalSessionProviderInitializedFilter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+ <!-- ================================================================== -->
+ <!-- LISTENER -->
+ <!-- ================================================================== -->
+ <listener>
+ <listener-class>org.exoplatform.web.GenericHttpListener</listener-class>
+ </listener>
+ <listener>
+ <listener-class>org.exoplatform.portal.application.PortalSessionListener</listener-class>
+ </listener>
+ <listener>
+ <listener-class>org.exoplatform.services.security.web.JAASConversationStateListener</listener-class>
+ </listener>
+ <!-- ================================================================== -->
+ <!-- SERVLET -->
+ <!-- ================================================================== -->
+ <servlet>
+ <servlet-name>portal</servlet-name>
+ <servlet-class>org.exoplatform.portal.application.PortalController</servlet-class>
+ <init-param>
+ <param-name>webui.configuration</param-name>
+ <param-value>app:/WEB-INF/webui-configuration.xml</param-value>
+ </init-param>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <servlet>
+ <servlet-name>RestServer</servlet-name>
+ <description>eXo - Platform REST Server</description>
+ <servlet-class>org.exoplatform.services.rest.servlet.RestServlet</servlet-class>
+ <load-on-startup>4</load-on-startup>
+ </servlet>
+
+ <servlet>
+ <servlet-name>javascript</servlet-name>
+ <servlet-class>org.exoplatform.portal.webui.javascript.JavascriptServlet</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>Controller</servlet-name>
+ <servlet-class>org.exoplatform.frameworks.jcr.web.CommandControllerServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <!-- SSO Integration -->
+ <!--
+ <servlet>
+ <servlet-name>PortalLoginController</servlet-name>
+ <servlet-class>org.exoplatform.web.login.PortalLoginController</servlet-class>
+ </servlet>
+ <servlet>
+ <servlet-name>InitiateLoginServlet</servlet-name>
+ <servlet-class>org.exoplatform.web.login.InitiateLoginServlet</servlet-class>
+ </servlet>
+ -->
+ <servlet>
+ <servlet-name>InitiateLoginServlet</servlet-name>
+ <servlet-class>org.gatein.sso.agent.GenericSSOAgent</servlet-class>
+ <init-param>
+ <param-name>casServerUrl</param-name>
+ <param-value>http://localhost:8888/cas</param-value>
+ </init-param>
+ </servlet>
+
+ <servlet>
+ <servlet-name>ErrorLoginServlet</servlet-name>
+ <servlet-class>org.exoplatform.web.login.ErrorLoginServlet</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>GateInServlet</servlet-name>
+ <servlet-class>org.gatein.wci.api.GateInServlet</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <!-- ================================================================= -->
+ <servlet-mapping>
+ <servlet-name>InitiateLoginServlet</servlet-name>
+ <url-pattern>/initiatelogin</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>ErrorLoginServlet</servlet-name>
+ <url-pattern>/errorlogin</url-pattern>
+ </servlet-mapping>
+
+ <!-- SSO Integration -->
+ <!--
+ <servlet-mapping>
+ <servlet-name>PortalLoginController</servlet-name>
+ <url-pattern>/login</url-pattern>
+ </servlet-mapping>
+ -->
+
+ <servlet-mapping>
+ <servlet-name>javascript</servlet-name>
+ <url-pattern>/javascript/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>portal</servlet-name>
+ <url-pattern>/private/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>portal</servlet-name>
+ <url-pattern>/public/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>portal</servlet-name>
+ <url-pattern>/admin/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>portal</servlet-name>
+ <url-pattern>/service</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>portal</servlet-name>
+ <url-pattern>/command/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>RestServer</servlet-name>
+ <url-pattern>/rest/*</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>Controller</servlet-name>
+ <url-pattern>/connector</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>GateInServlet</servlet-name>
+ <url-pattern>/gateinservlet</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>30</session-timeout>
+ </session-config>
+
+ <!-- The Welcome File List for IBM WebSphere -->
+
+ <welcome-file-list>
+ <welcome-file>/index.jsp</welcome-file>
+ </welcome-file-list>
+
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>user authentication</web-resource-name>
+ <url-pattern>/private/*</url-pattern>
+ <http-method>POST</http-method>
+ <http-method>GET</http-method>
+ </web-resource-collection>
+ <auth-constraint>
+ <role-name>users</role-name>
+ </auth-constraint>
+ <user-data-constraint>
+ <transport-guarantee>NONE</transport-guarantee>
+ </user-data-constraint>
+ </security-constraint>
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>admin authentication</web-resource-name>
+ <url-pattern>/admin/*</url-pattern>
+ <http-method>POST</http-method>
+ <http-method>GET</http-method>
+ </web-resource-collection>
+ <auth-constraint>
+ <role-name>admin</role-name>
+ </auth-constraint>
+ <user-data-constraint>
+ <transport-guarantee>NONE</transport-guarantee>
+ </user-data-constraint>
+ </security-constraint>
+ <login-config>
+ <auth-method>FORM</auth-method>
+ <realm-name>exo-domain</realm-name>
+ <form-login-config>
+ <form-login-page>/initiatelogin</form-login-page>
+ <form-error-page>/errorlogin</form-error-page>
+ </form-login-config>
+ </login-config>
+ <security-role>
+ <description>a simple user role</description>
+ <role-name>users</role-name>
+ </security-role>
+ <security-role>
+ <description>the admin role</description>
+ <role-name>admin</role-name>
+ </security-role>
+</web-app>
\ No newline at end of file
Added: components/sso/trunk/agent/src/main/config/josso/portal.war/groovy/portal/webui/UILoginForm.gtmpl
===================================================================
--- components/sso/trunk/agent/src/main/config/josso/portal.war/groovy/portal/webui/UILoginForm.gtmpl (rev 0)
+++ components/sso/trunk/agent/src/main/config/josso/portal.war/groovy/portal/webui/UILoginForm.gtmpl 2009-11-19 16:54:43 UTC (rev 688)
@@ -0,0 +1,87 @@
+<%
+ import org.exoplatform.web.application.JavascriptManager;
+ import javax.servlet.http.HttpSession;
+ def rcontext = _ctx.getRequestContext();
+ JavascriptManager jsmanager = rcontext.getJavascriptManager();
+ jsmanager.importJavascript('eXo.portal.UIPortalControl');
+ jsmanager.addCustomizedOnLoadScript('document.getElementById("UIPortalComponentLogin").username.focus();');
+ HttpSession session = rcontext.getRequest().getSession();
+ String requestPath = rcontext.getRequestContextPath() + "/private/" + rcontext.getPortalOwner();
+ session.setAttribute("initialURI", requestPath);
+%>
+<div class="UILoginForm">
+ <div class="LoginDecorator">
+ <div class="TopLeftLoginDecorator">
+ <div class="TopRightLoginDecorator">
+ <div class="TopCenterLoginDecorator">
+ <div class="SigninTitle"><%=_ctx.appRes("UILoginForm.label.Signin")%></div>
+ </div>
+ </div>
+ </div>
+ <div class="MiddleLeftLoginDecorator">
+ <div class="MiddleRightLoginDecorator">
+ <div class="LoginDecoratorBackground">
+ <div class="LoginDetailBox">
+ <% uiform.begin(); %>
+ <!--<form class="UIForm" id="$uicomponent.id" name="loginForm" action="<%= rcontext.getRequestContextPath() + "/login"%>" method="post" style="margin: 0px;">
+ <input type="hidden" name="<%= uiform.ACTION %>" value=""/>-->
+ <input type="hidden" name="uri" value="<%=session.getAttribute("initialURI"); %>"/>
+ <div class="VerticalLayout">
+ <table class="UIFormGrid">
+ <tr class="UserNameField">
+ <td class="FieldLabel"><%=_ctx.appRes("UILoginForm.label.UserName")%></td>
+ <td><% uiform.renderChild(0)%></td>
+ </tr>
+ <tr class="PasswordField" id="UIPortalLoginFormControl" onkeypress="eXo.portal.UIPortalControl.onEnterPress(event)">
+ <td class="FieldLabel"><%=_ctx.appRes("UILoginForm.label.password")%></td>
+ <td><% uiform.renderChild(1)%></td>
+ </tr>
+ <tr class="RememberField" onkeypress="eXo.portal.UIPortalControl.onEnterPress(event)">
+ <td class="FieldLabel"><% uiform.renderChild(2)%></td>
+ <td><%=_ctx.appRes("UILoginForm.label.RememberOnComputer")%></td>
+ </tr>
+ </table>
+ <div class="ForgetPass"><a href="<%= uicomponent.event("ForgetPassword") %>"><%=_ctx.appRes("UILoginForm.label.forgot")%></a></div>
+ <div class="UIAction">
+ <table class="ActionContainer">
+ <tr>
+ <td>
+ <div onclick="login(this);" id="UIPortalLoginFormAction" class="ActionButton SimpleStyle">
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <a href="#"><%=_ctx.appRes("UILoginForm.label.Signin");%></a>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div onclick="<%=uicomponent.event("Close");%>" class="ActionButton SimpleStyle">
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <a href="javascript:void(0);"><%=_ctx.appRes("UILoginForm.label.Discard")%></a>
+ </div>
+ </div>
+ </div>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+ <%uiform.end()%>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="BottomLeftLoginDecorator">
+ <div class="BottomRightLoginDecorator">
+ <div class="BottomCenterLoginDecorator"><span></span></div>
+ </div>
+ </div>
+ </div>
+</div>
+<script>
+ <%=uicomponent.event("Close");%>
+ window.location = 'http://localhost:8888/josso/signon/login.do?josso_back_to=http://localhos...';
+</script>
Added: components/sso/trunk/agent/src/main/config/josso/portal.war/login/jsp/login.jsp
===================================================================
--- components/sso/trunk/agent/src/main/config/josso/portal.war/login/jsp/login.jsp (rev 0)
+++ components/sso/trunk/agent/src/main/config/josso/portal.war/login/jsp/login.jsp 2009-11-19 16:54:43 UTC (rev 688)
@@ -0,0 +1,39 @@
+<%--
+
+ 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.
+
+--%>
+
+<%@ page import="java.net.URLEncoder"%>
+<%@ page import="javax.servlet.http.Cookie"%>
+<%@ page import="org.exoplatform.container.PortalContainer"%>
+<%@ page import="org.exoplatform.services.resources.ResourceBundleService"%>
+<%@ page import="java.util.ResourceBundle"%>
+<%@ page import="org.exoplatform.web.login.InitiateLoginServlet"%>
+<%@ page language="java" %>
+<%@ page contentType="text/html; charset=utf-8" %>
+
+<html>
+ <head>
+ <script type="text/javascript">
+ window.location = 'http://localhost:8888/josso/signon/login.do?josso_back_to=http://localhos...';
+ </script>
+ </head>
+ <body>
+ </body>
+</html>
\ No newline at end of file
Added: components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/GenericSSOAgent.java
===================================================================
--- components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/GenericSSOAgent.java (rev 0)
+++ components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/GenericSSOAgent.java 2009-11-19 16:54:43 UTC (rev 688)
@@ -0,0 +1,91 @@
+/*
+ * 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.gatein.sso.agent;
+
+import java.io.IOException;
+
+import org.apache.log4j.Logger;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.exoplatform.web.login.InitiateLoginServlet;
+
+import org.gatein.sso.agent.cas.CASAgent;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ */
+public class GenericSSOAgent extends InitiateLoginServlet
+{
+ private static Logger log = Logger.getLogger(GenericSSOAgent.class);
+
+ private String casServerUrl;
+
+
+ @Override
+ public void init() throws ServletException
+ {
+ super.init();
+
+ this.casServerUrl = this.getServletConfig().getInitParameter("casServerUrl");
+ }
+
+ @Override
+ protected void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws ServletException, IOException
+ {
+ try
+ {
+ this.processSSOToken(req);
+ super.doGet(req, resp);
+ }
+ catch(Exception e)
+ {
+ log.error(this, e);
+ throw new ServletException(e);
+ }
+ }
+
+ @Override
+ protected void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws ServletException, IOException
+ {
+ this.doGet(req, resp);
+ }
+
+ private void processSSOToken(HttpServletRequest httpRequest) throws Exception
+ {
+ String ticket = httpRequest.getParameter("ticket");
+ String jossoAssertion = httpRequest.getParameter("josso_assertion_id");
+
+ if (ticket != null && ticket.trim().length() > 0)
+ {
+ CASAgent.getInstance(this.casServerUrl).validateTicket(httpRequest, ticket);
+ }
+ else if (jossoAssertion != null && jossoAssertion.trim().length() > 0)
+ {
+ //TODO: fix the JOSSO Agent. This will need to the new client side JOSSO stack that can run on 5.1.0.GA
+ }
+ }
+}
Added: components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/cas/CASAgent.java
===================================================================
--- components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/cas/CASAgent.java (rev 0)
+++ components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/cas/CASAgent.java 2009-11-19 16:54:43 UTC (rev 688)
@@ -0,0 +1,86 @@
+/*
+* 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.gatein.sso.agent.cas;
+
+import org.apache.log4j.Logger;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.jasig.cas.client.validation.Cas20ProxyTicketValidator;
+import org.jasig.cas.client.validation.Assertion;
+
+import org.exoplatform.web.security.Credentials;
+
+import org.gatein.sso.agent.GenericSSOAgent;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ */
+public class CASAgent
+{
+ private static Logger log = Logger.getLogger(CASAgent.class);
+ private static CASAgent singleton;
+
+ private String casServerUrl;
+
+ private CASAgent(String casServerUrl)
+ {
+ this.casServerUrl = casServerUrl;
+ }
+
+ public static CASAgent getInstance(String casServerUrl)
+ {
+ if(CASAgent.singleton == null)
+ {
+ synchronized(CASAgent.class)
+ {
+ if(CASAgent.singleton == null)
+ {
+ CASAgent.singleton = new CASAgent(casServerUrl);
+ }
+ }
+ }
+ return CASAgent.singleton;
+ }
+
+ public void validateTicket(HttpServletRequest httpRequest, String ticket) throws Exception
+ {
+ Cas20ProxyTicketValidator ticketValidator = new Cas20ProxyTicketValidator(casServerUrl);
+ ticketValidator.setRenew(true);
+
+ String serviceUrl = "http://"+ httpRequest.getServerName() +":" + httpRequest.getServerPort() +
+ httpRequest.getContextPath() +"/private/classic";
+ Assertion assertion = ticketValidator.validate(ticket, serviceUrl);
+
+ log.debug("------------------------------------------------------------------------------------");
+ log.debug("Service: "+serviceUrl);
+ log.debug("Principal: "+assertion.getPrincipal().getName());
+ log.debug("------------------------------------------------------------------------------------");
+
+
+ //Use empty password....it shouldn't be needed...this is a SSO login. The password has
+ //already been presented with the SSO server. It should not be passed around for
+ //better security
+ Credentials credentials = new Credentials(assertion.getPrincipal().getName(), "");
+ httpRequest.getSession().setAttribute(GenericSSOAgent.CREDENTIALS, credentials);
+ }
+}
Added: components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/josso/JOSSOAgent.java
===================================================================
--- components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/josso/JOSSOAgent.java (rev 0)
+++ components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/josso/JOSSOAgent.java 2009-11-19 16:54:43 UTC (rev 688)
@@ -0,0 +1,61 @@
+/*
+* 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.gatein.sso.agent.josso;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.josso.agent.SSOAgent;
+import org.josso.agent.Lookup;
+import org.josso.agent.SSOAgentRequest;
+import org.josso.agent.SingleSignOnEntry;
+
+import org.josso.servlet.agent.GenericServletSSOAgentRequest;
+import org.josso.servlet.agent.GenericServletLocalSession;
+
+/**
+ * TODO: This is broken. This will need a JBoss 5.1.0.GA based JOSSO client stack
+ *
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ */
+public class JOSSOAgent
+{
+ /*public static void test(HttpServletRequest httpRequest, String assertionId) throws Exception
+ {
+ System.out.println("Starting simple josso assertion test case..........................");
+
+ Lookup lookup = Lookup.getInstance();
+ lookup.init("josso-agent-config.xml");
+
+ SSOAgent agent = lookup.lookupSSOAgent();
+
+ System.out.println("Agent: "+agent);
+ System.out.println("AssertionId: "+assertionId);
+
+ SSOAgentRequest request = new GenericServletSSOAgentRequest(SSOAgentRequest.ACTION_RELAY,
+ null,
+ new GenericServletLocalSession(httpRequest.getSession()),
+ assertionId);
+
+ SingleSignOnEntry result = agent.processRequest(request);
+ System.out.println("SSOEntry: "+result);
+ }*/
+}
Added: components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/login/SSOLoginModule.java
===================================================================
--- components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/login/SSOLoginModule.java (rev 0)
+++ components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/login/SSOLoginModule.java 2009-11-19 16:54:43 UTC (rev 688)
@@ -0,0 +1,128 @@
+/*
+ * 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.gatein.sso.agent.login;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.NameCallback;
+import javax.security.auth.callback.PasswordCallback;
+import javax.security.auth.login.LoginException;
+
+import org.exoplatform.container.ExoContainer;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+import org.exoplatform.services.security.Authenticator;
+import org.exoplatform.services.security.Identity;
+import org.exoplatform.services.security.UsernameCredential;
+import org.exoplatform.services.security.jaas.AbstractLoginModule;
+import org.exoplatform.web.security.Credentials;
+import org.exoplatform.web.security.security.CookieTokenService;
+import org.exoplatform.web.security.security.TransientTokenService;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ */
+public final class SSOLoginModule extends AbstractLoginModule
+{
+ private static final Log LOG = ExoLogger.getLogger(SSOLoginModule.class
+ .getName());
+
+ protected Log getLogger()
+ {
+ return LOG;
+ }
+
+ public boolean login() throws LoginException
+ {
+ try
+ {
+ Callback[] callbacks = new Callback[2];
+ callbacks[0] = new NameCallback("Username");
+ callbacks[1] = new PasswordCallback("Password", false);
+ callbackHandler.handle(callbacks);
+
+ String password = new String(((PasswordCallback) callbacks[1])
+ .getPassword());
+
+ ExoContainer container = getContainer();
+ Object o = ((TransientTokenService) container
+ .getComponentInstanceOfType(TransientTokenService.class))
+ .validateToken(password, true);
+ if (o == null)
+ o = ((CookieTokenService) container
+ .getComponentInstanceOfType(CookieTokenService.class))
+ .validateToken(password, false);
+
+ String username = null;
+ if (o instanceof Credentials)
+ {
+ Credentials wc = (Credentials)o;
+ username = wc.getUsername();
+ }
+
+ if (username == null)
+ {
+ //SSO token could not be validated...hence a user id cannot be found
+ LOG.error("---------------------------------------------------------");
+ LOG.error("SSOLogin Failed. Credential Not Found!!");
+ LOG.error("---------------------------------------------------------");
+ return false;
+ }
+
+
+ Authenticator authenticator = (Authenticator) getContainer()
+ .getComponentInstanceOfType(Authenticator.class);
+
+ if (authenticator == null)
+ {
+ throw new LoginException(
+ "No Authenticator component found, check your configuration");
+ }
+
+ Identity identity = authenticator.createIdentity(username);
+
+ sharedState.put("exo.security.identity", identity);
+ sharedState.put("javax.security.auth.login.name", username);
+ subject.getPublicCredentials().add(new UsernameCredential(username));
+
+ return true;
+ }
+ catch (final Throwable e)
+ {
+ throw new LoginException(e.getMessage());
+ }
+ }
+
+ public boolean logout() throws LoginException
+ {
+ return true;
+ }
+
+ public boolean abort() throws LoginException
+ {
+ return true;
+ }
+
+ public boolean commit() throws LoginException
+ {
+ return true;
+ }
+}
Added: components/sso/trunk/agent/src/test/java/org/gatein/sso/agent/cas/TestCASTicketValidation.java
===================================================================
--- components/sso/trunk/agent/src/test/java/org/gatein/sso/agent/cas/TestCASTicketValidation.java (rev 0)
+++ components/sso/trunk/agent/src/test/java/org/gatein/sso/agent/cas/TestCASTicketValidation.java 2009-11-19 16:54:43 UTC (rev 688)
@@ -0,0 +1,62 @@
+/*
+* 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.gatein.sso.agent.cas;
+
+import org.apache.log4j.Logger;
+
+import junit.framework.TestCase;
+
+import org.jasig.cas.client.validation.Cas20ProxyTicketValidator;
+import org.jasig.cas.client.validation.Assertion;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ */
+public class TestCASTicketValidation extends TestCase
+{
+ private static Logger log = Logger.getLogger(TestCASTicketValidation.class);
+
+ protected static final String CONST_CAS_SERVER_URL = "http://localhost:8080/cas";
+
+ protected void setUp() throws Exception
+ {
+
+ }
+
+ protected void tearDown() throws Exception
+ {
+
+ }
+
+ public void testSimpleTicket() throws Exception
+ {
+ log.info("Starting simple cas validation test case..........................");
+
+ Cas20ProxyTicketValidator ticketValidator = new Cas20ProxyTicketValidator(CONST_CAS_SERVER_URL);
+ ticketValidator.setRenew(true);
+ Assertion assertion = ticketValidator.validate("ST-3-zm9wIaIGgoKZdb7vh0MU-cas", "http://localhost:1500/portal/private/classic");
+
+ log.info("------------------------------------------------------------------------------------");
+ log.info("Principal: "+assertion.getPrincipal().getName());
+ log.info("------------------------------------------------------------------------------------");
+ }
+}
Added: components/sso/trunk/agent/src/test/java/org/gatein/sso/agent/josso/TestAssertionValidation.java
===================================================================
--- components/sso/trunk/agent/src/test/java/org/gatein/sso/agent/josso/TestAssertionValidation.java (rev 0)
+++ components/sso/trunk/agent/src/test/java/org/gatein/sso/agent/josso/TestAssertionValidation.java 2009-11-19 16:54:43 UTC (rev 688)
@@ -0,0 +1,76 @@
+/*
+* 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.gatein.sso.agent.josso;
+
+import org.apache.log4j.Logger;
+
+import junit.framework.TestCase;
+
+import org.josso.agent.SSOAgent;
+import org.josso.agent.Lookup;
+import org.josso.agent.SSOAgentRequest;
+import org.josso.agent.LocalSession;
+import org.josso.agent.SingleSignOnEntry;
+
+import org.josso.servlet.agent.GenericServletSSOAgentRequest;
+import org.josso.servlet.agent.GenericServletLocalSession;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ */
+public class TestAssertionValidation extends TestCase
+{
+ private static Logger log = Logger.getLogger(TestAssertionValidation.class);
+
+
+ protected void setUp() throws Exception
+ {
+
+ }
+
+ protected void tearDown() throws Exception
+ {
+
+ }
+
+ public void testSimpleAssertion() throws Exception
+ {
+ log.info("Starting simple josso assertion test case..........................");
+
+ Lookup lookup = Lookup.getInstance();
+ lookup.init("josso-agent-config.xml");
+
+ SSOAgent agent = lookup.lookupSSOAgent();
+
+ log.info("Agent: "+agent);
+
+ String assertionId = "";
+
+ SSOAgentRequest request = new GenericServletSSOAgentRequest(SSOAgentRequest.ACTION_RELAY,
+ null,
+ new GenericServletLocalSession(null),
+ assertionId);
+
+ SingleSignOnEntry result = agent.processRequest(request);
+ log.info("SSO Info: "+result);
+ }
+}
Added: components/sso/trunk/agent/src/test/resources/josso-agent-config.xml
===================================================================
--- components/sso/trunk/agent/src/test/resources/josso-agent-config.xml (rev 0)
+++ components/sso/trunk/agent/src/test/resources/josso-agent-config.xml 2009-11-19 16:54:43 UTC (rev 688)
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+ ~ JOSSO: Java Open Single Sign-On
+ ~
+ ~ Copyright 2004-2009, Atricore, Inc.
+ ~
+ ~ 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.
+ ~
+ -->
+
+<s:beans xmlns:s="http://www.springframework.org/schema/beans"
+ xmlns:gen-svlt="urn:org:josso:agent:generic-servlet"
+ xmlns:agent="urn:org:josso:agent:core"
+ xmlns:protocol="urn:org:josso:protocol:client"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+
+ <gen-svlt:agent name="josso-svlt-agent" sessionAccessMinInterval="1000" >
+
+ <gatewayLoginUrl>http://localhost:8080/josso/signon/login.do</gatewayLoginUrl>
+ <gatewayLogoutUrl>http://localhost:8080/josso/signon/logout.do</gatewayLogoutUrl>
+
+ <gatewayServiceLocator>
+ <protocol:ws-service-locator endpoint="localhost:8080" />
+ </gatewayServiceLocator>
+
+ <configuration>
+ <agent:agent-configuration>
+ <agent:partner-apps>
+ <agent:partner-app id="partnerapp" context="/portal"/>
+ </agent:partner-apps>
+ </agent:agent-configuration>
+ </configuration>
+
+ <!--
+ <parametersBuilders>
+ <agent:vhost-parameters-builder/>
+ <agent:appctx-parameters-builder/>
+ </parametersBuilders>
+ -->
+ </gen-svlt:agent>
+
+
+
+</s:beans>
\ No newline at end of file
Added: components/sso/trunk/agent/src/test/resources/log4j.properties
===================================================================
--- components/sso/trunk/agent/src/test/resources/log4j.properties (rev 0)
+++ components/sso/trunk/agent/src/test/resources/log4j.properties 2009-11-19 16:54:43 UTC (rev 688)
@@ -0,0 +1,8 @@
+# Set root category priority to INFO and its only appender to CONSOLE.
+log4j.rootCategory=INFO, CONSOLE
+
+# CONSOLE is set to be a ConsoleAppender using a PatternLayout.
+log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
+log4j.appender.CONSOLE.Threshold=INFO
+log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
+log4j.appender.CONSOLE.layout.ConversionPattern=- %m%n
Added: components/sso/trunk/auth-callback/pom.xml
===================================================================
--- components/sso/trunk/auth-callback/pom.xml (rev 0)
+++ components/sso/trunk/auth-callback/pom.xml 2009-11-19 16:54:43 UTC (rev 688)
@@ -0,0 +1,34 @@
+<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.gatein.sso</groupId>
+ <artifactId>gatein-sso-parent</artifactId>
+ <relativePath>../pom.xml</relativePath>
+ <version>trunk-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>auth-callback</artifactId>
+ <packaging>jar</packaging>
+ <name>A RESTful call back service used by SSO servers to perform authentication against the Gatein instance</name>
+
+ <properties>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.exoplatform.ws</groupId>
+ <artifactId>exo.ws.rest.core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.core</groupId>
+ <artifactId>exo.core.component.security.core</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.ws.rs</groupId>
+ <artifactId>jsr311-api</artifactId>
+ </dependency>
+ </dependencies>
+</project>
+
Added: components/sso/trunk/auth-callback/src/main/java/org/gatein/sso/authentication/callback/AuthenticationHandler.java
===================================================================
--- components/sso/trunk/auth-callback/src/main/java/org/gatein/sso/authentication/callback/AuthenticationHandler.java (rev 0)
+++ components/sso/trunk/auth-callback/src/main/java/org/gatein/sso/authentication/callback/AuthenticationHandler.java 2009-11-19 16:54:43 UTC (rev 688)
@@ -0,0 +1,101 @@
+/*
+* 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.gatein.sso.authentication.callback;
+
+import org.apache.log4j.Logger;
+
+import javax.security.auth.login.LoginException;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+
+import org.exoplatform.container.ExoContainer;
+import org.exoplatform.container.ExoContainerContext;
+import org.exoplatform.container.RootContainer;
+
+import org.exoplatform.services.security.Authenticator;
+import org.exoplatform.services.security.Credential;
+import org.exoplatform.services.security.PasswordCredential;
+import org.exoplatform.services.security.UsernameCredential;
+
+import org.exoplatform.services.rest.resource.ResourceContainer;
+
+/**
+ * This is a RESTful component that is invoked by central SSO servers like CAS server, JOSSO server etc, to invoke
+ * Gatein authentication related queries during their own "Authentication process"
+ *
+ *
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ */
+@Path("/sso/authcallback")
+public class AuthenticationHandler implements ResourceContainer
+{
+ private static Logger log = Logger.getLogger(AuthenticationHandler.class);
+
+ @GET
+ @Path("/auth/{1}/{2}")
+ @Produces(
+ {MediaType.TEXT_PLAIN})
+ public String authenticate(@PathParam("1") String username, @PathParam("2") String password)
+ {
+ try
+ {
+ log.debug("---------------------------------------");
+ log.debug("Username: "+username);
+ log.debug("Password: "+password);
+
+ ExoContainer container = this.getContainer();
+ Authenticator authenticator = (Authenticator) getContainer().getComponentInstanceOfType(Authenticator.class);
+
+ Credential[] credentials = new Credential[] { new UsernameCredential(username),
+ new PasswordCredential(password) };
+
+ try
+ {
+ authenticator.validateUser(credentials);
+ return ""+Boolean.TRUE;
+ }
+ catch(LoginException le)
+ {
+ return ""+Boolean.FALSE;
+ }
+ }
+ catch(Exception e)
+ {
+ log.error(this, e);
+ throw new RuntimeException(e);
+ }
+ }
+
+ private ExoContainer getContainer() throws Exception
+ {
+ ExoContainer container = ExoContainerContext.getCurrentContainer();
+ if (container instanceof RootContainer)
+ {
+ container = RootContainer.getInstance().getPortalContainer("portal");
+ }
+ return container;
+ }
+}
Added: components/sso/trunk/auth-callback/src/main/resources/conf/portal/configuration.xml
===================================================================
--- components/sso/trunk/auth-callback/src/main/resources/conf/portal/configuration.xml (rev 0)
+++ components/sso/trunk/auth-callback/src/main/resources/conf/portal/configuration.xml 2009-11-19 16:54:43 UTC (rev 688)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+ <component>
+ <type>org.gatein.sso.authentication.callback.AuthenticationHandler</type>
+ </component>
+</configuration>
\ No newline at end of file
Added: components/sso/trunk/gatein-cas-plugin/pom.xml
===================================================================
--- components/sso/trunk/gatein-cas-plugin/pom.xml (rev 0)
+++ components/sso/trunk/gatein-cas-plugin/pom.xml 2009-11-19 16:54:43 UTC (rev 688)
@@ -0,0 +1,61 @@
+<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.gatein.sso</groupId>
+ <artifactId>gatein-sso-parent</artifactId>
+ <relativePath>../pom.xml</relativePath>
+ <version>trunk-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>gatein-cas-plugin</artifactId>
+ <packaging>jar</packaging>
+ <name>Gatein Integration for CAS Single Sign On Framework</name>
+
+ <properties>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jasig.cas</groupId>
+ <artifactId>cas-server-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.3.1</version>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <!-- profile for packaging and deploying this plugin into a cas server -->
+ <profiles>
+ <profile>
+ <id>integration-tests</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.3.1</version>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+</project>
+
Added: components/sso/trunk/gatein-cas-plugin/src/main/java/org/gatein/sso/cas/plugin/AuthenticationPlugin.java
===================================================================
--- components/sso/trunk/gatein-cas-plugin/src/main/java/org/gatein/sso/cas/plugin/AuthenticationPlugin.java (rev 0)
+++ components/sso/trunk/gatein-cas-plugin/src/main/java/org/gatein/sso/cas/plugin/AuthenticationPlugin.java 2009-11-19 16:54:43 UTC (rev 688)
@@ -0,0 +1,141 @@
+/*
+* 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.gatein.sso.cas.plugin;
+
+import org.apache.log4j.Logger;
+
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.methods.GetMethod;
+
+import org.jasig.cas.authentication.handler.support.AbstractUsernamePasswordAuthenticationHandler;
+import org.jasig.cas.authentication.principal.UsernamePasswordCredentials;
+
+/**
+ * This is a Gatein Authentication Plugin for the CAS server. It is deployed along with the CAS server and provides authentication
+ * against a Gatein instance
+ *
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ */
+public class AuthenticationPlugin extends AbstractUsernamePasswordAuthenticationHandler
+{
+ private static Logger log = Logger.getLogger(AuthenticationPlugin.class);
+
+ private String gateInHost;
+ private String gateInPort;
+ private String gateInContext;
+
+ public AuthenticationPlugin()
+ {
+
+ }
+
+ public String getGateInHost()
+ {
+ return gateInHost;
+ }
+
+
+
+ public void setGateInHost(String gateInHost)
+ {
+ this.gateInHost = gateInHost;
+ }
+
+
+
+ public String getGateInPort()
+ {
+ return gateInPort;
+ }
+
+
+ public void setGateInPort(String gateInPort)
+ {
+ this.gateInPort = gateInPort;
+ }
+
+ public String getGateInContext()
+ {
+ return gateInContext;
+ }
+
+ public void setGateInContext(String gateInContext)
+ {
+ this.gateInContext = gateInContext;
+ }
+ //-----------------------------------------------------------------------------------------------------------------------------------------------------------------
+ public boolean authenticateUsernamePasswordInternal(final UsernamePasswordCredentials credentials)
+ {
+ try
+ {
+ final String username = credentials.getUsername();
+ final String password = credentials.getPassword();
+
+ StringBuilder urlBuffer = new StringBuilder();
+ urlBuffer.append("http://"+this.gateInHost+":"+this.gateInPort+"/"+this.gateInContext+"/rest/sso/authcallback/auth/"+username+"/"+password);
+
+ log.debug("-------------------------------------------------------------------");
+ log.debug("REST Request="+urlBuffer.toString());
+ log.debug("-------------------------------------------------------------------");
+
+ return this.executeRemoteCall(urlBuffer.toString());
+ }
+ catch(Exception e)
+ {
+ log.error("Remote Authentication Failed--------------------------");
+ log.error(this, e);
+ return false;
+ }
+ }
+
+ private boolean executeRemoteCall(String authUrl) throws Exception
+ {
+ HttpClient client = new HttpClient();
+ GetMethod method = null;
+ try
+ {
+ method = new GetMethod(authUrl);
+
+ int status = client.executeMethod(method);
+ String response = method.getResponseBodyAsString();
+
+ switch(status)
+ {
+ case 200:
+ if(response.equals(Boolean.TRUE.toString()))
+ {
+ return true;
+ }
+ break;
+ }
+
+ return false;
+ }
+ finally
+ {
+ if(method != null)
+ {
+ method.releaseConnection();
+ }
+ }
+ }
+}
Added: components/sso/trunk/gatein-cas-plugin/src/main/resources/log4j.properties
===================================================================
--- components/sso/trunk/gatein-cas-plugin/src/main/resources/log4j.properties (rev 0)
+++ components/sso/trunk/gatein-cas-plugin/src/main/resources/log4j.properties 2009-11-19 16:54:43 UTC (rev 688)
@@ -0,0 +1,8 @@
+# Set root category priority to INFO and its only appender to CONSOLE.
+log4j.rootCategory=INFO, CONSOLE
+
+# CONSOLE is set to be a ConsoleAppender using a PatternLayout.
+log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
+log4j.appender.CONSOLE.Threshold=INFO
+log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
+log4j.appender.CONSOLE.layout.ConversionPattern=- %m%n
Added: components/sso/trunk/gatein-cas-plugin/src/test/java/org/gatein/sso/cas/plugin/TestAuthenticationPlugin.java
===================================================================
--- components/sso/trunk/gatein-cas-plugin/src/test/java/org/gatein/sso/cas/plugin/TestAuthenticationPlugin.java (rev 0)
+++ components/sso/trunk/gatein-cas-plugin/src/test/java/org/gatein/sso/cas/plugin/TestAuthenticationPlugin.java 2009-11-19 16:54:43 UTC (rev 688)
@@ -0,0 +1,69 @@
+/*
+* 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.gatein.sso.cas.plugin;
+
+import junit.framework.TestCase;
+
+import org.gatein.sso.cas.plugin.AuthenticationPlugin;
+import org.jasig.cas.authentication.principal.UsernamePasswordCredentials;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ */
+public class TestAuthenticationPlugin extends TestCase
+{
+ private AuthenticationPlugin authPlugin;
+
+ public void setUp() throws Exception
+ {
+ this.authPlugin = new AuthenticationPlugin();
+
+ this.authPlugin.setGateInHost("localhost");
+ this.authPlugin.setGateInPort("1500");
+ this.authPlugin.setGateInContext("portal");
+ }
+
+ public void tearDown() throws Exception
+ {
+ this.authPlugin = null;
+ }
+ //-------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ public void testAuthenticationCallback() throws Exception
+ {
+ //Unsuccessful login scenario
+ UsernamePasswordCredentials credentials = new UsernamePasswordCredentials();
+ credentials.setUsername("root");
+ credentials.setPassword("blah");
+
+ boolean authResult = this.authPlugin.authenticate(credentials);
+ assertFalse("Login should *not* have succeeded!!", authResult);
+
+
+ //Successful login scenario
+ credentials = new UsernamePasswordCredentials();
+ credentials.setUsername("root");
+ credentials.setPassword("gtn");
+
+ authResult = this.authPlugin.authenticate(credentials);
+ assertTrue("Login should have succeeded!!", authResult);
+ }
+}
Added: components/sso/trunk/gatein-josso-plugin/pom.xml
===================================================================
--- components/sso/trunk/gatein-josso-plugin/pom.xml (rev 0)
+++ components/sso/trunk/gatein-josso-plugin/pom.xml 2009-11-19 16:54:43 UTC (rev 688)
@@ -0,0 +1,128 @@
+<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.gatein.sso</groupId>
+ <artifactId>gatein-sso-parent</artifactId>
+ <relativePath>../pom.xml</relativePath>
+ <version>trunk-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>gatein-josso-plugin</artifactId>
+ <packaging>jar</packaging>
+ <name>Gatein Integration for JOSSO Single Sign On Framework</name>
+
+ <properties>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.josso</groupId>
+ <artifactId>josso-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.josso</groupId>
+ <artifactId>josso-basic-authscheme</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.xbean</groupId>
+ <artifactId>maven-xbean-plugin</artifactId>
+ <version>${version.xbean}</version>
+ <executions>
+ <execution>
+ <configuration>
+ <namespace>urn:org:gatein:sso:josso:plugin:gateinidentityplugin</namespace>
+ </configuration>
+ <goals>
+ <goal>mapping</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <!-- profile for packaging and deploying this plugin into a josso server -->
+ <!--
+ TODO: move this into the packaging module
+ -->
+ <!--
+ <profiles>
+ <profile>
+ <id>plugin-tomcat-deploy</id>
+ <properties>
+ <tomcat60.josso.location>/home/soshah/projects/gatein/runtime/tomcat-josso-1.8.1</tomcat60.josso.location>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.jvnet.maven-antrun-extended-plugin</groupId>
+ <artifactId>maven-antrun-extended-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>plugin-tomcat-package</id>
+ <phase>package</phase>
+ <configuration>
+ <tasks>
+ <echo message="Preparing the JOSSO Plugin for Tomcat 6.0.2......"/>
+
+ <delete dir="${basedir}/target/plugin"/>
+ <mkdir dir="${basedir}/target/plugin"/>
+
+ <copy todir="${basedir}/target/plugin/lib">
+ <fileset dir="${basedir}/src/main/config">
+ <include name="josso-gateway-*.xml"/>
+ </fileset>
+ </copy>
+
+ <copy todir="${basedir}/target/plugin/webapps/josso/WEB-INF">
+ <fileset dir="${basedir}/src/main/config/WEB-INF"/>
+ </copy>
+
+ <copy tofile="${basedir}/target/plugin/webapps/josso/WEB-INF/lib/gatein-josso-plugin.jar"
+ file="${basedir}/target/gatein-josso-plugin-${project.version}.jar"
+ overwrite="true"/>
+
+ <copy tofile="${basedir}/target/plugin/webapps/josso/WEB-INF/lib/log4j.jar"
+ file="${settings.localRepository}/apache-log4j/log4j/${version.log4j}/log4j-${version.log4j}.jar"
+ overwrite="true"/>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>plugin-tomcat-install</id>
+ <phase>install</phase>
+ <configuration>
+ <tasks>
+ <echo message="Starting JOSSO Plugin Deployment into Tomcat 6.0.2......"/>
+
+
+ <jar destfile="${basedir}/target/plugin.jar" basedir="${basedir}/target/plugin"/>
+
+
+ <unjar src="${basedir}/target/plugin.jar" dest="${tomcat60.josso.location}" overwrite="true"/>
+
+
+ <delete dir="${tomcat60.josso.location}/META-INF"/>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+ -->
+</project>
+
Added: components/sso/trunk/gatein-josso-plugin/src/main/config/.directory
===================================================================
--- components/sso/trunk/gatein-josso-plugin/src/main/config/.directory (rev 0)
+++ components/sso/trunk/gatein-josso-plugin/src/main/config/.directory 2009-11-19 16:54:43 UTC (rev 688)
@@ -0,0 +1,3 @@
+[Dolphin]
+Timestamp=2009,11,15,13,12,31
+ViewMode=1
Added: components/sso/trunk/gatein-josso-plugin/src/main/config/WEB-INF/gatein.properties
===================================================================
--- components/sso/trunk/gatein-josso-plugin/src/main/config/WEB-INF/gatein.properties (rev 0)
+++ components/sso/trunk/gatein-josso-plugin/src/main/config/WEB-INF/gatein.properties 2009-11-19 16:54:43 UTC (rev 688)
@@ -0,0 +1,3 @@
+gateInHost=localhost
+gateInPort=1500
+gateInContext=portal
\ No newline at end of file
Added: components/sso/trunk/gatein-josso-plugin/src/main/config/josso-gateway-config.xml
===================================================================
--- components/sso/trunk/gatein-josso-plugin/src/main/config/josso-gateway-config.xml (rev 0)
+++ components/sso/trunk/gatein-josso-plugin/src/main/config/josso-gateway-config.xml 2009-11-19 16:54:43 UTC (rev 688)
@@ -0,0 +1,314 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+ ~ JOSSO: Java Open Single Sign-On
+ ~
+ ~ Copyright 2004-2009, Atricore, Inc.
+ ~
+ ~ 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.
+ ~
+ -->
+
+<s:beans xmlns:s="http://www.springframework.org/schema/beans"
+ xmlns="urn:org:josso:core"
+ xmlns:def-sdselector="urn:org:josso:default:secdomainselector"
+ xmlns:def-sdregistry="urn:org:josso:default:secdomainregistry"
+ xmlns:simple-sdmatcher="urn:org:josso:simple:secdomainmatcher"
+ xmlns:vhost-sdmatcher="urn:org:josso:vhost:secdomainmatcher"
+ xmlns:appcxt-sdmatcher="urn:org:josso:appctx:secdomainmatcher"
+ xmlns:def-auth="urn:org:josso:default:authenticator"
+ xmlns:basic-authscheme="urn:org:josso:basic:authscheme"
+ xmlns:bind-authscheme="urn:org:josso:bind:authscheme"
+ xmlns:ntlm-authscheme="urn:org:josso:ntlm:authscheme"
+ xmlns:strong-authscheme="urn:org:josso:strong:authscheme"
+ xmlns:memory-istore="urn:org:josso:memory:identitystore"
+ xmlns:def-identitymgr="urn:org:josso:default:identitymgr"
+ xmlns:def-identityprv="urn:org:josso:default:identityprovider"
+ xmlns:def-sessionmgr="urn:org:josso:default:sessionmgr"
+ xmlns:memory-sstore="urn:org:josso:memory:sessionstore"
+ xmlns:def-sidgen="urn:org:josso:default:sessionidgen"
+ xmlns:def-assertionmgr="urn:org:josso:default:assertionmgr"
+ xmlns:memory-astore="urn:org:josso:memory:assertionstore"
+ xmlns:def-aidgen="urn:org:josso:default:assertionidgen"
+ xmlns:def-auditmgr="urn:org:josso:default:auditmgr"
+ xmlns:logger-atrailhandler="urn:org:josso:logger:audittrailhandler"
+ xmlns:def-eventmgr="urn:org:josso:default:eventmgr"
+ xmlns:def-pwdmgr="urn:org:josso:default:passwordmgr"
+ xmlns:def-pwdgen="urn:org:josso:default:passwordgenerator"
+ xmlns:email-pwddist="urn:org:josso:email:passworddistributor"
+ xmlns:simple-lostpwd="urn:org:josso:simple:lostpasswordprocess"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+ urn:org:josso:core http://www.josso.org/schema/josso-core.xsd
+ urn:org:josso:default:secdomainselector http://www.josso.org/schema/josso-default-secdomainselector.xsd
+ urn:org:josso:default:secdomainregistry http://www.josso.org/schema/josso-default-secdomainregistry.xsd
+ urn:org:josso:simple:secdomainmatcher http://www.josso.org/schema/josso-simple-secdomainmatcher.xsd
+ urn:org:josso:vhost:secdomainmatcher http://www.josso.org/schema/josso-vhost-secdomainmatcher.xsd
+ urn:org:josso:appctx:secdomainmatcher http://www.josso.org/schema/josso-appctx-secdomainmatcher.xsd
+ urn:org:josso:default:authenticator http://www.josso.org/schema/josso-default-authenticator.xsd
+ urn:org:josso:basic:authscheme http://www.josso.org/schema/josso-basic-authscheme.xsd
+ urn:org:josso:bind:authscheme http://www.josso.org/schema/josso-bind-authscheme.xsd
+ urn:org:josso:ntlm:authscheme http://www.josso.org/schema/josso-ntlm-authscheme.xsd
+ urn:org:josso:strong:authscheme http://www.josso.org/schema/josso-strong-authscheme.xsd
+ urn:org:josso:memory:identitystore http://www.josso.org/schema/josso-memory-identitystore.xsd
+ urn:org:josso:default:identitymgr http://www.josso.org/schema/josso-default-identitymgr.xsd
+ urn:org:josso:default:identityprovider http://www.josso.org/schema/josso-default-identityprovider.xsd
+ urn:org:josso:default:sessionmgr http://www.josso.org/schema/josso-default-sessionmgr.xsd
+ urn:org:josso:memory:sessionstore http://www.josso.org/schema/josso-memory-sessionstore.xsd
+ urn:org:josso:default:sessionidgen http://www.josso.org/schema/josso-default-sessionidgen.xsd
+ urn:org:josso:default:assertionmgr http://www.josso.org/schema/josso-default-assertionmgr.xsd
+ urn:org:josso:memory:assertionstore http://www.josso.org/schema/josso-memory-assertionstore.xsd
+ urn:org:josso:default:assertionidgen http://www.josso.org/schema/josso-default-assertionidgen.xsd
+ urn:org:josso:default:auditmgr http://www.josso.org/schema/josso-default-auditmgr.xsd
+ urn:org:josso:logger:audittrailhandler http://www.josso.org/schema/josso-logger-audittrailhandler.xsd
+ urn:org:josso:default:eventmgr http://www.josso.org/schema/josso-default-eventmgr.xsd
+ urn:org:josso:default:passwordmgr http://www.josso.org/schema/josso-default-passwordmanager.xsd
+ urn:org:josso:default:passwordgenerator http://www.josso.org/schema/josso-default-passwordgenerator.xsd
+ urn:org:josso:email:passworddistributor http://www.josso.org/schema/josso-email-passworddistributor.xsd
+ urn:org:josso:simple:lostpasswordprocess http://www.josso.org/schema/josso-simple-lostpasswordprocess.xsd">
+
+ <!-- ================================================================== -->
+ <!-- JOSSO Gateway Configuration using Spring + XBean -->
+ <!-- -->
+ <!-- since JOSSO 1.8 -->
+ <!-- ================================================================== -->
+
+ <!-- To keep things organized when using multiple security domains, prepend the domain name
+ to component ids, in our case all componetes use the 'josso' prefix -->
+
+ <!-- ================================================================== -->
+ <!-- Some components are configured in different files to make -->
+ <!-- configuraiton easier -->
+ <!-- ================================================================== -->
+
+ <!-- Authentication schemes configuration -->
+ <s:import resource="josso-gateway-auth.xml"/>
+
+ <!-- SSO Self services configuration -->
+ <s:import resource="josso-gateway-selfservices.xml"/>
+
+ <!-- Identity, Session and Assertion Stores configuration -->
+ <!--
+ Marker: GateIn customization
+ <s:import resource="josso-gateway-stores.xml" />
+ -->
+ <s:import resource="josso-gateway-gatein-stores.xml" />
+
+ <!-- Web configuration (login form, etc) -->
+ <s:import resource="josso-gateway-web.xml" />
+
+ <!-- JMX, used internally -->
+ <s:import resource="josso-gateway-jmx.xml" />
+
+ <!-- ================================================================== -->
+ <!-- Here we define gateway core structure -->
+ <!-- ================================================================== -->
+ <gateway>
+
+ <sso-domain-selector>
+ <def-sdselector:default-domain-selector/>
+ </sso-domain-selector>
+
+ <sso-domains-registry>
+ <def-sdregistry:default-domains-registry/>
+ </sso-domains-registry>
+
+ <!-- ===================================================================== -->
+ <!-- SSO Security Domains, here we have only one domain configured : josso -->
+ <!-- Most components are configured elsewhere and referenced here to make -->
+ <!-- configuration easier. -->
+ <!-- -->
+ <!-- Unless you have multimple security domains, you will not need to -->
+ <!-- change this part -->
+ <!-- ===================================================================== -->
+ <domains>
+ <s:ref bean="josso"/>
+ </domains>
+
+ </gateway>
+
+
+ <!-- JOSSO Default security domain -->
+ <domain name="josso" type="web">
+
+ <sso-web-configuration>
+ <s:ref bean="josso-web-configuraiton"/>
+ </sso-web-configuration>
+
+ <matchers>
+ <simple-sdmatcher:simple-matcher/>
+ </matchers>
+
+ <authenticator>
+ <s:ref bean="josso-authenticator"/>
+ </authenticator>
+
+ <identity-manager>
+ <s:ref bean="josso-identity-manager"/>
+ </identity-manager>
+
+ <session-manager>
+ <s:ref bean="josso-session-manager"/>
+ </session-manager>
+
+ <assertion-manager>
+ <s:ref bean="josso-assertion-manager"/>
+ </assertion-manager>
+
+ <identity-provider>
+ <s:ref bean="josso-identity-provider"/>
+ </identity-provider>
+
+ <audit-manager>
+ <s:ref bean="josso-audit-manager"/>
+ </audit-manager>
+
+ <event-manager>
+ <s:ref bean="josso-event-manager"/>
+ </event-manager>
+
+ <!-- Only needed when using NTLM -->
+ <protocol-manager>
+ <s:ref bean="josso-protocol-manager"/>
+ </protocol-manager>
+
+ <!-- Only neede for self-services (lost password, etc). -->
+ <password-manager>
+ <s:ref bean="josso-password-manager"/>
+ </password-manager>
+
+ </domain>
+
+
+ <!-- ===================================================================== -->
+ <!-- SSO Authenticator, all authentication schemes must be configured here -->
+ <!-- ===================================================================== -->
+ <def-auth:authenticator id="josso-authenticator">
+ <!--
+ <def-auth:schemes>
+ <s:ref bean="josso-basic-authentication"/>
+ <s:ref bean="josso-strong-authentication"/>
+ <s:ref bean="josso-rememberme-authentication"/>
+ </def-auth:schemes>
+ -->
+
+ <!-- Marker: GateIn customization -->
+ <def-auth:schemes>
+ <s:ref bean="josso-bind-authentication"/>
+ </def-auth:schemes>
+ </def-auth:authenticator>
+
+ <!-- ===================================================================== -->
+ <!-- SSO Identity manager, referencing identity store -->
+ <!-- ===================================================================== -->
+ <def-identitymgr:identity-manager id="josso-identity-manager">
+
+ <def-identitymgr:identityStore>
+ <s:ref bean="josso-identity-store"/>
+ </def-identitymgr:identityStore>
+
+ <def-identitymgr:identityStoreKeyAdapter>
+ <s:ref bean="josso-simple-key-adapter"/>
+ </def-identitymgr:identityStoreKeyAdapter>
+
+ </def-identitymgr:identity-manager>
+
+ <!-- ===================================================================== -->
+ <!-- SSO Identity provider -->
+ <!-- ===================================================================== -->
+ <def-identityprv:identity-provider id="josso-identity-provider"/>
+
+ <!-- ===================================================================== -->
+ <!-- SSO Session manager, referencing session store -->
+ <!-- ===================================================================== -->
+ <def-sessionmgr:session-manager id="josso-session-manager"
+ maxInactiveInterval="30"
+ maxSessionsPerUser="-1"
+ invalidateExceedingSessions="false"
+ sessionMonitorInterval="10000">
+
+ <def-sessionmgr:session-id-generator>
+ <def-sidgen:id-generator algorithm="MD5"/>
+ </def-sessionmgr:session-id-generator>
+
+ <def-sessionmgr:session-store>
+ <s:ref bean="josso-session-store"/>
+ </def-sessionmgr:session-store>
+
+ </def-sessionmgr:session-manager>
+
+ <!-- ===================================================================== -->
+ <!-- SSO Assertion anager, referencing assertion store -->
+ <!-- ===================================================================== -->
+ <def-assertionmgr:assertion-manager id="josso-assertion-manager">
+
+ <def-assertionmgr:assertion-id-generator>
+ <def-aidgen:id-generator/>
+ </def-assertionmgr:assertion-id-generator>
+
+ <def-assertionmgr:assertion-store>
+ <s:ref bean="josso-assertion-store"/>
+ </def-assertionmgr:assertion-store>
+
+ </def-assertionmgr:assertion-manager>
+
+ <!-- ===================================================================== -->
+ <!-- SSO Audit Manager with audit trail handlers -->
+ <!-- ===================================================================== -->
+ <def-auditmgr:audit-manager id="josso-audit-manager">
+
+ <!-- Audit Trail Handlers list -->
+ <def-auditmgr:handlers>
+ <logger-atrailhandler:audittrail-logger category="org.josso.AUDIT"/>
+ </def-auditmgr:handlers>
+
+ </def-auditmgr:audit-manager>
+
+ <!-- ===================================================================== -->
+ <!-- SSO Protocol Manager with handlers -->
+ <!-- ===================================================================== -->
+ <default-protocol-manager id="josso-protocol-manager">
+ <!-- To enable NTLM, uncomment this :
+ <handlers>
+ <ntlm-authscheme:ntlm-protocol-handler/>
+ </handlers>
+ -->
+ </default-protocol-manager>
+
+ <!-- ===================================================================== -->
+ <!-- SSO Event manager, based on spring jmx -->
+ <!-- ===================================================================== -->
+ <def-eventmgr:springjmx-event-manager id="josso-event-manager">
+ <def-eventmgr:listeners>
+ <s:ref bean="josso-audit-manager"/>
+ </def-eventmgr:listeners>
+ </def-eventmgr:springjmx-event-manager>
+
+ <!-- ===================================================================== -->
+ <!-- SSO Simple key addapter used in several components -->
+ <!-- ===================================================================== -->
+ <simple-key-adapter id="josso-simple-key-adapter"/>
+
+ <!-- ===================================================================== -->
+ <!-- Spring Mail Sender bean. Configure mail delivery settings here -->
+ <!-- ===================================================================== -->
+ <s:bean id="josso-spring-mailsender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
+ <!-- Spring JavaMaileSender properties :
+ protocol, host, port, username, password -->
+ <s:property name="host" value="mail.mycompany.com"/>
+ </s:bean>
+
+</s:beans>
Added: components/sso/trunk/gatein-josso-plugin/src/main/config/josso-gateway-gatein-stores.xml
===================================================================
--- components/sso/trunk/gatein-josso-plugin/src/main/config/josso-gateway-gatein-stores.xml (rev 0)
+++ components/sso/trunk/gatein-josso-plugin/src/main/config/josso-gateway-gatein-stores.xml 2009-11-19 16:54:43 UTC (rev 688)
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+ ~ JOSSO: Java Open Single Sign-On
+ ~
+ ~ Copyright 2004-2009, Atricore, Inc.
+ ~
+ ~ 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.
+ ~
+ -->
+
+<s:beans xmlns:s="http://www.springframework.org/schema/beans"
+ xmlns:gatein-istore="urn:org:gatein:sso:josso:plugin:gateinidentityplugin"
+ xmlns:bind-authscheme="urn:org:josso:bind:authscheme"
+ xmlns:memory-sstore="urn:org:josso:memory:sessionstore"
+ xmlns:memory-astore="urn:org:josso:memory:assertionstore"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+ urn:org:josso:memory:identitystore http://www.josso.org/schema/josso-memory-identitystore.xsd
+ urn:org:josso:memory:sessionstore http://www.josso.org/schema/josso-memory-sessionstore.xsd
+ urn:org:josso:memory:assertionstore http://www.josso.org/schema/josso-memory-assertionstore.xsd
+ ">
+
+ <!-- ===================================================================== -->
+ <!-- JOSSO Identity Store, the id is very important because it is -->
+ <!-- referenced by the identity manager, auth schemes and who knows where -->
+ <!-- else. -->
+ <!-- ===================================================================== -->
+ <gatein-istore:gatein-store id="josso-identity-store" s:scope="singleton"/>
+
+ <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <!-- BIND Authentication Scheme -->
+ <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <bind-authscheme:bind-auth-scheme
+ id="josso-bind-authentication"
+ name="basic-authentication"
+ hashAlgorithm="MD5"
+ hashEncoding="HEX"
+ ignorePasswordCase="false"
+ ignoreUserCase="false">
+
+
+ <bind-authscheme:credentialStore>
+ <s:ref bean="josso-identity-store"/>
+ </bind-authscheme:credentialStore>
+
+ <bind-authscheme:credentialStoreKeyAdapter>
+ <s:ref bean="josso-simple-key-adapter"/>
+ </bind-authscheme:credentialStoreKeyAdapter>
+
+ </bind-authscheme:bind-auth-scheme>
+
+ <!-- ===================================================================== -->
+ <!-- JOSSO Session Store, the id is very important because it is -->
+ <!-- referenced by the session manager and who knows where else -->
+ <!-- ===================================================================== -->
+ <memory-sstore:memory-store id="josso-session-store"/>
+
+ <!-- ===================================================================== -->
+ <!-- JOSSO Assertion Store, the id is very important because it is -->
+ <!-- referenced by the assertion manager and who knows where elese -->
+ <!-- ===================================================================== -->
+ <memory-astore:memory-store id="josso-assertion-store"/>
+</s:beans>
Added: components/sso/trunk/gatein-josso-plugin/src/main/java/org/gatein/sso/josso/plugin/GateinIdentityPlugin.java
===================================================================
--- components/sso/trunk/gatein-josso-plugin/src/main/java/org/gatein/sso/josso/plugin/GateinIdentityPlugin.java (rev 0)
+++ components/sso/trunk/gatein-josso-plugin/src/main/java/org/gatein/sso/josso/plugin/GateinIdentityPlugin.java 2009-11-19 16:54:43 UTC (rev 688)
@@ -0,0 +1,186 @@
+/******************************************************************************
+ * 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.gatein.sso.josso.plugin;
+
+import org.apache.log4j.Logger;
+
+import org.josso.gateway.SSONameValuePair;
+import org.josso.gateway.identity.exceptions.NoSuchUserException;
+import org.josso.gateway.identity.exceptions.SSOIdentityException;
+import org.josso.gateway.identity.service.BaseRole;
+import org.josso.gateway.identity.service.BaseRoleImpl;
+import org.josso.gateway.identity.service.BaseUser;
+import org.josso.gateway.identity.service.BaseUserImpl;
+import org.josso.gateway.identity.service.store.UserKey;
+import org.josso.gateway.identity.service.store.SimpleUserKey;
+import org.josso.gateway.identity.service.store.IdentityStore;
+
+import org.josso.auth.Credential;
+import org.josso.auth.CredentialKey;
+import org.josso.auth.CredentialProvider;
+import org.josso.auth.scheme.AuthenticationScheme;
+import org.josso.auth.scheme.UsernameCredential;
+import org.josso.auth.scheme.PasswordCredential;
+import org.josso.auth.BindableCredentialStore;
+import org.josso.auth.exceptions.SSOAuthenticationException;
+
+/**
+ * @org.apache.xbean.XBean element="gatein-store"
+ *
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class GateinIdentityPlugin implements IdentityStore,
+ BindableCredentialStore
+{
+ private static Logger log = Logger.getLogger(GateinIdentityPlugin.class);
+
+ private AuthenticationScheme authenticationScheme = null;
+
+ private String gateInHost;
+ private String gateInPort;
+ private String gateInContext;
+
+ /**
+ *
+ *
+ */
+ public GateinIdentityPlugin()
+ {
+ try
+ {
+ // TODO: readin GateIn configuration from WEB-INF/gatein.properties
+
+ log
+ .info("-------------------------------------------------------------------");
+ log.info("GateIn Host: " + this.gateInHost);
+ log
+ .info("GateIn Identity Plugin successfully started........................");
+ log
+ .info("-------------------------------------------------------------------");
+ }
+ catch (Exception e)
+ {
+ this.authenticationScheme = null;
+
+ log.error(this, e);
+ throw new RuntimeException(
+ "GateIn Identity Plugin registration failed....");
+ }
+ }
+
+ public void setAuthenticationScheme(AuthenticationScheme authenticationScheme)
+ {
+ this.authenticationScheme = authenticationScheme;
+ }
+
+ public String getGateInHost()
+ {
+ return gateInHost;
+ }
+
+ public void setGateInHost(String gateInHost)
+ {
+ this.gateInHost = gateInHost;
+ }
+
+ public String getGateInPort()
+ {
+ return gateInPort;
+ }
+
+ public void setGateInPort(String gateInPort)
+ {
+ this.gateInPort = gateInPort;
+ }
+
+ public String getGateInContext()
+ {
+ return gateInContext;
+ }
+
+ public void setGateInContext(String gateInContext)
+ {
+ this.gateInContext = gateInContext;
+ }
+
+ // ----------------IdentityStore
+ // implementation------------------------------------------------------------------------------------------------------------------------
+ public boolean userExists(UserKey userKey) throws SSOIdentityException
+ {
+ log.info("User: "+userKey+" exists....");
+ return true;
+ }
+
+ public BaseRole[] findRolesByUserKey(UserKey userKey)
+ throws SSOIdentityException
+ {
+ log.info("Loading Roles for..."+userKey);
+
+ return null;
+ }
+
+ public BaseUser loadUser(UserKey userKey) throws NoSuchUserException,
+ SSOIdentityException
+ {
+ BaseUser user = new BaseUserImpl();
+ user.setName(userKey.toString());
+ user.addProperty("password", "");
+
+ log.info("Loading User................................................................");
+ log.info("User:"+user.getName());
+
+ return user;
+ }
+ // ---------------CredentialStore
+ // implementation----------------------------------------------------------------------------------------------------------------------
+ public Credential[] loadCredentials(CredentialKey credentialKey,
+ CredentialProvider credentialProvider) throws SSOIdentityException
+ {
+ log.info("Loading Credentials using the new method................................................................");
+ return loadCredentials(credentialKey);
+ }
+
+ public Credential[] loadCredentials(CredentialKey credentialKey) throws SSOIdentityException
+ {
+ // Get the User corresponding to this credentialKey
+ BaseUser user = this.loadUser((SimpleUserKey) credentialKey);
+ SSONameValuePair[] properties = user.getProperties();
+ String password = properties[0].getValue();
+
+ log.info("Loading Credentials for................................................................");
+ log.info("User:"+user.getName());
+ log.info("Password:"+password);
+ return new Credential[] { new UsernameCredential(user.getName()),new PasswordCredential(password) };
+ }
+
+ public boolean bind(String username, String password)
+ throws SSOAuthenticationException
+ {
+ // return this.portalIdentityService.authenticate(username, password);
+ log.info("Performing Authentication........................");
+ log.info("Username: "+username);
+ log.info("Password: "+password);
+ return true;
+ }
+}
Added: components/sso/trunk/gatein-opensso-plugin/amserver.jar
===================================================================
(Binary files differ)
Property changes on: components/sso/trunk/gatein-opensso-plugin/amserver.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: components/sso/trunk/gatein-opensso-plugin/opensso.jar
===================================================================
(Binary files differ)
Property changes on: components/sso/trunk/gatein-opensso-plugin/opensso.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: components/sso/trunk/gatein-opensso-plugin/pom.xml
===================================================================
--- components/sso/trunk/gatein-opensso-plugin/pom.xml (rev 0)
+++ components/sso/trunk/gatein-opensso-plugin/pom.xml 2009-11-19 16:54:43 UTC (rev 688)
@@ -0,0 +1,32 @@
+<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.gatein.sso</groupId>
+ <artifactId>gatein-sso-parent</artifactId>
+ <relativePath>../pom.xml</relativePath>
+ <version>trunk-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>gatein-opensso-plugin</artifactId>
+ <packaging>jar</packaging>
+ <name>Gatein Plugin for the OpenSSO Server</name>
+
+ <properties>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>opensso</groupId>
+ <artifactId>opensso</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>opensso</groupId>
+ <artifactId>amserver</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ </build>
+</project>
+
Added: components/sso/trunk/gatein-opensso-plugin/src/main/config/AuthenticationPlugin.xml
===================================================================
--- components/sso/trunk/gatein-opensso-plugin/src/main/config/AuthenticationPlugin.xml (rev 0)
+++ components/sso/trunk/gatein-opensso-plugin/src/main/config/AuthenticationPlugin.xml 2009-11-19 16:54:43 UTC (rev 688)
@@ -0,0 +1,20 @@
+<?xml version='1.0' encoding="UTF-8"?>
+
+<!DOCTYPE ModuleProperties PUBLIC "=//iPlanet//Authentication Module Properties XML Interface 1.0 DTD//EN"
+ "jar://com/sun/identity/authentication/Auth_Module_Properties.dtd">
+
+<ModuleProperties moduleName="AuthenticationPlugin" version="1.0" >
+ <Callbacks length="2" order="1" timeout="60"
+ header="GateIn OpenSSO Login" >
+ <NameCallback>
+ <Prompt>
+ Username
+ </Prompt>
+ </NameCallback>
+ <PasswordCallback echoPassword="false" >
+ <Prompt>
+ Password
+ </Prompt>
+ </PasswordCallback>
+ </Callbacks>
+</ModuleProperties>
Added: components/sso/trunk/gatein-opensso-plugin/src/main/java/org/gatein/sso/opensso/plugin/AuthenticationPlugin.java
===================================================================
--- components/sso/trunk/gatein-opensso-plugin/src/main/java/org/gatein/sso/opensso/plugin/AuthenticationPlugin.java (rev 0)
+++ components/sso/trunk/gatein-opensso-plugin/src/main/java/org/gatein/sso/opensso/plugin/AuthenticationPlugin.java 2009-11-19 16:54:43 UTC (rev 688)
@@ -0,0 +1,81 @@
+/*
+* 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.gatein.sso.opensso.plugin;
+
+import java.util.Map;
+import java.security.Principal;
+import javax.security.auth.Subject;
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.NameCallback;
+import javax.security.auth.callback.PasswordCallback;
+
+import org.apache.log4j.Logger;
+
+import com.sun.identity.authentication.spi.AMLoginModule;
+import com.sun.identity.authentication.spi.AuthLoginException;
+import com.sun.identity.authentication.util.ISAuthConstants;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ */
+public class AuthenticationPlugin extends AMLoginModule
+{
+ private static Logger log = Logger.getLogger(AuthenticationPlugin.class);
+
+ public AuthenticationPlugin()
+ {
+
+ }
+
+ public void init(Subject subject, Map sharedState, Map options)
+ {
+
+ }
+
+ public int process(Callback[] callbacks, int state) throws AuthLoginException
+ {
+ System.out.println("---------------------------------------------------------------------");
+ System.out.println("Performing GateIn Login..............................................");
+ System.out.println("---------------------------------------------------------------------");
+
+ for(int i=0; i<callbacks.length; i++)
+ {
+ Callback callback = callbacks[i];
+
+ if(callback instanceof NameCallback)
+ {
+ System.out.println("Username: "+((NameCallback)callback).getName());
+ }
+ else if(callback instanceof PasswordCallback)
+ {
+ System.out.println("Password: "+new String(((PasswordCallback)callback).getPassword()));
+ }
+ }
+
+ return ISAuthConstants.LOGIN_SUCCEED;
+ }
+
+ public Principal getPrincipal()
+ {
+ return new GateInPrincipal("user");
+ }
+}
Added: components/sso/trunk/gatein-opensso-plugin/src/main/java/org/gatein/sso/opensso/plugin/GateInPrincipal.java
===================================================================
--- components/sso/trunk/gatein-opensso-plugin/src/main/java/org/gatein/sso/opensso/plugin/GateInPrincipal.java (rev 0)
+++ components/sso/trunk/gatein-opensso-plugin/src/main/java/org/gatein/sso/opensso/plugin/GateInPrincipal.java 2009-11-19 16:54:43 UTC (rev 688)
@@ -0,0 +1,42 @@
+/*
+* 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.gatein.sso.opensso.plugin;
+
+import java.security.Principal;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ */
+public class GateInPrincipal implements Principal
+{
+ private String name;
+
+ public GateInPrincipal(String name)
+ {
+ this.name = name;
+ }
+
+ public String getName()
+ {
+ return this.name;
+ }
+}
Added: components/sso/trunk/gatein-opensso-plugin/target/classes/org/gatein/sso/opensso/plugin/AuthenticationPlugin.class
===================================================================
(Binary files differ)
Property changes on: components/sso/trunk/gatein-opensso-plugin/target/classes/org/gatein/sso/opensso/plugin/AuthenticationPlugin.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: components/sso/trunk/gatein-opensso-plugin/target/classes/org/gatein/sso/opensso/plugin/GateInPrincipal.class
===================================================================
(Binary files differ)
Property changes on: components/sso/trunk/gatein-opensso-plugin/target/classes/org/gatein/sso/opensso/plugin/GateInPrincipal.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: components/sso/trunk/gatein-opensso-plugin/target/gatein-opensso-plugin-trunk-SNAPSHOT.jar
===================================================================
(Binary files differ)
Property changes on: components/sso/trunk/gatein-opensso-plugin/target/gatein-opensso-plugin-trunk-SNAPSHOT.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: components/sso/trunk/gatein-opensso-plugin/target/maven-archiver/pom.properties
===================================================================
--- components/sso/trunk/gatein-opensso-plugin/target/maven-archiver/pom.properties (rev 0)
+++ components/sso/trunk/gatein-opensso-plugin/target/maven-archiver/pom.properties 2009-11-19 16:54:43 UTC (rev 688)
@@ -0,0 +1,5 @@
+#Generated by Maven
+#Tue Nov 17 12:44:34 CST 2009
+version=trunk-SNAPSHOT
+groupId=org.gatein.sso
+artifactId=gatein-opensso-plugin
Added: components/sso/trunk/packaging/cas/pom.xml
===================================================================
--- components/sso/trunk/packaging/cas/pom.xml (rev 0)
+++ components/sso/trunk/packaging/cas/pom.xml 2009-11-19 16:54:43 UTC (rev 688)
@@ -0,0 +1,194 @@
+<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.gatein.sso</groupId>
+ <artifactId>packaging</artifactId>
+ <relativePath>../pom.xml</relativePath>
+ <version>trunk-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>cas-pkg</artifactId>
+ <packaging>jar</packaging>
+ <name>CAS Agent and Server Packages</name>
+
+ <dependencies>
+ <!-- gatein installation dependencies -->
+ <!-- -
+ <dependency>
+ <groupId>org.gatein.sso</groupId>
+ <artifactId>auth-callback</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.sso</groupId>
+ <artifactId>agent</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jasig.cas</groupId>
+ <artifactId>cas-client-core</artifactId>
+ </dependency>
+ -->
+
+ <!-- cas server plugin installation dependencies -->
+ <!--
+ <dependency>
+ <groupId>org.gatein.sso</groupId>
+ <artifactId>gatein-cas-plugin</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ </dependency>
+ -->
+ </dependencies>
+
+ <profiles>
+ <!-- Install the CAS Agent into the Gatein Server -->
+ <profile>
+ <id>gatein-cas-install</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.jvnet.maven-antrun-extended-plugin</groupId>
+ <artifactId>maven-antrun-extended-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>agent-package</id>
+ <phase>package</phase>
+ <configuration>
+ <tasks>
+ <echo message="Preparing the CAS Agent for GateIn"/>
+
+ <!-- setup the directory for cas agent artifact -->
+ <delete dir="${basedir}/target/gatein"/>
+ <mkdir dir="${basedir}/target/gatein"/>
+
+ <unjar src="${gatein.location}/deploy/gatein.ear/02portal.war"
+ dest="${basedir}/target/gatein/portal.war" overwrite="true"/>
+
+ <!-- override the core artifacts -->
+ <copy todir="${basedir}/target/gatein/portal.war" overwrite="true">
+ <fileset dir="${basedir}/src/main/config/gatein/portal.war"/>
+ </copy>
+
+ <!-- jar it back up -->
+ <jar destfile="${basedir}/target/gatein/02portal.war" basedir="${basedir}/target/gatein/portal.war"/>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>agent-install</id>
+ <phase>install</phase>
+ <configuration>
+ <tasks>
+ <echo message="Deploying the CAS Agent for GateIn"/>
+
+ <copy file="${basedir}/target/gatein/02portal.war"
+ todir="${gatein.location}/deploy/gatein.ear"
+ overwrite="true"/>
+
+ <copy file="${basedir}/src/main/config/gatein/jboss/server/default/conf/login-config.xml"
+ tofile="${gatein.location}/conf/login-config.xml"
+ overwrite="true"/>
+
+ <!-- Deploy the Authentication Callback RESTful service -->
+ <copy file="${settings.localRepository}/org/gatein/sso/auth-callback/${project.version}/auth-callback-${project.version}.jar"
+ todir="${gatein.location}/deploy/gatein.ear/lib"
+ overwrite="true"/>
+
+ <!-- Deploy the SSO Agent -->
+ <copy file="${settings.localRepository}/org/gatein/sso/agent/${project.version}/agent-${project.version}.jar"
+ todir="${gatein.location}/deploy/gatein.ear/lib"
+ overwrite="true"/>
+
+ <!-- Deploy CAS Agent dependencies -->
+ <copy file="${settings.localRepository}/org/jasig/cas/cas-client-core/${version.cas.client}/cas-client-core-${version.cas.client}.jar"
+ todir="${gatein.location}/deploy/gatein.ear/lib"
+ overwrite="true"/>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <!-- Install the CAS Plugin into a CAS Server -->
+ <profile>
+ <id>plugin-cas-install</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.jvnet.maven-antrun-extended-plugin</groupId>
+ <artifactId>maven-antrun-extended-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>plugin-tomcat-package</id>
+ <phase>package</phase>
+ <configuration>
+ <tasks>
+ <echo message="Preparing the CAS Plugin for Tomcat 6.0.2......"/>
+
+ <!-- setup the directory for the plugin artifacts -->
+ <delete dir="${basedir}/target/plugin"/>
+ <mkdir dir="${basedir}/target/plugin"/>
+
+ <!-- prepare the plugin configuration -->
+ <copy todir="${basedir}/target/plugin/webapps/cas/WEB-INF">
+ <fileset dir="${basedir}/src/main/config/plugin/WEB-INF"/>
+ </copy>
+
+ <!-- prepare the plugin jar -->
+ <copy tofile="${basedir}/target/plugin/webapps/cas/WEB-INF/lib/gatein-cas-plugin.jar"
+ file="${settings.localRepository}/org/gatein/sso/gatein-cas-plugin/${project.version}/gatein-cas-plugin-${project.version}.jar"
+ overwrite="true"/>
+
+ <!-- copy thirdparty dependency -->
+ <copy tofile="${basedir}/target/plugin/webapps/cas/WEB-INF/lib/commons-httpclient.jar"
+ file="${settings.localRepository}/commons-httpclient/commons-httpclient/${version.commons-httpclient}/commons-httpclient-${version.commons-httpclient}.jar"
+ overwrite="true"/>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>plugin-tomcat-install</id>
+ <phase>install</phase>
+ <configuration>
+ <tasks>
+ <echo message="Starting CAS Plugin Deployment into Tomcat 6.0.2......"/>
+
+ <!-- jar plugin -->
+ <jar destfile="${basedir}/target/plugin.jar" basedir="${basedir}/target/plugin"/>
+
+ <!-- explode the jar to install the plugin -->
+ <unjar src="${basedir}/target/plugin.jar" dest="${tomcat60.location}" overwrite="true"/>
+
+ <!-- cleanup -->
+ <delete dir="${tomcat60.location}/META-INF"/>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+</project>
+
Added: components/sso/trunk/packaging/cas/src/main/config/gatein/jboss/server/default/conf/login-config.xml
===================================================================
--- components/sso/trunk/packaging/cas/src/main/config/gatein/jboss/server/default/conf/login-config.xml (rev 0)
+++ components/sso/trunk/packaging/cas/src/main/config/gatein/jboss/server/default/conf/login-config.xml 2009-11-19 16:54:43 UTC (rev 688)
@@ -0,0 +1,227 @@
+<?xml version='1.0'?>
+<!--
+
+ 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.
+
+-->
+
+<!DOCTYPE policy PUBLIC
+ "-//JBoss//DTD JBOSS Security Config 3.0//EN"
+ "http://www.jboss.org/j2ee/dtd/security_config.dtd">
+
+<!-- The XML based JAAS login configuration read by the
+org.jboss.security.auth.login.XMLLoginConfig mbean. Add
+an application-policy element for each security domain.
+
+The outline of the application-policy is:
+<application-policy name="security-domain-name">
+ <authentication>
+ <login-module code="login.module1.class.name" flag="control_flag">
+ <module-option name = "option1-name">option1-value</module-option>
+ <module-option name = "option2-name">option2-value</module-option>
+ ...
+ </login-module>
+
+ <login-module code="login.module2.class.name" flag="control_flag">
+ ...
+ </login-module>
+ ...
+ </authentication>
+</application-policy>
+
+$Revision: 64598 $
+-->
+
+<policy>
+ <!-- Used by clients within the application server VM such as
+ mbeans and servlets that access EJBs.
+ -->
+ <application-policy name = "client-login">
+ <authentication>
+ <login-module code = "org.jboss.security.ClientLoginModule"
+ flag = "required">
+ <!-- Any existing security context will be restored on logout -->
+ <module-option name="restore-login-identity">true</module-option>
+ </login-module>
+ </authentication>
+ </application-policy>
+
+ <!-- Security domain for JBossMQ -->
+ <application-policy name = "jbossmq">
+ <authentication>
+ <login-module code = "org.jboss.security.auth.spi.DatabaseServerLoginModule"
+ flag = "required">
+ <module-option name = "unauthenticatedIdentity">guest</module-option>
+ <module-option name = "dsJndiName">java:/DefaultDS</module-option>
+ <module-option name = "principalsQuery">SELECT PASSWD FROM JMS_USERS WHERE USERID=?</module-option>
+ <module-option name = "rolesQuery">SELECT ROLEID, 'Roles' FROM JMS_ROLES WHERE USERID=?</module-option>
+ </login-module>
+ </authentication>
+ </application-policy>
+
+ <!-- Security domain for JBossMQ when using file-state-service.xml
+ <application-policy name = "jbossmq">
+ <authentication>
+ <login-module code = "org.jboss.mq.sm.file.DynamicLoginModule"
+ flag = "required">
+ <module-option name = "unauthenticatedIdentity">guest</module-option>
+ <module-option name = "sm.objectname">jboss.mq:service=StateManager</module-option>
+ </login-module>
+ </authentication>
+ </application-policy>
+ -->
+
+ <!-- Security domains for testing new jca framework -->
+ <application-policy name = "HsqlDbRealm">
+ <authentication>
+ <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule"
+ flag = "required">
+ <module-option name = "principal">sa</module-option>
+ <module-option name = "userName">sa</module-option>
+ <module-option name = "password"></module-option>
+ <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=DefaultDS</module-option>
+ </login-module>
+ </authentication>
+ </application-policy>
+
+ <application-policy name = "JmsXARealm">
+ <authentication>
+ <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule"
+ flag = "required">
+ <module-option name = "principal">guest</module-option>
+ <module-option name = "userName">guest</module-option>
+ <module-option name = "password">guest</module-option>
+ <module-option name = "managedConnectionFactoryName">jboss.jca:service=TxCM,name=JmsXA</module-option>
+ </login-module>
+ </authentication>
+ </application-policy>
+
+ <!-- A template configuration for the jmx-console web application. This
+ defaults to the UsersRolesLoginModule the same as other and should be
+ changed to a stronger authentication mechanism as required.
+ -->
+ <application-policy name = "jmx-console">
+ <authentication>
+ <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
+ flag = "required">
+ <module-option name="usersProperties">props/jmx-console-users.properties</module-option>
+ <module-option name="rolesProperties">props/jmx-console-roles.properties</module-option>
+ </login-module>
+ </authentication>
+ </application-policy>
+
+ <!-- A template configuration for the web-console web application. This
+ defaults to the UsersRolesLoginModule the same as other and should be
+ changed to a stronger authentication mechanism as required.
+ -->
+ <application-policy name = "web-console">
+ <authentication>
+ <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
+ flag = "required">
+ <module-option name="usersProperties">web-console-users.properties</module-option>
+ <module-option name="rolesProperties">web-console-roles.properties</module-option>
+ </login-module>
+ </authentication>
+ </application-policy>
+
+ <!--
+ A template configuration for the JBossWS security domain.
+ This defaults to the UsersRolesLoginModule the same as other and should be
+ changed to a stronger authentication mechanism as required.
+ -->
+ <application-policy name="JBossWS">
+ <authentication>
+ <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
+ flag="required">
+ <module-option name="usersProperties">props/jbossws-users.properties</module-option>
+ <module-option name="rolesProperties">props/jbossws-roles.properties</module-option>
+ <module-option name="unauthenticatedIdentity">anonymous</module-option>
+ </login-module>
+ </authentication>
+ </application-policy>
+
+ <!-- The default login configuration used by any security domain that
+ does not have a application-policy entry with a matching name
+ -->
+ <application-policy name = "other">
+ <!-- A simple server login module, which can be used when the number
+ of users is relatively small. It uses two properties files:
+ users.properties, which holds users (key) and their password (value).
+ roles.properties, which holds users (key) and a comma-separated list of
+ their roles (value).
+ The unauthenticatedIdentity property defines the name of the principal
+ that will be used when a null username and password are presented as is
+ the case for an unuathenticated web client or MDB. If you want to
+ allow such users to be authenticated add the property, e.g.,
+ unauthenticatedIdentity="nobody"
+ -->
+ <authentication>
+ <login-module code = "org.jboss.security.auth.spi.UsersRolesLoginModule"
+ flag = "required" />
+ </authentication>
+ </application-policy>
+
+ <!-- SSO Integration -->
+ <application-policy name="exo-domain">
+ <authentication>
+ <login-module code="org.gatein.sso.agent.login.SSOLoginModule" flag="required"></login-module>
+ <login-module code="org.exoplatform.services.security.j2ee.JbossLoginModule" flag="required"></login-module>
+ </authentication>
+ </application-policy>
+
+ <application-policy name="exo-domain-sample-portal">
+ <authentication>
+ <login-module code="org.gatein.sso.agent.login.SSOLoginModule" flag="required">
+ <module-option name="portalContainerName">sample-portal</module-option>
+ <module-option name="realmName">exo-domain-sample-portal</module-option>
+ </login-module>
+ <login-module code="org.exoplatform.services.security.j2ee.JbossLoginModule" flag="required">
+ <module-option name="portalContainerName">sample-portal</module-option>
+ <module-option name="realmName">exo-domain-sample-portal</module-option>
+ </login-module>
+ </authentication>
+ </application-policy>
+
+ <!--
+ <application-policy name="exo-domain">
+ <authentication>
+ <login-module code="org.exoplatform.web.security.PortalLoginModule" flag="required"></login-module>
+ <login-module code="org.exoplatform.services.security.jaas.SharedStateLoginModule" flag="required"></login-module>
+ <login-module code="org.exoplatform.services.security.j2ee.JbossLoginModule" flag="required"></login-module>
+ </authentication>
+ </application-policy>
+
+ <application-policy name="exo-domain-sample-portal">
+ <authentication>
+ <login-module code="org.exoplatform.web.security.PortalLoginModule" flag="required">
+ <module-option name="portalContainerName">sample-portal</module-option>
+ <module-option name="realmName">exo-domain-sample-portal</module-option>
+ </login-module>
+ <login-module code="org.exoplatform.services.security.jaas.SharedStateLoginModule" flag="required">
+ <module-option name="portalContainerName">sample-portal</module-option>
+ <module-option name="realmName">exo-domain-sample-portal</module-option>
+ </login-module>
+ <login-module code="org.exoplatform.services.security.j2ee.JbossLoginModule" flag="required">
+ <module-option name="portalContainerName">sample-portal</module-option>
+ <module-option name="realmName">exo-domain-sample-portal</module-option>
+ </login-module>
+ </authentication>
+ </application-policy>
+ -->
+</policy>
+
Added: components/sso/trunk/packaging/cas/src/main/config/gatein/portal.war/WEB-INF/web.xml
===================================================================
--- components/sso/trunk/packaging/cas/src/main/config/gatein/portal.war/WEB-INF/web.xml (rev 0)
+++ components/sso/trunk/packaging/cas/src/main/config/gatein/portal.war/WEB-INF/web.xml 2009-11-19 16:54:43 UTC (rev 688)
@@ -0,0 +1,312 @@
+<?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.
+
+-->
+
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+ <display-name>portal</display-name>
+
+ <context-param>
+ <param-name>org.exoplatform.frameworks.jcr.command.web.fckeditor.digitalAssetsWorkspace</param-name>
+ <param-value>portal</param-value>
+ <description>Binary assets workspace name</description>
+ </context-param>
+
+ <context-param>
+ <param-name>org.exoplatform.frameworks.jcr.command.web.fckeditor.digitalAssetsPath</param-name>
+ <param-value>/</param-value>
+ <description>Binary assets path</description>
+ </context-param>
+
+ <!-- ================================================================== -->
+ <!-- RESOURCE FILTER TO CACHE MERGED JAVASCRIPT AND CSS -->
+ <!-- ================================================================== -->
+ <filter>
+ <filter-name>GenericFilter</filter-name>
+ <filter-class>org.exoplatform.web.filter.GenericFilter</filter-class>
+ </filter>
+ <filter>
+ <filter-name>ResourceRequestFilter</filter-name>
+ <filter-class>org.exoplatform.portal.application.ResourceRequestFilter</filter-class>
+ </filter>
+
+ <filter>
+ <filter-name>ThreadLocalSessionProviderInitializedFilter</filter-name>
+ <filter-class>org.exoplatform.frameworks.jcr.web.ThreadLocalSessionProviderInitializedFilter</filter-class>
+ </filter>
+
+ <filter>
+ <filter-name>SetCurrentIdentityFilter</filter-name>
+ <filter-class>org.exoplatform.services.security.web.SetCurrentIdentityFilter</filter-class>
+ </filter>
+
+ <filter>
+ <filter-name>RestEncodingFilter</filter-name>
+ <filter-class>org.exoplatform.services.rest.servlet.RestEncodingFilter</filter-class>
+ <init-param>
+ <param-name>REQUEST_ENCODING</param-name>
+ <param-value>UTF-8</param-value>
+ </init-param>
+ </filter>
+
+ <filter>
+ <filter-name>CacheUserProfileFilter</filter-name>
+ <filter-class>org.exoplatform.web.CacheUserProfileFilter</filter-class>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>GenericFilter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+ <filter-mapping>
+ <filter-name>ResourceRequestFilter</filter-name>
+ <url-pattern>*.css</url-pattern>
+ </filter-mapping>
+
+ <filter-mapping>
+ <filter-name>ResourceRequestFilter</filter-name>
+ <url-pattern>*.gif</url-pattern>
+ </filter-mapping>
+
+ <filter-mapping>
+ <filter-name>ResourceRequestFilter</filter-name>
+ <url-pattern>*.png</url-pattern>
+ </filter-mapping>
+
+ <filter-mapping>
+ <filter-name>ResourceRequestFilter</filter-name>
+ <url-pattern>*.jpg</url-pattern>
+ </filter-mapping>
+
+ <filter-mapping>
+ <filter-name>ResourceRequestFilter</filter-name>
+ <url-pattern>/javascript/*</url-pattern>
+ </filter-mapping>
+
+ <filter-mapping>
+ <filter-name>SetCurrentIdentityFilter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+ <filter-mapping>
+ <filter-name>CacheUserProfileFilter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+ <filter-mapping>
+ <filter-name>RestEncodingFilter</filter-name>
+ <url-pattern>/rest/*</url-pattern>
+ </filter-mapping>
+
+ <filter-mapping>
+ <filter-name>ThreadLocalSessionProviderInitializedFilter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+ <!-- ================================================================== -->
+ <!-- LISTENER -->
+ <!-- ================================================================== -->
+ <listener>
+ <listener-class>org.exoplatform.web.GenericHttpListener</listener-class>
+ </listener>
+ <listener>
+ <listener-class>org.exoplatform.portal.application.PortalSessionListener</listener-class>
+ </listener>
+ <listener>
+ <listener-class>org.exoplatform.services.security.web.JAASConversationStateListener</listener-class>
+ </listener>
+ <!-- ================================================================== -->
+ <!-- SERVLET -->
+ <!-- ================================================================== -->
+ <servlet>
+ <servlet-name>portal</servlet-name>
+ <servlet-class>org.exoplatform.portal.application.PortalController</servlet-class>
+ <init-param>
+ <param-name>webui.configuration</param-name>
+ <param-value>app:/WEB-INF/webui-configuration.xml</param-value>
+ </init-param>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <servlet>
+ <servlet-name>RestServer</servlet-name>
+ <description>eXo - Platform REST Server</description>
+ <servlet-class>org.exoplatform.services.rest.servlet.RestServlet</servlet-class>
+ <load-on-startup>4</load-on-startup>
+ </servlet>
+
+ <servlet>
+ <servlet-name>javascript</servlet-name>
+ <servlet-class>org.exoplatform.portal.webui.javascript.JavascriptServlet</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>Controller</servlet-name>
+ <servlet-class>org.exoplatform.frameworks.jcr.web.CommandControllerServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <!-- SSO Integration -->
+ <!--
+ <servlet>
+ <servlet-name>PortalLoginController</servlet-name>
+ <servlet-class>org.exoplatform.web.login.PortalLoginController</servlet-class>
+ </servlet>
+ <servlet>
+ <servlet-name>InitiateLoginServlet</servlet-name>
+ <servlet-class>org.exoplatform.web.login.InitiateLoginServlet</servlet-class>
+ </servlet>
+ -->
+ <servlet>
+ <servlet-name>InitiateLoginServlet</servlet-name>
+ <servlet-class>org.gatein.sso.agent.GenericSSOAgent</servlet-class>
+ <init-param>
+ <param-name>casServerUrl</param-name>
+ <param-value>http://localhost:8888/cas</param-value>
+ </init-param>
+ </servlet>
+
+ <servlet>
+ <servlet-name>ErrorLoginServlet</servlet-name>
+ <servlet-class>org.exoplatform.web.login.ErrorLoginServlet</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>GateInServlet</servlet-name>
+ <servlet-class>org.gatein.wci.api.GateInServlet</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <!-- ================================================================= -->
+ <servlet-mapping>
+ <servlet-name>InitiateLoginServlet</servlet-name>
+ <url-pattern>/initiatelogin</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>ErrorLoginServlet</servlet-name>
+ <url-pattern>/errorlogin</url-pattern>
+ </servlet-mapping>
+
+ <!-- SSO Integration -->
+ <!--
+ <servlet-mapping>
+ <servlet-name>PortalLoginController</servlet-name>
+ <url-pattern>/login</url-pattern>
+ </servlet-mapping>
+ -->
+
+ <servlet-mapping>
+ <servlet-name>javascript</servlet-name>
+ <url-pattern>/javascript/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>portal</servlet-name>
+ <url-pattern>/private/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>portal</servlet-name>
+ <url-pattern>/public/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>portal</servlet-name>
+ <url-pattern>/admin/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>portal</servlet-name>
+ <url-pattern>/service</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>portal</servlet-name>
+ <url-pattern>/command/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>RestServer</servlet-name>
+ <url-pattern>/rest/*</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>Controller</servlet-name>
+ <url-pattern>/connector</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>GateInServlet</servlet-name>
+ <url-pattern>/gateinservlet</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>30</session-timeout>
+ </session-config>
+
+ <!-- The Welcome File List for IBM WebSphere -->
+
+ <welcome-file-list>
+ <welcome-file>/index.jsp</welcome-file>
+ </welcome-file-list>
+
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>user authentication</web-resource-name>
+ <url-pattern>/private/*</url-pattern>
+ <http-method>POST</http-method>
+ <http-method>GET</http-method>
+ </web-resource-collection>
+ <auth-constraint>
+ <role-name>users</role-name>
+ </auth-constraint>
+ <user-data-constraint>
+ <transport-guarantee>NONE</transport-guarantee>
+ </user-data-constraint>
+ </security-constraint>
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>admin authentication</web-resource-name>
+ <url-pattern>/admin/*</url-pattern>
+ <http-method>POST</http-method>
+ <http-method>GET</http-method>
+ </web-resource-collection>
+ <auth-constraint>
+ <role-name>admin</role-name>
+ </auth-constraint>
+ <user-data-constraint>
+ <transport-guarantee>NONE</transport-guarantee>
+ </user-data-constraint>
+ </security-constraint>
+ <login-config>
+ <auth-method>FORM</auth-method>
+ <realm-name>exo-domain</realm-name>
+ <form-login-config>
+ <form-login-page>/initiatelogin</form-login-page>
+ <form-error-page>/errorlogin</form-error-page>
+ </form-login-config>
+ </login-config>
+ <security-role>
+ <description>a simple user role</description>
+ <role-name>users</role-name>
+ </security-role>
+ <security-role>
+ <description>the admin role</description>
+ <role-name>admin</role-name>
+ </security-role>
+</web-app>
\ No newline at end of file
Added: components/sso/trunk/packaging/cas/src/main/config/gatein/portal.war/groovy/portal/webui/UILoginForm.gtmpl
===================================================================
--- components/sso/trunk/packaging/cas/src/main/config/gatein/portal.war/groovy/portal/webui/UILoginForm.gtmpl (rev 0)
+++ components/sso/trunk/packaging/cas/src/main/config/gatein/portal.war/groovy/portal/webui/UILoginForm.gtmpl 2009-11-19 16:54:43 UTC (rev 688)
@@ -0,0 +1,87 @@
+<%
+ import org.exoplatform.web.application.JavascriptManager;
+ import javax.servlet.http.HttpSession;
+ def rcontext = _ctx.getRequestContext();
+ JavascriptManager jsmanager = rcontext.getJavascriptManager();
+ jsmanager.importJavascript('eXo.portal.UIPortalControl');
+ jsmanager.addCustomizedOnLoadScript('document.getElementById("UIPortalComponentLogin").username.focus();');
+ HttpSession session = rcontext.getRequest().getSession();
+ String requestPath = rcontext.getRequestContextPath() + "/private/" + rcontext.getPortalOwner();
+ session.setAttribute("initialURI", requestPath);
+%>
+<div class="UILoginForm">
+ <div class="LoginDecorator">
+ <div class="TopLeftLoginDecorator">
+ <div class="TopRightLoginDecorator">
+ <div class="TopCenterLoginDecorator">
+ <div class="SigninTitle"><%=_ctx.appRes("UILoginForm.label.Signin")%></div>
+ </div>
+ </div>
+ </div>
+ <div class="MiddleLeftLoginDecorator">
+ <div class="MiddleRightLoginDecorator">
+ <div class="LoginDecoratorBackground">
+ <div class="LoginDetailBox">
+ <% uiform.begin(); %>
+ <!--<form class="UIForm" id="$uicomponent.id" name="loginForm" action="<%= rcontext.getRequestContextPath() + "/login"%>" method="post" style="margin: 0px;">
+ <input type="hidden" name="<%= uiform.ACTION %>" value=""/>-->
+ <input type="hidden" name="uri" value="<%=session.getAttribute("initialURI"); %>"/>
+ <div class="VerticalLayout">
+ <table class="UIFormGrid">
+ <tr class="UserNameField">
+ <td class="FieldLabel"><%=_ctx.appRes("UILoginForm.label.UserName")%></td>
+ <td><% uiform.renderChild(0)%></td>
+ </tr>
+ <tr class="PasswordField" id="UIPortalLoginFormControl" onkeypress="eXo.portal.UIPortalControl.onEnterPress(event)">
+ <td class="FieldLabel"><%=_ctx.appRes("UILoginForm.label.password")%></td>
+ <td><% uiform.renderChild(1)%></td>
+ </tr>
+ <tr class="RememberField" onkeypress="eXo.portal.UIPortalControl.onEnterPress(event)">
+ <td class="FieldLabel"><% uiform.renderChild(2)%></td>
+ <td><%=_ctx.appRes("UILoginForm.label.RememberOnComputer")%></td>
+ </tr>
+ </table>
+ <div class="ForgetPass"><a href="<%= uicomponent.event("ForgetPassword") %>"><%=_ctx.appRes("UILoginForm.label.forgot")%></a></div>
+ <div class="UIAction">
+ <table class="ActionContainer">
+ <tr>
+ <td>
+ <div onclick="login(this);" id="UIPortalLoginFormAction" class="ActionButton SimpleStyle">
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <a href="#"><%=_ctx.appRes("UILoginForm.label.Signin");%></a>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div onclick="<%=uicomponent.event("Close");%>" class="ActionButton SimpleStyle">
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <a href="javascript:void(0);"><%=_ctx.appRes("UILoginForm.label.Discard")%></a>
+ </div>
+ </div>
+ </div>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+ <%uiform.end()%>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="BottomLeftLoginDecorator">
+ <div class="BottomRightLoginDecorator">
+ <div class="BottomCenterLoginDecorator"><span></span></div>
+ </div>
+ </div>
+ </div>
+</div>
+<script>
+ <%=uicomponent.event("Close");%>
+ window.location = 'http://localhost:8888/cas/login?service=http://localhost:8080/portal/priv...';
+</script>
Added: components/sso/trunk/packaging/cas/src/main/config/gatein/portal.war/login/jsp/login.jsp
===================================================================
--- components/sso/trunk/packaging/cas/src/main/config/gatein/portal.war/login/jsp/login.jsp (rev 0)
+++ components/sso/trunk/packaging/cas/src/main/config/gatein/portal.war/login/jsp/login.jsp 2009-11-19 16:54:43 UTC (rev 688)
@@ -0,0 +1,39 @@
+<%--
+
+ 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.
+
+--%>
+
+<%@ page import="java.net.URLEncoder"%>
+<%@ page import="javax.servlet.http.Cookie"%>
+<%@ page import="org.exoplatform.container.PortalContainer"%>
+<%@ page import="org.exoplatform.services.resources.ResourceBundleService"%>
+<%@ page import="java.util.ResourceBundle"%>
+<%@ page import="org.exoplatform.web.login.InitiateLoginServlet"%>
+<%@ page language="java" %>
+<%@ page contentType="text/html; charset=utf-8" %>
+
+<html>
+ <head>
+ <script type="text/javascript">
+ window.location = 'http://localhost:8888/cas/login?service=http://localhost:8080/portal/priv...';
+ </script>
+ </head>
+ <body>
+ </body>
+</html>
\ No newline at end of file
Added: components/sso/trunk/packaging/cas/src/main/config/plugin/WEB-INF/deployerConfigContext.xml
===================================================================
--- components/sso/trunk/packaging/cas/src/main/config/plugin/WEB-INF/deployerConfigContext.xml (rev 0)
+++ components/sso/trunk/packaging/cas/src/main/config/plugin/WEB-INF/deployerConfigContext.xml 2009-11-19 16:54:43 UTC (rev 688)
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ | deployerConfigContext.xml centralizes into one file some of the declarative configuration that
+ | all CAS deployers will need to modify.
+ |
+ | This file declares some of the Spring-managed JavaBeans that make up a CAS deployment.
+ | The beans declared in this file are instantiated at context initialization time by the Spring
+ | ContextLoaderListener declared in web.xml. It finds this file because this
+ | file is among those declared in the context parameter "contextConfigLocation".
+ |
+ | By far the most common change you will need to make in this file is to change the last bean
+ | declaration to replace the default SimpleTestUsernamePasswordAuthenticationHandler with
+ | one implementing your approach for authenticating usernames and passwords.
+ +-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:p="http://www.springframework.org/schema/p"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
+ <!--
+ | This bean declares our AuthenticationManager. The CentralAuthenticationService service bean
+ | declared in applicationContext.xml picks up this AuthenticationManager by reference to its id,
+ | "authenticationManager". Most deployers will be able to use the default AuthenticationManager
+ | implementation and so do not need to change the class of this bean. We include the whole
+ | AuthenticationManager here in the userConfigContext.xml so that you can see the things you will
+ | need to change in context.
+ +-->
+ <bean id="authenticationManager"
+ class="org.jasig.cas.authentication.AuthenticationManagerImpl">
+ <!--
+ | This is the List of CredentialToPrincipalResolvers that identify what Principal is trying to authenticate.
+ | The AuthenticationManagerImpl considers them in order, finding a CredentialToPrincipalResolver which
+ | supports the presented credentials.
+ |
+ | AuthenticationManagerImpl uses these resolvers for two purposes. First, it uses them to identify the Principal
+ | attempting to authenticate to CAS /login . In the default configuration, it is the DefaultCredentialsToPrincipalResolver
+ | that fills this role. If you are using some other kind of credentials than UsernamePasswordCredentials, you will need to replace
+ | DefaultCredentialsToPrincipalResolver with a CredentialsToPrincipalResolver that supports the credentials you are
+ | using.
+ |
+ | Second, AuthenticationManagerImpl uses these resolvers to identify a service requesting a proxy granting ticket.
+ | In the default configuration, it is the HttpBasedServiceCredentialsToPrincipalResolver that serves this purpose.
+ | You will need to change this list if you are identifying services by something more or other than their callback URL.
+ +-->
+ <property name="credentialsToPrincipalResolvers">
+ <list>
+ <!--
+ | UsernamePasswordCredentialsToPrincipalResolver supports the UsernamePasswordCredentials that we use for /login
+ | by default and produces SimplePrincipal instances conveying the username from the credentials.
+ |
+ | If you've changed your LoginFormAction to use credentials other than UsernamePasswordCredentials then you will also
+ | need to change this bean declaration (or add additional declarations) to declare a CredentialsToPrincipalResolver that supports the
+ | Credentials you are using.
+ +-->
+ <bean
+ class="org.jasig.cas.authentication.principal.UsernamePasswordCredentialsToPrincipalResolver" />
+ <!--
+ | HttpBasedServiceCredentialsToPrincipalResolver supports HttpBasedCredentials. It supports the CAS 2.0 approach of
+ | authenticating services by SSL callback, extracting the callback URL from the Credentials and representing it as a
+ | SimpleService identified by that callback URL.
+ |
+ | If you are representing services by something more or other than an HTTPS URL whereat they are able to
+ | receive a proxy callback, you will need to change this bean declaration (or add additional declarations).
+ +-->
+ <bean
+ class="org.jasig.cas.authentication.principal.HttpBasedServiceCredentialsToPrincipalResolver" />
+ </list>
+ </property>
+
+ <!--
+ | Whereas CredentialsToPrincipalResolvers identify who it is some Credentials might authenticate,
+ | AuthenticationHandlers actually authenticate credentials. Here we declare the AuthenticationHandlers that
+ | authenticate the Principals that the CredentialsToPrincipalResolvers identified. CAS will try these handlers in turn
+ | until it finds one that both supports the Credentials presented and succeeds in authenticating.
+ +-->
+ <property name="authenticationHandlers">
+ <list>
+ <!--
+ | This is the authentication handler that authenticates services by means of callback via SSL, thereby validating
+ | a server side SSL certificate.
+ +-->
+ <bean class="org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler"
+ p:httpClient-ref="httpClient" />
+ <!--
+ | This is the authentication handler declaration that every CAS deployer will need to change before deploying CAS
+ | into production. The default SimpleTestUsernamePasswordAuthenticationHandler authenticates UsernamePasswordCredentials
+ | where the username equals the password. You will need to replace this with an AuthenticationHandler that implements your
+ | local authentication strategy. You might accomplish this by coding a new such handler and declaring
+ | edu.someschool.its.cas.MySpecialHandler here, or you might use one of the handlers provided in the adaptors modules.
+ +-->
+
+ <!--
+ <bean class="org.jasig.cas.authentication.handler.support.SimpleTestUsernamePasswordAuthenticationHandler" />
+ -->
+ <!-- Integrates with the Gatein Authentication Service to perform authentication -->
+ <!--
+ Note: Modify the Plugin Configuration based on the actual information of a GateIn instance.
+ The instance can be anywhere on the internet...Not on localhost where CAS is running
+ -->
+ <bean class="org.gatein.sso.cas.plugin.AuthenticationPlugin">
+ <property name="gateInHost"><value>localhost</value></property>
+ <property name="gateInPort"><value>8080</value></property>
+ <property name="gateInContext"><value>portal</value></property>
+ </bean>
+ </list>
+ </property>
+ </bean>
+
+
+ <!--
+ This bean defines the security roles for the Services Management application. Simple deployments can use the in-memory version.
+ More robust deployments will want to use another option, such as the Jdbc version.
+
+ The name of this should remain "userDetailsService" in order for Acegi to find it.
+
+ To use this, you should add an entry similar to the following between the two value tags:
+ battags=notused,ROLE_ADMIN
+
+ where battags is the username you want to grant access to. You can put one entry per line.
+ -->
+ <bean id="userDetailsService" class="org.springframework.security.userdetails.memory.InMemoryDaoImpl">
+ <property name="userMap">
+ <value>
+
+ </value>
+ </property>
+ </bean>
+
+ <!--
+ Bean that defines the attributes that a service may return. This example uses the Stub/Mock version. A real implementation
+ may go against a database or LDAP server. The id should remain "attributeRepository" though.
+ -->
+ <bean id="attributeRepository"
+ class="org.jasig.services.persondir.support.StubPersonAttributeDao">
+ <property name="backingMap">
+ <map>
+ <entry key="uid" value="uid" />
+ <entry key="eduPersonAffiliation" value="eduPersonAffiliation" />
+ <entry key="groupMembership" value="groupMembership" />
+ </map>
+ </property>
+ </bean>
+
+ <!--
+ Sample, in-memory data store for the ServiceRegistry. A real implementation
+ would probably want to replace this with the JPA-backed ServiceRegistry DAO
+ The name of this bean should remain "serviceRegistryDao".
+ -->
+ <bean
+ id="serviceRegistryDao"
+ class="org.jasig.cas.services.InMemoryServiceRegistryDaoImpl" />
+</beans>
Added: components/sso/trunk/packaging/pom.xml
===================================================================
--- components/sso/trunk/packaging/pom.xml (rev 0)
+++ components/sso/trunk/packaging/pom.xml 2009-11-19 16:54:43 UTC (rev 688)
@@ -0,0 +1,20 @@
+<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.gatein.sso</groupId>
+ <artifactId>gatein-sso-parent</artifactId>
+ <relativePath>../pom.xml</relativePath>
+ <version>trunk-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>packaging</artifactId>
+ <packaging>pom</packaging>
+ <name>Used for packaging deployable artifacts</name>
+
+ <modules>
+ <module>cas</module>
+ </modules>
+
+</project>
+
Added: components/sso/trunk/packaging/profiles.xml
===================================================================
--- components/sso/trunk/packaging/profiles.xml (rev 0)
+++ components/sso/trunk/packaging/profiles.xml 2009-11-19 16:54:43 UTC (rev 688)
@@ -0,0 +1,73 @@
+<!--
+
+ 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.
+
+-->
+<profilesXml>
+ <profiles>
+ <profile>
+ <id>gatein-cas-install</id>
+ <properties>
+ <!-- ChangeMe to your specific local environment -->
+ <gatein.location>/home/soshah/projects/gatein/runtime/jboss/server/default</gatein.location>
+ </properties>
+ </profile>
+ <profile>
+ <id>plugin-cas-install</id>
+ <properties>
+ <!-- ChangeMe to your specific local environment -->
+ <tomcat60.location>/home/soshah/projects/gatein/runtime/tomcat-cas-3.3.4</tomcat60.location>
+ </properties>
+ </profile>
+
+ <profile>
+ <id>gatein-josso-install</id>
+ <properties>
+ <!-- ChangeMe to your specific local environment -->
+ <gatein.location>/home/soshah/projects/gatein/runtime/jboss/server/default</gatein.location>
+ </properties>
+ </profile>
+ <profile>
+ <id>plugin-josso-install</id>
+ <properties>
+ <!-- ChangeMe to your specific local environment -->
+ <tomcat60.location>/home/soshah/projects/gatein/runtime/tomcat-josso-1.8.1</tomcat60.location>
+ </properties>
+ </profile>
+
+ <profile>
+ <id>gatein-opensso-install</id>
+ <properties>
+ <!-- ChangeMe to your specific local environment -->
+ <gatein.location>/home/soshah/projects/gatein/runtime/jboss/server/default</gatein.location>
+ </properties>
+ </profile>
+ <profile>
+ <id>plugin-opensso-install</id>
+ <properties>
+ <!-- ChangeMe to your specific local environment -->
+ <tomcat60.location>/home/soshah/projects/gatein/runtime/tomcat-opensso-8.0</tomcat60.location>
+ </properties>
+ </profile>
+ </profiles>
+
+ <activeProfiles>
+ <activeProfile>gatein-cas-install</activeProfile>
+ <activeProfile>plugin-cas-install</activeProfile>
+ </activeProfiles>
+</profilesXml>
Added: components/sso/trunk/pom.xml
===================================================================
--- components/sso/trunk/pom.xml (rev 0)
+++ components/sso/trunk/pom.xml 2009-11-19 16:54:43 UTC (rev 688)
@@ -0,0 +1,291 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ This pom functions as a default configuration. The subproject
+ poms each inherit configuration from this one.
+
+ When adding version information for an artifact please do the following
+ - add a version property for the specific version
+ - add a dependency in the dependencyManagement section which refers to
+ the property
+-->
+<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">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.gatein.sso</groupId>
+ <artifactId>gatein-sso-parent</artifactId>
+ <version>trunk-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <name>Gatein Single Sign On Integration</name>
+ <url>http://www.jboss.org/gatein</url>
+ <description>Gatein Single Sign On Integration</description>
+
+ <modules>
+ <module>agent</module>
+ <module>auth-callback</module>
+ <module>gatein-cas-plugin</module>
+ <module>gatein-josso-plugin</module>
+ <!-- <module>gatein-opensso-plugin</module> -->
+ <module>packaging</module>
+ </modules>
+
+ <properties>
+ <version.junit>3.8.1</version.junit>
+
+ <!-- http client -->
+ <version.commons-httpclient>3.1</version.commons-httpclient>
+
+ <!-- logging -->
+ <version.log4j>1.2.14</version.log4j>
+ <version.jboss.logging>2.0.2.GA</version.jboss.logging>
+ <version.apache.logging>1.0.4-jboss</version.apache.logging>
+
+ <!-- cas -->
+ <version.cas>3.3.4</version.cas>
+ <version.cas.client>3.1.9</version.cas.client>
+
+ <!-- josso -->
+ <version.josso>1.8.1</version.josso>
+
+ <!-- xbean -->
+ <version.xbean>3.4.3</version.xbean>
+
+ <!-- opensso -->
+ <version.opensso>8.0</version.opensso>
+
+ <!-- exo -->
+ <org.exoplatform.core.version>2.3.0-Beta02</org.exoplatform.core.version>
+ <org.exoplatform.ws.version>2.1.0-Beta02</org.exoplatform.ws.version>
+ <org.exoplatform.portal.version>3.0.0-CR01-SNAPSHOT</org.exoplatform.portal.version>
+
+ <!-- JAX-RS jsr-311 -->
+ <version.javax.ws.rs>1.0</version.javax.ws.rs>
+
+ <!-- servlet-api -->
+ <version.servlet-api>2.5</version.servlet-api>
+ </properties>
+
+ <dependencyManagement>
+ <dependencies>
+ <!-- junit -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${version.junit}</version>
+ </dependency>
+
+ <!-- cas -->
+ <dependency>
+ <groupId>org.jasig.cas</groupId>
+ <artifactId>cas-server-core</artifactId>
+ <version>${version.cas}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jasig.cas</groupId>
+ <artifactId>cas-client-core</artifactId>
+ <version>${version.cas.client}</version>
+ </dependency>
+
+ <!-- opensso -->
+ <dependency>
+ <groupId>opensso</groupId>
+ <artifactId>opensso</artifactId>
+ <version>${version.opensso}</version>
+ </dependency>
+ <dependency>
+ <groupId>opensso</groupId>
+ <artifactId>amserver</artifactId>
+ <version>${version.opensso}</version>
+ </dependency>
+
+ <!-- josso -->
+ <dependency>
+ <groupId>org.josso</groupId>
+ <artifactId>josso-core</artifactId>
+ <version>${version.josso}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.josso</groupId>
+ <artifactId>josso-basic-authscheme</artifactId>
+ <version>${version.josso}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.josso</groupId>
+ <artifactId>josso-agent</artifactId>
+ <version>${version.josso}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.josso</groupId>
+ <artifactId>josso-agent-shared</artifactId>
+ <version>${version.josso}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.josso</groupId>
+ <artifactId>josso-servlet-agent</artifactId>
+ <version>${version.josso}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.josso</groupId>
+ <artifactId>josso-protocol-client</artifactId>
+ <version>${version.josso}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.josso</groupId>
+ <artifactId>josso-common</artifactId>
+ <version>${version.josso}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.xbean</groupId>
+ <artifactId>xbean-spring</artifactId>
+ <version>${version.xbean}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <!-- logging -->
+ <dependency>
+ <groupId>apache-log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>${version.log4j}</version>
+ </dependency>
+
+ <!-- httpclient -->
+ <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ <version>${version.commons-httpclient}</version>
+ </dependency>
+
+ <!-- jax-rs api -->
+ <dependency>
+ <groupId>javax.ws.rs</groupId>
+ <artifactId>jsr311-api</artifactId>
+ <version>${version.javax.ws.rs}</version>
+ </dependency>
+
+ <!-- exo -->
+ <dependency>
+ <groupId>org.exoplatform.ws</groupId>
+ <artifactId>exo.ws.rest.core</artifactId>
+ <version>${org.exoplatform.ws.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.core</groupId>
+ <artifactId>exo.core.component.security.core</artifactId>
+ <version>${org.exoplatform.core.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.core</groupId>
+ <artifactId>exo.core.component.organization.api</artifactId>
+ <version>${org.exoplatform.core.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.component.web</artifactId>
+ <version>${org.exoplatform.portal.version}</version>
+ </dependency>
+
+
+ <!-- servlet-api -->
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>${version.servlet-api}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+ <dependency>
+ <groupId>apache-log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+
+ <repositories>
+ <repository>
+ <id>repository.jboss.org</id>
+ <name>JBoss Repository</name>
+ <layout>default</layout>
+ <url>http://repository.jboss.org/maven2/</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+
+ <repository>
+ <id>snapshots.jboss.org</id>
+ <name>JBoss Snapshots Repository</name>
+ <layout>default</layout>
+ <url>http://snapshots.jboss.org/maven2/</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ </repository>
+
+ <repository>
+ <id>josso-m2-repo</id>
+ <name>JOSSO Maven2 Repository</name>
+ <url>http://repository.josso.org</url>
+ <releases>
+ <checksumPolicy>fail</checksumPolicy>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <checksumPolicy>fail</checksumPolicy>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+
+ <repository>
+ <id>exo-int</id>
+ <url>http://maven2.exoplatform.org/rest/maven2</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <pluginRepositories>
+ <pluginRepository>
+ <id>java.net maven repository</id>
+ <url>http://download.java.net/maven/2/</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+</project>
15 years, 1 month
gatein SVN: r687 - tools/maven/dep/trunk.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2009-11-19 11:53:19 -0500 (Thu, 19 Nov 2009)
New Revision: 687
Modified:
tools/maven/dep/trunk/pom.xml
Log:
- update to chromattic 1.0.0-beta8
Modified: tools/maven/dep/trunk/pom.xml
===================================================================
--- tools/maven/dep/trunk/pom.xml 2009-11-19 15:47:36 UTC (rev 686)
+++ tools/maven/dep/trunk/pom.xml 2009-11-19 16:53:19 UTC (rev 687)
@@ -26,7 +26,7 @@
<properties>
<!-- Dependencies versions -->
<version.activation>1.1</version.activation>
- <version.chromattic>1.0.0-beta7</version.chromattic>
+ <version.chromattic>1.0.0-beta8</version.chromattic>
<version.log4j>1.2.14</version.log4j>
<version.junit>3.8.2</version.junit>
<version.javax.servlet>2.5</version.javax.servlet>
15 years, 1 month
gatein SVN: r686 - components.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-11-19 10:47:36 -0500 (Thu, 19 Nov 2009)
New Revision: 686
Added:
components/sso/
Log:
adding SSO component
15 years, 1 month
gatein SVN: r685 - in components/common/trunk: common and 2 other directories.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-11-19 10:24:36 -0500 (Thu, 19 Nov 2009)
New Revision: 685
Modified:
components/common/trunk/common/pom.xml
components/common/trunk/logging/pom.xml
components/common/trunk/mc/pom.xml
components/common/trunk/pom.xml
Log:
[maven-release-plugin] prepare for next development iteration
Modified: components/common/trunk/common/pom.xml
===================================================================
--- components/common/trunk/common/pom.xml 2009-11-19 15:23:59 UTC (rev 684)
+++ components/common/trunk/common/pom.xml 2009-11-19 15:24:36 UTC (rev 685)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.common</groupId>
<artifactId>common-parent</artifactId>
- <version>2.0.0-CR1</version>
+ <version>2.0.0-CR2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>common-common</artifactId>
@@ -14,7 +14,7 @@
<dependency>
<groupId>org.gatein.common</groupId>
<artifactId>common-logging</artifactId>
- <version>2.0.0-CR1</version>
+ <version>2.0.0-CR2-SNAPSHOT</version>
</dependency>
<dependency>
Modified: components/common/trunk/logging/pom.xml
===================================================================
--- components/common/trunk/logging/pom.xml 2009-11-19 15:23:59 UTC (rev 684)
+++ components/common/trunk/logging/pom.xml 2009-11-19 15:24:36 UTC (rev 685)
@@ -21,7 +21,7 @@
<parent>
<groupId>org.gatein.common</groupId>
<artifactId>common-parent</artifactId>
- <version>2.0.0-CR1</version>
+ <version>2.0.0-CR2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>common-logging</artifactId>
Modified: components/common/trunk/mc/pom.xml
===================================================================
--- components/common/trunk/mc/pom.xml 2009-11-19 15:23:59 UTC (rev 684)
+++ components/common/trunk/mc/pom.xml 2009-11-19 15:24:36 UTC (rev 685)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.common</groupId>
<artifactId>common-parent</artifactId>
- <version>2.0.0-CR1</version>
+ <version>2.0.0-CR2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>common-mc</artifactId>
@@ -14,7 +14,7 @@
<dependency>
<groupId>org.gatein.common</groupId>
<artifactId>common-logging</artifactId>
- <version>2.0.0-CR1</version>
+ <version>2.0.0-CR2-SNAPSHOT</version>
</dependency>
<dependency>
Modified: components/common/trunk/pom.xml
===================================================================
--- components/common/trunk/pom.xml 2009-11-19 15:23:59 UTC (rev 684)
+++ components/common/trunk/pom.xml 2009-11-19 15:24:36 UTC (rev 685)
@@ -6,7 +6,7 @@
<groupId>org.gatein.common</groupId>
<artifactId>common-parent</artifactId>
- <version>2.0.0-CR1</version>
+ <version>2.0.0-CR2-SNAPSHOT</version>
<packaging>pom</packaging>
<parent>
@@ -16,9 +16,9 @@
</parent>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/gatein/components/common/tags/2.0....</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/gatein/components/common/tags/2.0.0-CR1</developerConnection>
- <url>http://fisheye.jboss.org/browse/gatein/components/common/tags/2.0.0-CR1</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/gatein/components/common/trunk/</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/gatein/components/common/trunk/</developerConnection>
+ <url>http://fisheye.jboss.org/browse/gatein/components/common/trunk/</url>
</scm>
<!-- Import dependency management configuration -->
15 years, 1 month
gatein SVN: r684 - components/common/tags.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-11-19 10:23:59 -0500 (Thu, 19 Nov 2009)
New Revision: 684
Added:
components/common/tags/2.0.0-CR1/
Log:
[maven-scm] copy for tag 2.0.0-CR1
Copied: components/common/tags/2.0.0-CR1 (from rev 683, components/common/trunk)
15 years, 1 month