JBoss Portal SVN: r13845 - jbossexo/modules.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2009-11-19 12:19:12 -0500 (Thu, 19 Nov 2009)
New Revision: 13845
Removed:
jbossexo/modules/sso/
Log:
moved to gatein
14 years, 5 months
JBoss Portal SVN: r13843 - in jbossexo/modules/sso/trunk: packaging and 1 other directory.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2009-11-17 17:56:35 -0500 (Tue, 17 Nov 2009)
New Revision: 13843
Added:
jbossexo/modules/sso/trunk/README
Modified:
jbossexo/modules/sso/trunk/packaging/profiles.xml
Log:
Adding Instructions
Added: jbossexo/modules/sso/trunk/README
===================================================================
--- jbossexo/modules/sso/trunk/README (rev 0)
+++ jbossexo/modules/sso/trunk/README 2009-11-17 22:56:35 UTC (rev 13843)
@@ -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
Modified: jbossexo/modules/sso/trunk/packaging/profiles.xml
===================================================================
--- jbossexo/modules/sso/trunk/packaging/profiles.xml 2009-11-17 20:57:59 UTC (rev 13842)
+++ jbossexo/modules/sso/trunk/packaging/profiles.xml 2009-11-17 22:56:35 UTC (rev 13843)
@@ -67,7 +67,7 @@
</profiles>
<activeProfiles>
- <activeProfile>gatein-install</activeProfile>
- <activeProfile>plugin-install</activeProfile>
+ <activeProfile>gatein-cas-install</activeProfile>
+ <activeProfile>plugin-cas-install</activeProfile>
</activeProfiles>
</profilesXml>
14 years, 5 months
JBoss Portal SVN: r13842 - in jbossexo/modules/sso/trunk: packaging and 1 other directories.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2009-11-17 15:57:59 -0500 (Tue, 17 Nov 2009)
New Revision: 13842
Modified:
jbossexo/modules/sso/trunk/packaging/cas/pom.xml
jbossexo/modules/sso/trunk/packaging/profiles.xml
jbossexo/modules/sso/trunk/pom.xml
Log:
packaging and deployment
Modified: jbossexo/modules/sso/trunk/packaging/cas/pom.xml
===================================================================
--- jbossexo/modules/sso/trunk/packaging/cas/pom.xml 2009-11-17 18:46:02 UTC (rev 13841)
+++ jbossexo/modules/sso/trunk/packaging/cas/pom.xml 2009-11-17 20:57:59 UTC (rev 13842)
@@ -11,11 +11,44 @@
<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-install</id>
+ <id>gatein-cas-install</id>
<build>
<plugins>
<plugin>
@@ -33,7 +66,7 @@
<delete dir="${basedir}/target/gatein"/>
<mkdir dir="${basedir}/target/gatein"/>
- <unjar src="${settings.localRepository}/org/exoplatform/portal/exo.portal.web.portal/${org.exoplatform.portal.version}/exo.portal.web.portal-${org.exoplatform.portal.version}.war"
+ <unjar src="${gatein.location}/deploy/gatein.ear/02portal.war"
dest="${basedir}/target/gatein/portal.war" overwrite="true"/>
<!-- override the core artifacts -->
@@ -92,7 +125,7 @@
<!-- Install the CAS Plugin into a CAS Server -->
<profile>
- <id>plugin-install</id>
+ <id>plugin-cas-install</id>
<build>
<plugins>
<plugin>
@@ -141,10 +174,10 @@
<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.cas.location}" overwrite="true"/>
+ <unjar src="${basedir}/target/plugin.jar" dest="${tomcat60.location}" overwrite="true"/>
<!-- cleanup -->
- <delete dir="${tomcat60.cas.location}/META-INF"/>
+ <delete dir="${tomcat60.location}/META-INF"/>
</tasks>
</configuration>
<goals>
Modified: jbossexo/modules/sso/trunk/packaging/profiles.xml
===================================================================
--- jbossexo/modules/sso/trunk/packaging/profiles.xml 2009-11-17 18:46:02 UTC (rev 13841)
+++ jbossexo/modules/sso/trunk/packaging/profiles.xml 2009-11-17 20:57:59 UTC (rev 13842)
@@ -18,27 +18,50 @@
02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-
<profilesXml>
<profiles>
<profile>
- <id>gatein-install</id>
+ <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-install</id>
+ <id>plugin-cas-install</id>
<properties>
<!-- ChangeMe to your specific local environment -->
- <tomcat60.cas.location>/home/soshah/projects/gatein/runtime/tomcat-cas-3.3.4</tomcat60.cas.location>
-
+ <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.josso.location>/home/soshah/projects/gatein/runtime/tomcat-josso-1.8.1</tomcat60.josso.location>
-
+ <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.opensso.location>/home/soshah/projects/gatein/runtime/tomcat-opensso-8.0</tomcat60.opensso.location>
+ <tomcat60.location>/home/soshah/projects/gatein/runtime/tomcat-opensso-8.0</tomcat60.location>
</properties>
</profile>
</profiles>
Modified: jbossexo/modules/sso/trunk/pom.xml
===================================================================
--- jbossexo/modules/sso/trunk/pom.xml 2009-11-17 18:46:02 UTC (rev 13841)
+++ jbossexo/modules/sso/trunk/pom.xml 2009-11-17 20:57:59 UTC (rev 13842)
@@ -25,7 +25,7 @@
<module>auth-callback</module>
<module>gatein-cas-plugin</module>
<module>gatein-josso-plugin</module>
- <module>gatein-opensso-plugin</module>
+ <!-- <module>gatein-opensso-plugin</module> -->
<module>packaging</module>
</modules>
@@ -188,7 +188,7 @@
<groupId>org.exoplatform.portal</groupId>
<artifactId>exo.portal.component.web</artifactId>
<version>${org.exoplatform.portal.version}</version>
- </dependency>
+ </dependency>
<!-- servlet-api -->
14 years, 5 months
JBoss Portal SVN: r13841 - in jbossexo/modules/sso/trunk: agent/src/main/config and 4 other directories.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2009-11-17 13:46:02 -0500 (Tue, 17 Nov 2009)
New Revision: 13841
Removed:
jbossexo/modules/sso/trunk/agent/src/main/config/cas/
jbossexo/modules/sso/trunk/agent/src/main/config/jboss/
jbossexo/modules/sso/trunk/gatein-cas-plugin/src/main/config/
Modified:
jbossexo/modules/sso/trunk/agent/pom.xml
jbossexo/modules/sso/trunk/gatein-cas-plugin/pom.xml
jbossexo/modules/sso/trunk/gatein-josso-plugin/pom.xml
jbossexo/modules/sso/trunk/packaging/cas/
Log:
maven cleanup
Modified: jbossexo/modules/sso/trunk/agent/pom.xml
===================================================================
--- jbossexo/modules/sso/trunk/agent/pom.xml 2009-11-17 18:37:47 UTC (rev 13840)
+++ jbossexo/modules/sso/trunk/agent/pom.xml 2009-11-17 18:46:02 UTC (rev 13841)
@@ -92,6 +92,10 @@
</build>
</profile>
+ <!--
+ TODO: move this into packaging module
+ -->
+ <!--
<profile>
<id>josso-agent</id>
<build>
@@ -107,19 +111,19 @@
<tasks>
<echo message="Preparing the JOSSO Agent for GateIn"/>
- <!-- setup the directory for josso agent artifact -->
+
<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"/>
- <!-- override the core artifacts -->
+
<copy todir="${basedir}/target/josso/portal.war" overwrite="true">
<fileset dir="${basedir}/src/main/config/josso/portal.war"/>
</copy>
- <!-- jar it back up -->
+
<jar destfile="${basedir}/target/josso/02portal.war" basedir="${basedir}/target/josso/portal.war"/>
</tasks>
</configuration>
@@ -138,18 +142,18 @@
todir="${gatein.location}/deploy/gatein.ear"
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 JOSSO Agent dependencies -->
+
<copy file="${settings.localRepository}/org/josso/josso-agent/${version.josso}/josso-agent-${version.josso}.jar"
todir="${gatein.location}/deploy/gatein.ear/lib"
overwrite="true"/>
@@ -184,6 +188,7 @@
</plugins>
</build>
</profile>
+ -->
</profiles>
</project>
Modified: jbossexo/modules/sso/trunk/gatein-cas-plugin/pom.xml
===================================================================
--- jbossexo/modules/sso/trunk/gatein-cas-plugin/pom.xml 2009-11-17 18:37:47 UTC (rev 13840)
+++ jbossexo/modules/sso/trunk/gatein-cas-plugin/pom.xml 2009-11-17 18:46:02 UTC (rev 13841)
@@ -55,76 +55,7 @@
</plugin>
</plugins>
</build>
- </profile>
- <profile>
- <id>plugin-tomcat-deploy</id>
- <properties>
- <!-- ChangeMe to your specific local environment -->
- <tomcat60.cas.location>/home/soshah/projects/gatein/runtime/tomcat-cas-3.3.4</tomcat60.cas.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 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/WEB-INF"/>
- </copy>
-
- <!-- prepare the plugin jar -->
- <copy tofile="${basedir}/target/plugin/webapps/cas/WEB-INF/lib/gatein-cas-plugin.jar"
- file="${basedir}/target/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.cas.location}" overwrite="true"/>
-
- <!-- cleanup -->
- <delete dir="${tomcat60.cas.location}/META-INF"/>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
+ </profile>
</profiles>
</project>
Modified: jbossexo/modules/sso/trunk/gatein-josso-plugin/pom.xml
===================================================================
--- jbossexo/modules/sso/trunk/gatein-josso-plugin/pom.xml 2009-11-17 18:37:47 UTC (rev 13840)
+++ jbossexo/modules/sso/trunk/gatein-josso-plugin/pom.xml 2009-11-17 18:46:02 UTC (rev 13841)
@@ -47,11 +47,14 @@
</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>
- <!-- ChangeMe to your specific local environment -->
+ <properties>
<tomcat60.josso.location>/home/soshah/projects/gatein/runtime/tomcat-josso-1.8.1</tomcat60.josso.location>
</properties>
<build>
@@ -66,29 +69,24 @@
<configuration>
<tasks>
<echo message="Preparing the JOSSO 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 core customized configuration -->
+
<copy todir="${basedir}/target/plugin/lib">
<fileset dir="${basedir}/src/main/config">
<include name="josso-gateway-*.xml"/>
</fileset>
</copy>
-
- <!-- prepare the plugin configuration -->
+
<copy todir="${basedir}/target/plugin/webapps/josso/WEB-INF">
<fileset dir="${basedir}/src/main/config/WEB-INF"/>
</copy>
-
- <!-- prepare the plugin jar -->
+
<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 thirdparty dependency -->
+
<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"/>
@@ -105,13 +103,13 @@
<tasks>
<echo message="Starting JOSSO 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.josso.location}" overwrite="true"/>
- <!-- cleanup -->
+
<delete dir="${tomcat60.josso.location}/META-INF"/>
</tasks>
</configuration>
@@ -124,6 +122,7 @@
</plugins>
</build>
</profile>
- </profiles>
+ </profiles>
+ -->
</project>
Property changes on: jbossexo/modules/sso/trunk/packaging/cas
___________________________________________________________________
Name: svn:ignore
+ target
14 years, 5 months
JBoss Portal SVN: r13840 - in jbossexo/modules/sso/trunk: agent and 19 other directories.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2009-11-17 13:37:47 -0500 (Tue, 17 Nov 2009)
New Revision: 13840
Added:
jbossexo/modules/sso/trunk/packaging/
jbossexo/modules/sso/trunk/packaging/cas/
jbossexo/modules/sso/trunk/packaging/cas/pom.xml
jbossexo/modules/sso/trunk/packaging/cas/src/
jbossexo/modules/sso/trunk/packaging/cas/src/main/
jbossexo/modules/sso/trunk/packaging/cas/src/main/config/
jbossexo/modules/sso/trunk/packaging/cas/src/main/config/gatein/
jbossexo/modules/sso/trunk/packaging/cas/src/main/config/gatein/jboss/
jbossexo/modules/sso/trunk/packaging/cas/src/main/config/gatein/jboss/server/
jbossexo/modules/sso/trunk/packaging/cas/src/main/config/gatein/jboss/server/default/
jbossexo/modules/sso/trunk/packaging/cas/src/main/config/gatein/jboss/server/default/conf/
jbossexo/modules/sso/trunk/packaging/cas/src/main/config/gatein/jboss/server/default/conf/login-config.xml
jbossexo/modules/sso/trunk/packaging/cas/src/main/config/gatein/portal.war/
jbossexo/modules/sso/trunk/packaging/cas/src/main/config/gatein/portal.war/WEB-INF/
jbossexo/modules/sso/trunk/packaging/cas/src/main/config/gatein/portal.war/WEB-INF/web.xml
jbossexo/modules/sso/trunk/packaging/cas/src/main/config/gatein/portal.war/groovy/
jbossexo/modules/sso/trunk/packaging/cas/src/main/config/gatein/portal.war/groovy/portal/
jbossexo/modules/sso/trunk/packaging/cas/src/main/config/gatein/portal.war/groovy/portal/webui/
jbossexo/modules/sso/trunk/packaging/cas/src/main/config/gatein/portal.war/groovy/portal/webui/UILoginForm.gtmpl
jbossexo/modules/sso/trunk/packaging/cas/src/main/config/gatein/portal.war/login/
jbossexo/modules/sso/trunk/packaging/cas/src/main/config/gatein/portal.war/login/jsp/
jbossexo/modules/sso/trunk/packaging/cas/src/main/config/gatein/portal.war/login/jsp/login.jsp
jbossexo/modules/sso/trunk/packaging/cas/src/main/config/plugin/
jbossexo/modules/sso/trunk/packaging/cas/src/main/config/plugin/WEB-INF/
jbossexo/modules/sso/trunk/packaging/cas/src/main/config/plugin/WEB-INF/deployerConfigContext.xml
jbossexo/modules/sso/trunk/packaging/josso/
jbossexo/modules/sso/trunk/packaging/opensso/
jbossexo/modules/sso/trunk/packaging/pom.xml
jbossexo/modules/sso/trunk/packaging/profiles.xml
Modified:
jbossexo/modules/sso/trunk/agent/pom.xml
jbossexo/modules/sso/trunk/pom.xml
Log:
CAS packaging
Modified: jbossexo/modules/sso/trunk/agent/pom.xml
===================================================================
--- jbossexo/modules/sso/trunk/agent/pom.xml 2009-11-17 17:33:20 UTC (rev 13839)
+++ jbossexo/modules/sso/trunk/agent/pom.xml 2009-11-17 18:37:47 UTC (rev 13840)
@@ -76,96 +76,22 @@
<!-- 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>
- <profile>
- <id>cas-agent</id>
- <build>
- <plugins>
- <plugin>
- <groupId>org.jvnet.maven-antrun-extended-plugin</groupId>
- <artifactId>maven-antrun-extended-plugin</artifactId>
- <executions>
- <execution>
- <id>cas-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/cas"/>
- <mkdir dir="${basedir}/target/cas"/>
-
- <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/cas/portal.war" overwrite="true"/>
-
- <!-- override the core artifacts -->
- <copy todir="${basedir}/target/cas/portal.war" overwrite="true">
- <fileset dir="${basedir}/src/main/config/cas/portal.war"/>
- </copy>
-
- <!-- jar it back up -->
- <jar destfile="${basedir}/target/cas/02portal.war" basedir="${basedir}/target/cas/portal.war"/>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cas-agent-install</id>
- <phase>install</phase>
- <configuration>
- <tasks>
- <echo message="Deploying the CAS Agent for GateIn"/>
-
- <copy file="${basedir}/target/cas/02portal.war"
- todir="${gatein.location}/deploy/gatein.ear"
- overwrite="true"/>
-
- <copy file="${basedir}/src/main/config/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>
+ <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>
+ </profile>
+
<profile>
<id>josso-agent</id>
<build>
Added: jbossexo/modules/sso/trunk/packaging/cas/pom.xml
===================================================================
--- jbossexo/modules/sso/trunk/packaging/cas/pom.xml (rev 0)
+++ jbossexo/modules/sso/trunk/packaging/cas/pom.xml 2009-11-17 18:37:47 UTC (rev 13840)
@@ -0,0 +1,161 @@
+<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>
+
+ <profiles>
+ <!-- Install the CAS Agent into the Gatein Server -->
+ <profile>
+ <id>gatein-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="${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/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-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.cas.location}" overwrite="true"/>
+
+ <!-- cleanup -->
+ <delete dir="${tomcat60.cas.location}/META-INF"/>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+</project>
+
Added: jbossexo/modules/sso/trunk/packaging/cas/src/main/config/gatein/jboss/server/default/conf/login-config.xml
===================================================================
--- jbossexo/modules/sso/trunk/packaging/cas/src/main/config/gatein/jboss/server/default/conf/login-config.xml (rev 0)
+++ jbossexo/modules/sso/trunk/packaging/cas/src/main/config/gatein/jboss/server/default/conf/login-config.xml 2009-11-17 18:37:47 UTC (rev 13840)
@@ -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: jbossexo/modules/sso/trunk/packaging/cas/src/main/config/gatein/portal.war/WEB-INF/web.xml
===================================================================
--- jbossexo/modules/sso/trunk/packaging/cas/src/main/config/gatein/portal.war/WEB-INF/web.xml (rev 0)
+++ jbossexo/modules/sso/trunk/packaging/cas/src/main/config/gatein/portal.war/WEB-INF/web.xml 2009-11-17 18:37:47 UTC (rev 13840)
@@ -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: jbossexo/modules/sso/trunk/packaging/cas/src/main/config/gatein/portal.war/groovy/portal/webui/UILoginForm.gtmpl
===================================================================
--- jbossexo/modules/sso/trunk/packaging/cas/src/main/config/gatein/portal.war/groovy/portal/webui/UILoginForm.gtmpl (rev 0)
+++ jbossexo/modules/sso/trunk/packaging/cas/src/main/config/gatein/portal.war/groovy/portal/webui/UILoginForm.gtmpl 2009-11-17 18:37:47 UTC (rev 13840)
@@ -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: jbossexo/modules/sso/trunk/packaging/cas/src/main/config/gatein/portal.war/login/jsp/login.jsp
===================================================================
--- jbossexo/modules/sso/trunk/packaging/cas/src/main/config/gatein/portal.war/login/jsp/login.jsp (rev 0)
+++ jbossexo/modules/sso/trunk/packaging/cas/src/main/config/gatein/portal.war/login/jsp/login.jsp 2009-11-17 18:37:47 UTC (rev 13840)
@@ -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: jbossexo/modules/sso/trunk/packaging/cas/src/main/config/plugin/WEB-INF/deployerConfigContext.xml
===================================================================
--- jbossexo/modules/sso/trunk/packaging/cas/src/main/config/plugin/WEB-INF/deployerConfigContext.xml (rev 0)
+++ jbossexo/modules/sso/trunk/packaging/cas/src/main/config/plugin/WEB-INF/deployerConfigContext.xml 2009-11-17 18:37:47 UTC (rev 13840)
@@ -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: jbossexo/modules/sso/trunk/packaging/pom.xml
===================================================================
--- jbossexo/modules/sso/trunk/packaging/pom.xml (rev 0)
+++ jbossexo/modules/sso/trunk/packaging/pom.xml 2009-11-17 18:37:47 UTC (rev 13840)
@@ -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: jbossexo/modules/sso/trunk/packaging/profiles.xml
===================================================================
--- jbossexo/modules/sso/trunk/packaging/profiles.xml (rev 0)
+++ jbossexo/modules/sso/trunk/packaging/profiles.xml 2009-11-17 18:37:47 UTC (rev 13840)
@@ -0,0 +1,50 @@
+<!--
+
+ 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-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-install</id>
+ <properties>
+ <!-- ChangeMe to your specific local environment -->
+ <tomcat60.cas.location>/home/soshah/projects/gatein/runtime/tomcat-cas-3.3.4</tomcat60.cas.location>
+
+ <!-- ChangeMe to your specific local environment -->
+ <tomcat60.josso.location>/home/soshah/projects/gatein/runtime/tomcat-josso-1.8.1</tomcat60.josso.location>
+
+ <!-- ChangeMe to your specific local environment -->
+ <tomcat60.opensso.location>/home/soshah/projects/gatein/runtime/tomcat-opensso-8.0</tomcat60.opensso.location>
+ </properties>
+ </profile>
+ </profiles>
+
+ <activeProfiles>
+ <activeProfile>gatein-install</activeProfile>
+ <activeProfile>plugin-install</activeProfile>
+ </activeProfiles>
+</profilesXml>
Modified: jbossexo/modules/sso/trunk/pom.xml
===================================================================
--- jbossexo/modules/sso/trunk/pom.xml 2009-11-17 17:33:20 UTC (rev 13839)
+++ jbossexo/modules/sso/trunk/pom.xml 2009-11-17 18:37:47 UTC (rev 13840)
@@ -26,6 +26,7 @@
<module>gatein-cas-plugin</module>
<module>gatein-josso-plugin</module>
<module>gatein-opensso-plugin</module>
+ <module>packaging</module>
</modules>
<properties>
14 years, 5 months
JBoss Portal SVN: r13839 - in jbossexo/modules/sso/trunk: agent and 3 other directories.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2009-11-17 12:33:20 -0500 (Tue, 17 Nov 2009)
New Revision: 13839
Modified:
jbossexo/modules/sso/trunk/agent/pom.xml
jbossexo/modules/sso/trunk/gatein-cas-plugin/pom.xml
jbossexo/modules/sso/trunk/gatein-josso-plugin/pom.xml
jbossexo/modules/sso/trunk/gatein-opensso-plugin/pom.xml
jbossexo/modules/sso/trunk/pom.xml
Log:
maven2 hacking...fun fun ;)
Modified: jbossexo/modules/sso/trunk/agent/pom.xml
===================================================================
--- jbossexo/modules/sso/trunk/agent/pom.xml 2009-11-17 16:48:48 UTC (rev 13838)
+++ jbossexo/modules/sso/trunk/agent/pom.xml 2009-11-17 17:33:20 UTC (rev 13839)
@@ -60,22 +60,37 @@
</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>
+ <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>
<profile>
<id>cas-agent</id>
<build>
Modified: jbossexo/modules/sso/trunk/gatein-cas-plugin/pom.xml
===================================================================
--- jbossexo/modules/sso/trunk/gatein-cas-plugin/pom.xml 2009-11-17 16:48:48 UTC (rev 13838)
+++ jbossexo/modules/sso/trunk/gatein-cas-plugin/pom.xml 2009-11-17 17:33:20 UTC (rev 13839)
@@ -26,22 +26,37 @@
</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>
+ <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>
+ <profile>
<id>plugin-tomcat-deploy</id>
<properties>
<!-- ChangeMe to your specific local environment -->
Modified: jbossexo/modules/sso/trunk/gatein-josso-plugin/pom.xml
===================================================================
--- jbossexo/modules/sso/trunk/gatein-josso-plugin/pom.xml 2009-11-17 16:48:48 UTC (rev 13838)
+++ jbossexo/modules/sso/trunk/gatein-josso-plugin/pom.xml 2009-11-17 17:33:20 UTC (rev 13839)
@@ -27,15 +27,7 @@
</dependencies>
<build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.3.1</version>
- <configuration>
- <skip>false</skip>
- </configuration>
- </plugin>
+ <plugins>
<plugin>
<groupId>org.apache.xbean</groupId>
<artifactId>maven-xbean-plugin</artifactId>
Modified: jbossexo/modules/sso/trunk/gatein-opensso-plugin/pom.xml
===================================================================
--- jbossexo/modules/sso/trunk/gatein-opensso-plugin/pom.xml 2009-11-17 16:48:48 UTC (rev 13838)
+++ jbossexo/modules/sso/trunk/gatein-opensso-plugin/pom.xml 2009-11-17 17:33:20 UTC (rev 13839)
@@ -26,17 +26,7 @@
</dependency>
</dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.3.1</version>
- <configuration>
- <skip>false</skip>
- </configuration>
- </plugin>
- </plugins>
+ <build>
</build>
</project>
Modified: jbossexo/modules/sso/trunk/pom.xml
===================================================================
--- jbossexo/modules/sso/trunk/pom.xml 2009-11-17 16:48:48 UTC (rev 13838)
+++ jbossexo/modules/sso/trunk/pom.xml 2009-11-17 17:33:20 UTC (rev 13839)
@@ -265,15 +265,7 @@
<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>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
14 years, 5 months
JBoss Portal SVN: r13838 - in jbossexo/modules/sso/trunk/agent/src/main: config/cas/portal.war/login/jsp and 3 other directories.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2009-11-17 11:48:48 -0500 (Tue, 17 Nov 2009)
New Revision: 13838
Modified:
jbossexo/modules/sso/trunk/agent/src/main/config/cas/portal.war/groovy/portal/webui/UILoginForm.gtmpl
jbossexo/modules/sso/trunk/agent/src/main/config/cas/portal.war/login/jsp/login.jsp
jbossexo/modules/sso/trunk/agent/src/main/config/josso/portal.war/groovy/portal/webui/UILoginForm.gtmpl
jbossexo/modules/sso/trunk/agent/src/main/config/josso/portal.war/login/jsp/login.jsp
jbossexo/modules/sso/trunk/agent/src/main/java/org/gatein/sso/agent/cas/CASAgent.java
Log:
CAS end-to-end stabilized
Modified: jbossexo/modules/sso/trunk/agent/src/main/config/cas/portal.war/groovy/portal/webui/UILoginForm.gtmpl
===================================================================
--- jbossexo/modules/sso/trunk/agent/src/main/config/cas/portal.war/groovy/portal/webui/UILoginForm.gtmpl 2009-11-17 16:25:18 UTC (rev 13837)
+++ jbossexo/modules/sso/trunk/agent/src/main/config/cas/portal.war/groovy/portal/webui/UILoginForm.gtmpl 2009-11-17 16:48:48 UTC (rev 13838)
@@ -83,5 +83,5 @@
</div>
<script>
<%=uicomponent.event("Close");%>
- window.location = 'http://localhost:8888/cas/login?service=http://localhost:8080/portal/private';
+ window.location = 'http://localhost:8888/cas/login?service=http://localhost:8080/portal/priv...';
</script>
Modified: jbossexo/modules/sso/trunk/agent/src/main/config/cas/portal.war/login/jsp/login.jsp
===================================================================
--- jbossexo/modules/sso/trunk/agent/src/main/config/cas/portal.war/login/jsp/login.jsp 2009-11-17 16:25:18 UTC (rev 13837)
+++ jbossexo/modules/sso/trunk/agent/src/main/config/cas/portal.war/login/jsp/login.jsp 2009-11-17 16:48:48 UTC (rev 13838)
@@ -31,7 +31,7 @@
<html>
<head>
<script type="text/javascript">
- window.location = 'http://localhost:8888/cas/login?service=http://localhost:8080/portal/private';
+ window.location = 'http://localhost:8888/cas/login?service=http://localhost:8080/portal/priv...';
</script>
</head>
<body>
Modified: jbossexo/modules/sso/trunk/agent/src/main/config/josso/portal.war/groovy/portal/webui/UILoginForm.gtmpl
===================================================================
--- jbossexo/modules/sso/trunk/agent/src/main/config/josso/portal.war/groovy/portal/webui/UILoginForm.gtmpl 2009-11-17 16:25:18 UTC (rev 13837)
+++ jbossexo/modules/sso/trunk/agent/src/main/config/josso/portal.war/groovy/portal/webui/UILoginForm.gtmpl 2009-11-17 16:48:48 UTC (rev 13838)
@@ -83,5 +83,5 @@
</div>
<script>
<%=uicomponent.event("Close");%>
- window.location = 'http://localhost:8888/josso/signon/login.do?josso_back_to=http://localhos...';
+ window.location = 'http://localhost:8888/josso/signon/login.do?josso_back_to=http://localhos...';
</script>
Modified: jbossexo/modules/sso/trunk/agent/src/main/config/josso/portal.war/login/jsp/login.jsp
===================================================================
--- jbossexo/modules/sso/trunk/agent/src/main/config/josso/portal.war/login/jsp/login.jsp 2009-11-17 16:25:18 UTC (rev 13837)
+++ jbossexo/modules/sso/trunk/agent/src/main/config/josso/portal.war/login/jsp/login.jsp 2009-11-17 16:48:48 UTC (rev 13838)
@@ -31,7 +31,7 @@
<html>
<head>
<script type="text/javascript">
- window.location = 'http://localhost:8888/josso/signon/login.do?josso_back_to=http://localhos...';
+ window.location = 'http://localhost:8888/josso/signon/login.do?josso_back_to=http://localhos...';
</script>
</head>
<body>
Modified: jbossexo/modules/sso/trunk/agent/src/main/java/org/gatein/sso/agent/cas/CASAgent.java
===================================================================
--- jbossexo/modules/sso/trunk/agent/src/main/java/org/gatein/sso/agent/cas/CASAgent.java 2009-11-17 16:25:18 UTC (rev 13837)
+++ jbossexo/modules/sso/trunk/agent/src/main/java/org/gatein/sso/agent/cas/CASAgent.java 2009-11-17 16:48:48 UTC (rev 13838)
@@ -67,7 +67,8 @@
Cas20ProxyTicketValidator ticketValidator = new Cas20ProxyTicketValidator(casServerUrl);
ticketValidator.setRenew(true);
- String serviceUrl = "http://"+ httpRequest.getServerName() +":" + httpRequest.getServerPort() + httpRequest.getContextPath() +"/private";
+ String serviceUrl = "http://"+ httpRequest.getServerName() +":" + httpRequest.getServerPort() +
+ httpRequest.getContextPath() +"/private/classic";
Assertion assertion = ticketValidator.validate(ticket, serviceUrl);
log.debug("------------------------------------------------------------------------------------");
14 years, 5 months
JBoss Portal SVN: r13837 - in jbossexo/modules/sso/trunk: agent/src/main/config/cas/portal.war/groovy/portal/webui and 11 other directories.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2009-11-17 11:25:18 -0500 (Tue, 17 Nov 2009)
New Revision: 13837
Modified:
jbossexo/modules/sso/trunk/agent/src/main/config/cas/portal.war/WEB-INF/web.xml
jbossexo/modules/sso/trunk/agent/src/main/config/cas/portal.war/groovy/portal/webui/UILoginForm.gtmpl
jbossexo/modules/sso/trunk/agent/src/main/config/cas/portal.war/login/jsp/login.jsp
jbossexo/modules/sso/trunk/agent/src/main/config/jboss/server/default/conf/login-config.xml
jbossexo/modules/sso/trunk/agent/src/main/config/josso/portal.war/WEB-INF/web.xml
jbossexo/modules/sso/trunk/agent/src/main/config/josso/portal.war/groovy/portal/webui/UILoginForm.gtmpl
jbossexo/modules/sso/trunk/agent/src/main/config/josso/portal.war/login/jsp/login.jsp
jbossexo/modules/sso/trunk/agent/src/main/java/org/gatein/sso/agent/GenericSSOAgent.java
jbossexo/modules/sso/trunk/agent/src/main/java/org/gatein/sso/agent/cas/CASAgent.java
jbossexo/modules/sso/trunk/agent/src/main/java/org/gatein/sso/agent/josso/JOSSOAgent.java
jbossexo/modules/sso/trunk/agent/src/main/java/org/gatein/sso/agent/login/SSOLoginModule.java
jbossexo/modules/sso/trunk/auth-callback/src/main/java/org/gatein/sso/authentication/callback/AuthenticationHandler.java
jbossexo/modules/sso/trunk/gatein-cas-plugin/src/main/java/org/gatein/sso/cas/plugin/AuthenticationPlugin.java
Log:
CAS end-to-end
Modified: jbossexo/modules/sso/trunk/agent/src/main/config/cas/portal.war/WEB-INF/web.xml
===================================================================
--- jbossexo/modules/sso/trunk/agent/src/main/config/cas/portal.war/WEB-INF/web.xml 2009-11-17 14:32:16 UTC (rev 13836)
+++ jbossexo/modules/sso/trunk/agent/src/main/config/cas/portal.war/WEB-INF/web.xml 2009-11-17 16:25:18 UTC (rev 13837)
@@ -181,6 +181,10 @@
<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>
Modified: jbossexo/modules/sso/trunk/agent/src/main/config/cas/portal.war/groovy/portal/webui/UILoginForm.gtmpl
===================================================================
--- jbossexo/modules/sso/trunk/agent/src/main/config/cas/portal.war/groovy/portal/webui/UILoginForm.gtmpl 2009-11-17 14:32:16 UTC (rev 13836)
+++ jbossexo/modules/sso/trunk/agent/src/main/config/cas/portal.war/groovy/portal/webui/UILoginForm.gtmpl 2009-11-17 16:25:18 UTC (rev 13837)
@@ -83,5 +83,5 @@
</div>
<script>
<%=uicomponent.event("Close");%>
- window.location = 'http://localhost:8888/cas/login?service=http://localhost:8080/portal/priv...';
+ window.location = 'http://localhost:8888/cas/login?service=http://localhost:8080/portal/private';
</script>
Modified: jbossexo/modules/sso/trunk/agent/src/main/config/cas/portal.war/login/jsp/login.jsp
===================================================================
--- jbossexo/modules/sso/trunk/agent/src/main/config/cas/portal.war/login/jsp/login.jsp 2009-11-17 14:32:16 UTC (rev 13836)
+++ jbossexo/modules/sso/trunk/agent/src/main/config/cas/portal.war/login/jsp/login.jsp 2009-11-17 16:25:18 UTC (rev 13837)
@@ -31,7 +31,7 @@
<html>
<head>
<script type="text/javascript">
- window.location = 'http://localhost:8888/cas/login?service=http://localhost:8080/portal/priv...';
+ window.location = 'http://localhost:8888/cas/login?service=http://localhost:8080/portal/private';
</script>
</head>
<body>
Modified: jbossexo/modules/sso/trunk/agent/src/main/config/jboss/server/default/conf/login-config.xml
===================================================================
--- jbossexo/modules/sso/trunk/agent/src/main/config/jboss/server/default/conf/login-config.xml 2009-11-17 14:32:16 UTC (rev 13836)
+++ jbossexo/modules/sso/trunk/agent/src/main/config/jboss/server/default/conf/login-config.xml 2009-11-17 16:25:18 UTC (rev 13837)
@@ -176,6 +176,7 @@
</authentication>
</application-policy>
+ <!-- SSO Integration -->
<application-policy name="exo-domain">
<authentication>
<login-module code="org.gatein.sso.agent.login.SSOLoginModule" flag="required"></login-module>
@@ -196,5 +197,31 @@
</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>
Modified: jbossexo/modules/sso/trunk/agent/src/main/config/josso/portal.war/WEB-INF/web.xml
===================================================================
--- jbossexo/modules/sso/trunk/agent/src/main/config/josso/portal.war/WEB-INF/web.xml 2009-11-17 14:32:16 UTC (rev 13836)
+++ jbossexo/modules/sso/trunk/agent/src/main/config/josso/portal.war/WEB-INF/web.xml 2009-11-17 16:25:18 UTC (rev 13837)
@@ -181,6 +181,10 @@
<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>
Modified: jbossexo/modules/sso/trunk/agent/src/main/config/josso/portal.war/groovy/portal/webui/UILoginForm.gtmpl
===================================================================
--- jbossexo/modules/sso/trunk/agent/src/main/config/josso/portal.war/groovy/portal/webui/UILoginForm.gtmpl 2009-11-17 14:32:16 UTC (rev 13836)
+++ jbossexo/modules/sso/trunk/agent/src/main/config/josso/portal.war/groovy/portal/webui/UILoginForm.gtmpl 2009-11-17 16:25:18 UTC (rev 13837)
@@ -83,5 +83,5 @@
</div>
<script>
<%=uicomponent.event("Close");%>
- window.location = 'http://localhost:8888/josso/signon/login.do?josso_back_to=http://localhos...';
+ window.location = 'http://localhost:8888/josso/signon/login.do?josso_back_to=http://localhos...';
</script>
Modified: jbossexo/modules/sso/trunk/agent/src/main/config/josso/portal.war/login/jsp/login.jsp
===================================================================
--- jbossexo/modules/sso/trunk/agent/src/main/config/josso/portal.war/login/jsp/login.jsp 2009-11-17 14:32:16 UTC (rev 13836)
+++ jbossexo/modules/sso/trunk/agent/src/main/config/josso/portal.war/login/jsp/login.jsp 2009-11-17 16:25:18 UTC (rev 13837)
@@ -31,7 +31,7 @@
<html>
<head>
<script type="text/javascript">
- window.location = 'http://localhost:8888/josso/signon/login.do?josso_back_to=http://localhos...';
+ window.location = 'http://localhost:8888/josso/signon/login.do?josso_back_to=http://localhos...';
</script>
</head>
<body>
Modified: jbossexo/modules/sso/trunk/agent/src/main/java/org/gatein/sso/agent/GenericSSOAgent.java
===================================================================
--- jbossexo/modules/sso/trunk/agent/src/main/java/org/gatein/sso/agent/GenericSSOAgent.java 2009-11-17 14:32:16 UTC (rev 13836)
+++ jbossexo/modules/sso/trunk/agent/src/main/java/org/gatein/sso/agent/GenericSSOAgent.java 2009-11-17 16:25:18 UTC (rev 13837)
@@ -39,18 +39,25 @@
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");
+ }
- public static final String COOKIE_NAME = "rememberme";
- public static final String CREDENTIALS = "credentials";
-
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException
{
try
{
- this.processSSOToken(req);
-
+ this.processSSOToken(req);
super.doGet(req, resp);
}
catch(Exception e)
@@ -74,7 +81,7 @@
if (ticket != null && ticket.trim().length() > 0)
{
- CASAgent.validateTicket(httpRequest, ticket);
+ CASAgent.getInstance(this.casServerUrl).validateTicket(httpRequest, ticket);
}
else if (jossoAssertion != null && jossoAssertion.trim().length() > 0)
{
Modified: jbossexo/modules/sso/trunk/agent/src/main/java/org/gatein/sso/agent/cas/CASAgent.java
===================================================================
--- jbossexo/modules/sso/trunk/agent/src/main/java/org/gatein/sso/agent/cas/CASAgent.java 2009-11-17 14:32:16 UTC (rev 13836)
+++ jbossexo/modules/sso/trunk/agent/src/main/java/org/gatein/sso/agent/cas/CASAgent.java 2009-11-17 16:25:18 UTC (rev 13837)
@@ -38,17 +38,43 @@
public class CASAgent
{
private static Logger log = Logger.getLogger(CASAgent.class);
+ private static CASAgent singleton;
- public static void validateTicket(HttpServletRequest httpRequest, String ticket) throws Exception
+ 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("http://localhost:8888/cas");
+ Cas20ProxyTicketValidator ticketValidator = new Cas20ProxyTicketValidator(casServerUrl);
ticketValidator.setRenew(true);
- Assertion assertion = ticketValidator.validate(ticket, "http://localhost:8080/portal/private/classic");
- log.info("------------------------------------------------------------------------------------");
- log.info("Principal: "+assertion.getPrincipal().getName());
- log.info("------------------------------------------------------------------------------------");
+ String serviceUrl = "http://"+ httpRequest.getServerName() +":" + httpRequest.getServerPort() + httpRequest.getContextPath() +"/private";
+ 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
Modified: jbossexo/modules/sso/trunk/agent/src/main/java/org/gatein/sso/agent/josso/JOSSOAgent.java
===================================================================
--- jbossexo/modules/sso/trunk/agent/src/main/java/org/gatein/sso/agent/josso/JOSSOAgent.java 2009-11-17 14:32:16 UTC (rev 13836)
+++ jbossexo/modules/sso/trunk/agent/src/main/java/org/gatein/sso/agent/josso/JOSSOAgent.java 2009-11-17 16:25:18 UTC (rev 13837)
@@ -32,11 +32,13 @@
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
+ /*public static void test(HttpServletRequest httpRequest, String assertionId) throws Exception
{
System.out.println("Starting simple josso assertion test case..........................");
@@ -55,5 +57,5 @@
SingleSignOnEntry result = agent.processRequest(request);
System.out.println("SSOEntry: "+result);
- }
+ }*/
}
Modified: jbossexo/modules/sso/trunk/agent/src/main/java/org/gatein/sso/agent/login/SSOLoginModule.java
===================================================================
--- jbossexo/modules/sso/trunk/agent/src/main/java/org/gatein/sso/agent/login/SSOLoginModule.java 2009-11-17 14:32:16 UTC (rev 13836)
+++ jbossexo/modules/sso/trunk/agent/src/main/java/org/gatein/sso/agent/login/SSOLoginModule.java 2009-11-17 16:25:18 UTC (rev 13837)
@@ -81,6 +81,9 @@
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;
}
@@ -89,14 +92,15 @@
.getComponentInstanceOfType(Authenticator.class);
if (authenticator == null)
- throw new LoginException(
+ {
+ 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;
Modified: jbossexo/modules/sso/trunk/auth-callback/src/main/java/org/gatein/sso/authentication/callback/AuthenticationHandler.java
===================================================================
--- jbossexo/modules/sso/trunk/auth-callback/src/main/java/org/gatein/sso/authentication/callback/AuthenticationHandler.java 2009-11-17 14:32:16 UTC (rev 13836)
+++ jbossexo/modules/sso/trunk/auth-callback/src/main/java/org/gatein/sso/authentication/callback/AuthenticationHandler.java 2009-11-17 16:25:18 UTC (rev 13837)
@@ -37,7 +37,6 @@
import org.exoplatform.services.security.Authenticator;
import org.exoplatform.services.security.Credential;
-import org.exoplatform.services.security.Identity;
import org.exoplatform.services.security.PasswordCredential;
import org.exoplatform.services.security.UsernameCredential;
@@ -71,9 +70,7 @@
Authenticator authenticator = (Authenticator) getContainer().getComponentInstanceOfType(Authenticator.class);
Credential[] credentials = new Credential[] { new UsernameCredential(username),
- new PasswordCredential(password) };
-
- log.info("Authenticator Class-----------"+authenticator);
+ new PasswordCredential(password) };
try
{
Modified: jbossexo/modules/sso/trunk/gatein-cas-plugin/src/main/java/org/gatein/sso/cas/plugin/AuthenticationPlugin.java
===================================================================
--- jbossexo/modules/sso/trunk/gatein-cas-plugin/src/main/java/org/gatein/sso/cas/plugin/AuthenticationPlugin.java 2009-11-17 14:32:16 UTC (rev 13836)
+++ jbossexo/modules/sso/trunk/gatein-cas-plugin/src/main/java/org/gatein/sso/cas/plugin/AuthenticationPlugin.java 2009-11-17 16:25:18 UTC (rev 13837)
@@ -101,8 +101,9 @@
}
catch(Exception e)
{
+ log.error("Remote Authentication Failed--------------------------");
log.error(this, e);
- throw new RuntimeException(e);
+ return false;
}
}
14 years, 5 months
JBoss Portal SVN: r13836 - in jbossexo/modules/sso/trunk: agent and 9 other directories.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2009-11-17 09:32:16 -0500 (Tue, 17 Nov 2009)
New Revision: 13836
Added:
jbossexo/modules/sso/trunk/agent/src/main/config/jboss/
jbossexo/modules/sso/trunk/agent/src/main/config/jboss/server/
jbossexo/modules/sso/trunk/agent/src/main/config/jboss/server/default/
jbossexo/modules/sso/trunk/agent/src/main/config/jboss/server/default/conf/
jbossexo/modules/sso/trunk/agent/src/main/config/jboss/server/default/conf/login-config.xml
jbossexo/modules/sso/trunk/agent/src/main/java/org/gatein/sso/agent/cas/
jbossexo/modules/sso/trunk/agent/src/main/java/org/gatein/sso/agent/cas/CASAgent.java
jbossexo/modules/sso/trunk/agent/src/main/java/org/gatein/sso/agent/login/
jbossexo/modules/sso/trunk/agent/src/main/java/org/gatein/sso/agent/login/SSOLoginModule.java
Modified:
jbossexo/modules/sso/trunk/.classpath
jbossexo/modules/sso/trunk/agent/pom.xml
jbossexo/modules/sso/trunk/agent/src/main/java/org/gatein/sso/agent/GenericSSOAgent.java
jbossexo/modules/sso/trunk/auth-callback/src/main/java/org/gatein/sso/authentication/callback/AuthenticationHandler.java
jbossexo/modules/sso/trunk/pom.xml
Log:
CAS end-to-end
Modified: jbossexo/modules/sso/trunk/.classpath
===================================================================
--- jbossexo/modules/sso/trunk/.classpath 2009-11-17 09:09:00 UTC (rev 13835)
+++ jbossexo/modules/sso/trunk/.classpath 2009-11-17 14:32:16 UTC (rev 13836)
@@ -11,10 +11,7 @@
<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/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="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/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.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/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"/>
@@ -24,12 +21,36 @@
<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/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>
Modified: jbossexo/modules/sso/trunk/agent/pom.xml
===================================================================
--- jbossexo/modules/sso/trunk/agent/pom.xml 2009-11-17 09:09:00 UTC (rev 13835)
+++ jbossexo/modules/sso/trunk/agent/pom.xml 2009-11-17 14:32:16 UTC (rev 13836)
@@ -26,11 +26,16 @@
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
- </dependency>
+ </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>
@@ -117,6 +122,10 @@
todir="${gatein.location}/deploy/gatein.ear"
overwrite="true"/>
+ <copy file="${basedir}/src/main/config/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"
@@ -125,7 +134,12 @@
<!-- 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"/>
+ 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>
Added: jbossexo/modules/sso/trunk/agent/src/main/config/jboss/server/default/conf/login-config.xml
===================================================================
--- jbossexo/modules/sso/trunk/agent/src/main/config/jboss/server/default/conf/login-config.xml (rev 0)
+++ jbossexo/modules/sso/trunk/agent/src/main/config/jboss/server/default/conf/login-config.xml 2009-11-17 14:32:16 UTC (rev 13836)
@@ -0,0 +1,200 @@
+<?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>
+
+ <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>
+
+</policy>
+
Modified: jbossexo/modules/sso/trunk/agent/src/main/java/org/gatein/sso/agent/GenericSSOAgent.java
===================================================================
--- jbossexo/modules/sso/trunk/agent/src/main/java/org/gatein/sso/agent/GenericSSOAgent.java 2009-11-17 09:09:00 UTC (rev 13835)
+++ jbossexo/modules/sso/trunk/agent/src/main/java/org/gatein/sso/agent/GenericSSOAgent.java 2009-11-17 14:32:16 UTC (rev 13836)
@@ -30,9 +30,8 @@
import javax.servlet.http.HttpServletResponse;
import org.exoplatform.web.login.InitiateLoginServlet;
-import org.exoplatform.web.security.Credentials;
-import org.gatein.sso.agent.josso.JOSSOAgent;
+import org.gatein.sso.agent.cas.CASAgent;
/**
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
@@ -75,17 +74,11 @@
if (ticket != null && ticket.trim().length() > 0)
{
- Credentials credentials = new Credentials("root", ticket);
- httpRequest.getSession().setAttribute(InitiateLoginServlet.CREDENTIALS,
- credentials);
+ CASAgent.validateTicket(httpRequest, ticket);
}
else if (jossoAssertion != null && jossoAssertion.trim().length() > 0)
{
- Credentials credentials = new Credentials("root", jossoAssertion);
- httpRequest.getSession().setAttribute(InitiateLoginServlet.CREDENTIALS,
- credentials);
-
- JOSSOAgent.test(httpRequest,jossoAssertion);
+ //TODO: fix the JOSSO Agent. This will need to the new client side JOSSO stack that can run on 5.1.0.GA
}
}
}
Added: jbossexo/modules/sso/trunk/agent/src/main/java/org/gatein/sso/agent/cas/CASAgent.java
===================================================================
--- jbossexo/modules/sso/trunk/agent/src/main/java/org/gatein/sso/agent/cas/CASAgent.java (rev 0)
+++ jbossexo/modules/sso/trunk/agent/src/main/java/org/gatein/sso/agent/cas/CASAgent.java 2009-11-17 14:32:16 UTC (rev 13836)
@@ -0,0 +1,59 @@
+/*
+* 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);
+
+ public static void validateTicket(HttpServletRequest httpRequest, String ticket) throws Exception
+ {
+ Cas20ProxyTicketValidator ticketValidator = new Cas20ProxyTicketValidator("http://localhost:8888/cas");
+ ticketValidator.setRenew(true);
+ Assertion assertion = ticketValidator.validate(ticket, "http://localhost:8080/portal/private/classic");
+
+ log.info("------------------------------------------------------------------------------------");
+ log.info("Principal: "+assertion.getPrincipal().getName());
+ log.info("------------------------------------------------------------------------------------");
+
+
+ //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: jbossexo/modules/sso/trunk/agent/src/main/java/org/gatein/sso/agent/login/SSOLoginModule.java
===================================================================
--- jbossexo/modules/sso/trunk/agent/src/main/java/org/gatein/sso/agent/login/SSOLoginModule.java (rev 0)
+++ jbossexo/modules/sso/trunk/agent/src/main/java/org/gatein/sso/agent/login/SSOLoginModule.java 2009-11-17 14:32:16 UTC (rev 13836)
@@ -0,0 +1,124 @@
+/*
+ * 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
+ 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;
+ }
+}
Modified: jbossexo/modules/sso/trunk/auth-callback/src/main/java/org/gatein/sso/authentication/callback/AuthenticationHandler.java
===================================================================
--- jbossexo/modules/sso/trunk/auth-callback/src/main/java/org/gatein/sso/authentication/callback/AuthenticationHandler.java 2009-11-17 09:09:00 UTC (rev 13835)
+++ jbossexo/modules/sso/trunk/auth-callback/src/main/java/org/gatein/sso/authentication/callback/AuthenticationHandler.java 2009-11-17 14:32:16 UTC (rev 13836)
@@ -72,6 +72,8 @@
Credential[] credentials = new Credential[] { new UsernameCredential(username),
new PasswordCredential(password) };
+
+ log.info("Authenticator Class-----------"+authenticator);
try
{
Modified: jbossexo/modules/sso/trunk/pom.xml
===================================================================
--- jbossexo/modules/sso/trunk/pom.xml 2009-11-17 09:09:00 UTC (rev 13835)
+++ jbossexo/modules/sso/trunk/pom.xml 2009-11-17 14:32:16 UTC (rev 13836)
@@ -179,10 +179,16 @@
<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>
+ </dependency>
+
<!-- servlet-api -->
<dependency>
14 years, 5 months