integrating liferay

Upload: sugimania12

Post on 07-Apr-2018

232 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/6/2019 Integrating Liferay

    1/12

    Integrating Liferay, Alfresco, SSO and LDAP

    (Redirected from Full Integration - Liferay, Alfresco, SSO and LDAP)Tags: alfrescoliferayportletldapssointegration

    Table of Contents [-]

    y 1 Integration of Alfresco (Web Client), SSO and LDAPy 2 Integration of Alfresco (Share), SSO and LDAPy 3 Integration of Liferay, SSO and LDAPy 3.1 Remove CAS SSO settings in casey 4 Integration of Liferay and Alfresco portletsy 5 Integration of Liferay, Alfresco, SSO and LDAP

    Integration of Alfresco (Web Client), SSO and LDAP

    In ten steps, you could be able to integrate Alfresco with SSO and LDAP. It is simple for Do-It-Yourselfers.

    Download URL: http://liferay.cignex.com/palm_tree/0387/sso/alfresco (Alfresco 3.1 E or above,SSO CAS 3.3 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)

    3) Copy sso-ldap-authentication-context.xml to $ALFRESCO_HOME/WEB-INF/classes.

    And copy ldap-authentication.properties and ldap-authentication-context.xml to$ALFRESCO_HOME/WEB-INF/classes/alfresco/extension

    Note that you can configure LDAP other than ldap:docs.cignex.com:10389

    4) Copy bookpub-sso-ldap.jarto $ALFRESCO_HOME/WEB-INF/lib

    5) Add following lines before the first in $ALFRESCO_HOME/WEB-INF/web.xml

    CAS Filtercom.bookpub.portal.servlet.filters.sso.cas.CASFiltercas_server_url

  • 8/6/2019 Integrating Liferay

    2/12

    http://docs.cignex.com/cas-webservice_path/index.jspapplication_typeAlfresco

    Note that the SSO CAS should be installed with ports 80 and 443.

    Add following lines after the last in $ALFRESCO_HOME/WEB-INF/web.xml

    CAS Filter/index.jsp

    CAS Filter/logout

    And add following line after the line

    in $ALFRESCO_HOME/WEB-INF/web-application-context.xml.

    6) Add following lines after the first --%> in $ALFRESCO_HOME /jsp/parts/titlebar.jsp

    And replace the line

    With the line

  • 8/6/2019 Integrating Liferay

    3/12

    rendered="#{!NavigationBean.isGuest}" action="#{LoginBean.logout}"showLink="false" target="_parent" href="" immediate="true"/>

    7) Update dir.root in $ALFRESCO_HOME/ WEB-INF/classes/alfresco/repository.propertes.

    dir.root=../../alf_data

    8) Copy mysql.jar to $ALFRESCO_HOME/WEB-INF/lib and Create a database alfresco inMySQL

    drop database if exists alfresco;create database alfresco character set utf8;grant all on alfresco.* to 'alfresco'@'localhost' identified by 'alfresco'with grant option;grant all on alfresco.* to 'alfresco'@'localhost.localdomain' identified by'alfresco' with grant option;

    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 fromhttp://liferay.cignex.com/palm_tree/0387/sso/alfresco/alfresco.war and deploy it in$TOMCAT_DIR/webapps.

    Note that JAR is compliant with JDK1.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"

    Integration of Alfresco (Share), SSO and LDAP

    In five steps, you could be able to integrate Alfresco Share with SSO and LDAP. It is simple forDo-It-Yourselfers.

    Download URL: http://liferay.cignex.com/palm_tree/0387/sso/alfresco (Alfresco 3.1 E or above,SSO CAS 3.3 or above)

    Demo URL: http://liferay.cignex.com

    (Would be ready shortly ...)

  • 8/6/2019 Integrating Liferay

    4/12

    Integration of Liferay, SSO and LDAP

    In five steps, you could integrate Liferay with SSO and LDAP. It is simple for Do-It-Yourselfers.

    Download URL: http://liferay.cignex.com/palm_tree/0387/sso/liferay (Liferay 5.2 or above, SSOCAS 3.3 or above)

    Demo URL: http://liferay.cignex.com

    1) Download and Install cas-web.war

    Prepare Tomcat server $TOMCAT_HOME, and open port 8443 (for8080; 443 for80).

    in case (tomcat 6.0.18 or above, CAS 3.2 or below), change the code in$TOMCAT_HOME/webapps/cas-web/WEB-

    INF/view/jsp/default/ui/casLoginView.jspcasLoingView.jsp from:

    to:

    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/WEB-INF/deployerConfigContext.xml

    ldap://docs.cignex.com:10389/

  • 8/6/2019 Integrating Liferay

    5/12

    java.naming.security.authenticationsimple

    Note that you can update LDAP other than ldap:docs.cignex.com:10389. And more, the SSO CASserver 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 oldversion)

    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 tohttp://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Integration+with+NTLM+plus+ADS

  • 8/6/2019 Integrating Liferay

    6/12

  • 8/6/2019 Integrating Liferay

    7/12

  • 8/6/2019 Integrating Liferay

    8/12

    5) Set up CAS SSO in Liferay Use virtual domain

  • 8/6/2019 Integrating Liferay

    9/12

    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 thatyou are going to the right place. However, this site's identity can't be verified. You should get orinstall certificate. In case, you should install SSL certificate in your own CAS server.

    Remove CAS SSO settings in case

    To remove CAS SSO (including other SSO like openSSO) settings, in case:

    y shutdown the portaly Run script:

    delete from PortletPreferences where portletId = 'LIFERAY_PORTAL';

    y re-start the portalIntegration of Liferay and Alfresco portlets

  • 8/6/2019 Integrating Liferay

    10/12

    In ten steps, you could be able to set alfresco web client as a set of portlets. It is simple for Do-It-Yourselfers.

    Download URL: http://liferay.cignex.com/palm_tree/0387/sso/liferay/alfresco-portlet (Liferay5.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)

  • 8/6/2019 Integrating Liferay

    11/12

    3) Update dir.root in $ALFRESCO_HOME/ WEB-INF/classes/alfresco/repository.propertes.

    dir.root=../../alf_data

    4) Create a database alfresco in MySQL

    drop database if exists alfresco;create database alfresco character set utf8;grant all on alfresco.* to 'alfresco'@'localhost' identified by 'alfresco'with grant option;grant all on alfresco.* to 'alfresco'@'localhost.localdomain' identified by'alfresco' with grant option;

    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/WEB-INF/web.xml like:

    javax.faces.CONFIG_FILES/WEB-INF/faces-config.xml,/WEB-INF/faces-config-

    app.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/faces-config-custom.xml

    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 andadd 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 fromhttp://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 alfrescoportlets 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. Thenlogin as admin/admin in liferay, and add alfresco portlets in liferay portal pages, again.

    Integration of Liferay, Alfresco, SSO and LDAP

  • 8/6/2019 Integrating Liferay

    12/12

    In ten steps, you could be able to integrate Liferay with Alfresco, SSO and LDAP. It is simplefor 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