Professional Documents
Culture Documents
(Redirected from Full Integration - Liferay, Alfresco, SSO and LDAP) Tags: alfresco liferay portlet ldap sso integration Table of Contents [-]
y y y y y y
1 Integration of Alfresco (Web Client), SSO and LDAP 2 Integration of Alfresco (Share), SSO and LDAP 3 Integration of Liferay, SSO and LDAP 3.1 Remove CAS SSO settings in case 4 Integration of Liferay and Alfresco portlets 5 Integration of Liferay, Alfresco, SSO and LDAP
<param-value>http://docs.cignex.com/cas-web</param-value> </init-param> <init-param> <param-name>service_path</param-name> <param-value>/index.jsp</param-value> </init-param> <init-param> <param-name>application_type</param-name> <param-value>Alfresco</param-value> </init-param> </filter>
Note that the SSO CAS should be installed with ports 80 and 443. Add following lines after the last </filter> in $ALFRESCO_HOME/WEB-INF/web.xml
<filter-mapping> <filter-name>CAS Filter</filter-name> <url-pattern>/index.jsp</url-pattern> </filter-mapping> <filter-mapping> <filter-name>CAS Filter</filter-name> <url-pattern>/logout</url-pattern> </filter-mapping>
in $ALFRESCO_HOME/WEB-INF/web-application-context.xml. <import resource="classpath:sso-ldap-authentication-context.xml" /> 6) Add following lines after the first --%> in $ALFRESCO_HOME /jsp/parts/titlebar.jsp
<% String protocol = request.getProtocol(); protocol = protocol.substring( 0 , protocol.indexOf("/")).toLowerCase(); String address = request.getServerName(); String port = request.getServerPort() + ""; String path = request.getContextPath(); if(port.endsWith("443")) protocol += "s"; String currentURL = protocol + "://" + address + ":" + port + path + "/logout"; %>
rendered="#{!NavigationBean.isGuest}" action="#{LoginBean.logout}" showLink="false" target="_parent" href="<%= currentURL %>" immediate="true" /> <a href="<%= currentURL %>" target="_parent"><h:outputText value="#{msg.logout} (#{NavigationBean.currentUser.userName})" /></a>
9) Package all files as a WAR: alfresco.war; 10) Deploy it to $TOMCAT_DIR/webapps Or, you can use the result directly: download WAR from http://liferay.cignex.com/palm_tree/0387/sso/alfresco/alfresco.war and deploy it in $TOMCAT_DIR/webapps. Note that JAR is compliant with JDK 1.6 (1.6.0_14). This package has been tested in Tomcat (6.0.20) with following settings in setenv.bat (or setenv.sh). It is working fine!
JAVA_OPTS="$JAVA_OPTS -Xms512m -Xmx1024m -XX:MaxPermSize=256m Dfile.encoding=UTF8 -Duser.timezone=GMT Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false -Dcom.iplanet.am.cookie.c66Encode=true"
to:
<c:set var="query" value='<%=request.getQueryString() == null ? "" : request.getQueryString().replaceAll( "&locale=([A-Za-z][A-Za-z]_)?[A-Za-z][A-Za-z]|^locale=([A-Za-z][A-Za-z]_)?[AZa-z][A-Za-z]", "")%>' />
Prepare certificate in Tomcat Server Drop cas-web.war to $TOMCAT_HOME/webapps Update LDAP URL (CAS 3.3 or above) in $TOMCAT_HOME/webapps/cas-web/WEBINF/deployerConfigContext.xml
<bean id="contextSource" class="org.springframework.ldap.core.support.LdapContextSource"> <property name="pooled" value="true"/> <property name="urls"> <list> <value>ldap://docs.cignex.com:10389/</value> </list> </property> <property name="userDn" value="uid=admin,ou=system"/> <property name="password" value="yourpassword"/> <property name="baseEnvironmentProperties"> <map> <entry>
Note that you can update LDAP other than ldap:docs.cignex.com:10389. And more, the SSO CAS server should be installed with ports 80 and 443. 2) Get Liferay Tomcat bundle and Install Liferay, you will have folder $TOMCAT_AS_DIR 3) Copy casclient.jar to $TOMCAT_AS_DIR /webapps/ROOT/WEB-INF/lib (replace old version) 4) Set up LDAP in Liferay (for LDAP test only ) Authenticated by screen name Search filter: (cn=@screen_name@) For Apache Directory, you can do following. For Active Directory, refer to http://www.liferay.com/web/guest/community/wiki//wiki/Main/Integration+with+NTLM+plus+ADS
Note that you would get message like This Connection is Un-trusted. You have asked Firefox to connect securely to docs.cignex.com, but we can't confirm that your connection is secure. Normally, when you try to connect securely, sites will present trusted identification to prove that you are going to the right place. However, this site's identity can't be verified. You should get or install certificate. In case, you should install SSL certificate in your own CAS server.
In ten steps, you could be able to set alfresco web client as a set of portlets. It is simple for DoIt-Yourselfers. Download URL: http://liferay.cignex.com/palm_tree/0387/sso/liferay/alfresco-portlet (Liferay 5.2 or above, Alfresco 3.1 or above) Demo URL: http://liferay.cignex.com
1) Get Alfresco web client application: alfresco.war 2) Unzip it to $ALFRESCO_HOME (any folder in your local machine, e.g., new folder /Alfresco)
5) Remove the file $ALFRESCO_HOME/WEB-INF/lib/portlet-api-lib.jar 6) Add /WEB-INF/faces-config.xml to the faces config files list at $ALFRESCO_HOME/WEBINF/web.xml like:
<context-param> <param-name>javax.faces.CONFIG_FILES</param-name> <param-value>/WEB-INF/faces-config.xml,/WEB-INF/faces-configapp.xml,/WEB-INF/faces-config-beans.xml, /WEB-INF/faces-config-navigation.xml,/WEB-INF/faces-config-common.xml, /WEB-INF/faces-config-repo.xml,/WEB-INF/faces-config-wcm.xml,/WEB-INF/facesconfig-custom.xml</param-value> </context-param>
7) Add files: faces-config.xml, liferay-display.xml, liferay-portlet.xml, portlet.xml to $ALFRESCO_HOME/WEB-INF 8) Create a folder license under $ALFRESCO_HOME /WEB-INF/classes/alfresco/extension and add license file to $ALFRESCO_HOME /WEB-INF/classes/alfresco/extension/ license 9) Package all files as a WAR: alfresco.war; 10) Deploy it in $LIFERAY_HOME/deploy Or, you can use the result WAR directly: download WAR from http://liferay.cignex.com/palm_tree/0387/sso/liferay/alfresco-portlet/alfresco.war and deploy it to $LIFERAY_HOME/deploy. Thats it. Note that you may not be able to add alfresco portlets in liferay pages properly, since alfresco portlets requires to be signed in first. Simple Solution - you can create an account admin/admin (default account in alfresco) in liferay, and assign this account to role Administrator. Then login as admin/admin in liferay, and add alfresco portlets in liferay portal pages, again.
In ten steps, you could be able to integrate Liferay with Alfresco, SSO and LDAP. It is simple for Do-It-Yourselfers, too. Download URL: http://liferay.cignex.com/palm_tree/0387/sso/liferay Demo URL: http://liferay.cignex.com It is available in the book: Liferay Portal 6 Enterprise Intranets