<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>SAML SSO Implementation in Liferay 6.2 CE GA2</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=113087942" />
  <subtitle>SAML SSO Implementation in Liferay 6.2 CE GA2</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=113087942</id>
  <updated>2026-04-04T23:05:07Z</updated>
  <dc:date>2026-04-04T23:05:07Z</dc:date>
  <entry>
    <title>RE: SAML SSO Implementation in Liferay 6.2 CE GA2</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113116640" />
    <author>
      <name>Ramalingaiah. D</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113116640</id>
    <updated>2019-04-10T13:07:33Z</updated>
    <published>2019-04-10T13:07:33Z</published>
    <summary type="html">Hi Anu,&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Today i have done integration for liferay SSO with help of CAS and LDAP . So below step we need to follow as per my implementation&lt;br /&gt;&lt;strong&gt;Note: before starting implementation need to take liferay port no 8080 because i have done integration testing using port no 8080&lt;br /&gt;Note:please find attached document as reference.i have mention entire process for creating SSO connection. &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 1 : need to change user authenticate by email address to screen name.&lt;/strong&gt;&lt;br /&gt;login with admin account into the liferay portal server.then go to control panel then portal setting Then go to Authentication tab then in general tab need to change below option&lt;br /&gt;*** How do user authenticate*** ----- By ScreenName(is preferred value)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 2: need to install &amp;amp; configure apache ds server for ldap configuration&lt;/strong&gt;&lt;br /&gt;go to this url :http://archive.apache.org/dist/directory/apacheds/stable/1.0/1.0.2/&lt;br /&gt;and find &amp;#34;apacheds-1.0.2-win32-setup.exe&amp;#34; for windows&lt;br /&gt;after downloaded just install apache ds server into your local directory then go to bin directory and start apacheds server.&lt;br /&gt;After that need to install JXplorer for creating user/organization..now open your jxplorer and need to connect with apacheds server using below details&lt;br /&gt;&lt;strong&gt;hostname : localhost&lt;br /&gt;port : 10389&lt;br /&gt;Level : user+password&lt;br /&gt;User DN : uid=admin,ou=system&lt;br /&gt;password : secret&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;then click on ok button then you&amp;#39;ll see home page .in the left side we have directory like com and we have sub directory called example&lt;br /&gt;now right click on sub directory and select new option here we need to fill below entry&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;RDN entry cn=test&lt;/strong&gt;&lt;br /&gt;where test is our screen name according to liferay.then click on ok button&lt;br /&gt;&lt;strong&gt;after that we need to fill test user information like :&lt;br /&gt;sn : Test&lt;br /&gt;displayName : test&lt;br /&gt;givenName :Test&lt;br /&gt;mail : test@liferay.com&lt;br /&gt;uid:test&lt;br /&gt;userPassword : test and encryption policy should be SHA&lt;/strong&gt;&lt;br /&gt;after that we need to &lt;strong&gt;submit &lt;/strong&gt;this data.&lt;br /&gt;now we have done our ldap server configuration.Now we have to go liferay -&amp;gt;control panel -&amp;gt; portal settings -&amp;gt; Authentication -&amp;gt; Ldap&lt;br /&gt;and need to add ldap server using below information.&lt;br /&gt;Server Name : ldap://localhost:10389&lt;br /&gt;&lt;strong&gt;Connection&lt;br /&gt;----------------&lt;/strong&gt;&lt;br /&gt;Base Provider URL : ldap://localhost:10389&lt;br /&gt;Base DN : dc=example,dc=com&lt;br /&gt;Principal : uid=admin,ou=system&lt;br /&gt;Credential : secret&lt;br /&gt;Auth Search Filter : (displayname=@screen_name@)&lt;br /&gt;Import Search Filter : (objectClass=organizationalPerson)&lt;br /&gt;&lt;strong&gt;User Mapping&lt;br /&gt;---------------&lt;/strong&gt;&lt;br /&gt;screen name :displayname&lt;br /&gt;Email Address :email&lt;br /&gt;Password : userPassword&lt;br /&gt;First Name : givenName&lt;br /&gt;Last Name : sn&lt;br /&gt;Job Title : title&lt;br /&gt;&lt;strong&gt;Export&lt;br /&gt;--------&lt;/strong&gt;&lt;br /&gt;Users DN : dc=example,dc=com&lt;br /&gt;User Default Object Class : organizationalPerson,top,person,inetOrgPerson&lt;br /&gt;then we have to save this configuration.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 3 : now need to setup CAS&lt;/strong&gt;&lt;br /&gt;go to liferay -&amp;gt; control panel -&amp;gt; portal settings -&amp;gt; Authentication -&amp;gt; CAS&lt;br /&gt;fill below entry&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1.Enabled option checked&lt;br /&gt;2.Import option Uncheck&lt;br /&gt;3. Login URL : https://localhost:8443/cas/login&lt;br /&gt;4: Logout URL : https://localhost:8443/cas/logout&lt;br /&gt;5.server name : localhost:8080&lt;br /&gt;6.server url : https://localhost:8443/cas&lt;br /&gt;No such user redirection : localhost:8080&lt;/strong&gt;&lt;br /&gt;then test your CAS Server&lt;br /&gt;&lt;strong&gt;Now after that need to download cas setup files&lt;/strong&gt;&lt;br /&gt;(A) download CAS Server related zip file using below url&lt;br /&gt;URL : http://developer.jasig.org/cas/&lt;br /&gt;Version : cas-server-3.4.11-release.zip&lt;br /&gt;please unzip this file to your local directory.then go to this unzip directory under modules folder and take cas-server-webapp-3.4.11 war file and copy &amp;amp; paste with the same folder and rename as cas.war&lt;br /&gt;Because in liferay control panel we have configure cas login and logout url.now deploy this war file into the liferay server under webapps then it will create cas folder.&lt;br /&gt;&lt;strong&gt;now go to that folder(.../webapps/cas/WEB-INF/....) and select cas.properties and we need to check below properties&lt;/strong&gt;&lt;br /&gt;1.server.prefix=http://localhost:8080/cas&lt;br /&gt;2.cas.securityContext.serviceProperties.service=http://localhost:8080/cas/services/j_acegi&lt;br /&gt;_cas_security_check&lt;br /&gt;3.cas.securityContext.serviceProperties.adminRoles=ROLE_ADMIN&lt;br /&gt;4.cas.securityContext.casProcessingFilterEntryPoint.loginUrl=http://localhost:8080/cas/l&lt;br /&gt;ogin&lt;br /&gt;5.cas.securityContext.ticketValidator.casServerUrlPrefix=http://localhost:8080/cas&lt;br /&gt;6.cas.themeResolver.defaultThemeName=cas-theme-default&lt;br /&gt;7.cas.viewResolver.basename=default_views&lt;br /&gt;8.host.name=cas&lt;br /&gt;9.database.hibernate.dialect=org.hibernate.dialect.MySQLDialect&lt;br /&gt;&lt;strong&gt;then we need to change deployerConfigContext.xml as below&lt;/strong&gt;&lt;br /&gt;(A) find and replace&lt;br /&gt;&amp;#34;&lt;strong&gt;&amp;lt;bean class=&amp;#34;org.jasig.cas.authentication.handle r.support.SimpleTestUsernamePasswordAuthenticationHandler&amp;#34; /&amp;gt;&lt;/strong&gt;&amp;#34;&lt;br /&gt;&lt;strong&gt;to&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&amp;lt;bean class=&amp;#34;org.jasig.cas.adaptors.ldap.FastBindLdapAuthenticationHandler&amp;#34;&amp;gt;&lt;br /&gt;&amp;lt;property name=&amp;#34;filter&amp;#34; value=&amp;#34;cn=%u,dc=example,dc=com&amp;#34; /&amp;gt;&lt;br /&gt;&amp;lt;property name=&amp;#34;contextSource&amp;#34; ref=&amp;#34;contextSource&amp;#34; /&amp;gt;&amp;lt;/bean&amp;gt;&lt;/strong&gt;&lt;br /&gt;(&lt;img alt="emoticon" src="@theme_images_path@/emoticons/cool.gif" &gt; need to add below bean before ending beans tag&lt;br /&gt;&lt;strong&gt;&amp;lt;bean id=&amp;#34;contextSource &amp;#34;class=&amp;#34;org.springframework.ldap.core.support.LdapContextSource&amp;#34;&amp;gt;&lt;br /&gt;&amp;lt;property name=&amp;#34;pooled&amp;#34; value=&amp;#34;true&amp;#34;/&amp;gt;&lt;br /&gt;&amp;lt;property name=&amp;#34;urls&amp;#34;&amp;gt;&lt;br /&gt;&amp;lt;list&amp;gt;&amp;lt;value&amp;gt;ldap://localhost:10389&amp;lt;/value&amp;gt;&amp;lt;/list&amp;gt;&lt;br /&gt;&amp;lt;/property&amp;gt;&lt;br /&gt;&amp;lt;property name=&amp;#34;userDn&amp;#34; value=&amp;#34;uid=admin,ou=system&amp;#34;/&amp;gt;&lt;br /&gt;&amp;lt;property name=&amp;#34;password&amp;#34; value=&amp;#34;secret&amp;#34;/&amp;gt;&lt;br /&gt;&amp;lt;property name=&amp;#34;baseEnvironmentProperties&amp;#34;&amp;gt;&amp;lt;map&amp;gt;&lt;br /&gt;&amp;lt;entry&amp;gt;&lt;br /&gt;&amp;lt;key&amp;gt;&amp;lt;value&amp;gt;java.naming.security.authentication&amp;lt;/value&amp;gt;&amp;lt;/key&amp;gt;&lt;br /&gt;&amp;lt;value&amp;gt;simple&amp;lt;/value&amp;gt;&lt;br /&gt;&amp;lt;/entry&amp;gt;&lt;br /&gt;&amp;lt;/map&amp;gt;&amp;lt;/property&amp;gt;&lt;br /&gt;&amp;lt;/bean&amp;gt;&lt;/strong&gt;&lt;br /&gt;now go to your cas server unzip directory as below :&lt;br /&gt;&lt;strong&gt;.... \cas-server-3.4.11-release\cas-server-3.4.11\modules and take this jar file&lt;br /&gt;&amp;#34;cas-server-support-ldap-3.4.11.jar&amp;#34; and paste inside liferay-portal-6.2-ce-ga2\tomcat-&lt;br /&gt;7.0.42\webapps\cas\WEB-INF\lib folder&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Now Download some external dependent jar file using below location&lt;br /&gt;&lt;br /&gt;(1) Jar Name : ldaptemplate-1.0.2&lt;br /&gt;Location : http://www.java2s.com/Code/Jar/l/Downloadldaptemplate102jar.htm&lt;br /&gt;&lt;br /&gt;(2) Jar Name : spring-ldap-1.3.1.RELEASE-all.jar&lt;br /&gt;Location :http://www.java2s.com/Code/Jar/s/Downloadspringldap131RELEASEalljar.htm&lt;br /&gt;and paste inside liferay-portal-6.2-ce-ga2\tomcat-7.0.42\webapps\cas\WEB-INF\lib folder&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;After this need to create theme.properties file using below location&lt;br /&gt;...../liferay-tomcat/webapps/cas/WEB-INF/classes/cas-theme-default.properties (copy this property file and paste with the same folder and rename as theme.properties).&lt;br /&gt;Ex. File 1 : ...../liferay-tomcat/webapps/cas/WEB-INF/classes/cas-theme-default.properties&lt;br /&gt;File 2 : ...../liferay-tomcat/webapps/cas/WEB-INF/classes/theme.properties&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 4: Now Create Certificate&lt;/strong&gt;&lt;br /&gt;create 1 folder as a cas-key(in your local directory) then open cmd prompt and go to this newly created directory and performed below steps : &lt;br /&gt;&lt;strong&gt;(A) try below command in your command prompt&lt;/strong&gt;&lt;br /&gt;Command : &lt;strong&gt;keytool -genkey -alias tomcat -keypass changeit -keyalg RSA&lt;/strong&gt;&lt;br /&gt;Example : D:\Softwares\cas-keys&amp;gt;keytool -genkey -alias tomcat -keypass changeit -keyalg RSA&lt;br /&gt;Enter keystore password: changeit&lt;br /&gt;Re-enter new password: changeit&lt;br /&gt;&lt;br /&gt;make it first and last name as localhost and rest of the question no need to enter any thing&lt;br /&gt;&lt;br /&gt;What is your first and last name: localhost&lt;br /&gt;What is the name of your organizational unit&lt;br /&gt;What is the name of your organization&lt;br /&gt;What is the name of your City or Locality&lt;br /&gt;What is the name of your State or Province&lt;br /&gt;What is the two-letter country code for this unit&lt;br /&gt;Is CN=localhost, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown&lt;br /&gt;correct:&lt;strong&gt; no : yes&lt;/strong&gt;&lt;br /&gt;(&lt;img alt="emoticon" src="@theme_images_path@/emoticons/cool.gif" &gt; after completing step A try below command&lt;br /&gt;Command : &lt;strong&gt;keytool -genkey -alias duke -keyalg RSA -validity 7 -keystore keystore&lt;/strong&gt;&lt;br /&gt;Example : D:\Softwares\cas-keys&amp;gt; keytool -genkey -alias duke -keyalg RSA -validity 7 -&lt;br /&gt;keystore keystore&lt;br /&gt;Enter keystore password : changeit&lt;br /&gt;Re-enter new password : changeit&lt;br /&gt;What is your first and last name: localhost&lt;br /&gt;What is the name of your organizational unit&lt;br /&gt;What is the name of your organization&lt;br /&gt;What is the name of your City or Locality&lt;br /&gt;What is the name of your State or Province&lt;br /&gt;What is the two-letter country code for this unit&lt;br /&gt;Is CN=localhost, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown&lt;br /&gt;correct : &lt;strong&gt;no: yes&lt;/strong&gt;&lt;br /&gt;Enter key password for duke&lt;br /&gt;(RETURN if same as keystore password): changeit&lt;br /&gt;Re-enter new password: changeit&lt;br /&gt;&lt;strong&gt;(C) now after completing step B try below command&lt;/strong&gt;&lt;br /&gt;Command : &lt;strong&gt;keytool -export -alias tomcat -keypass changeit -file server.cert&lt;/strong&gt;&lt;br /&gt;Example&lt;img alt="emoticon" src="@theme_images_path@/emoticons/smile.gif" &gt;:\Softwares\cas-keys&amp;gt;keytool -export -alias tomcat -keypass changeit -file server.cert&lt;br /&gt;Enter keystore password : changeit&lt;br /&gt;Certificate stored in file &amp;lt;server.cert&amp;gt;&lt;br /&gt;&lt;br /&gt;(D) now after completing step C try below command&lt;br /&gt;Command : &lt;strong&gt;keytool -import -alias tomcat -file server.cert -keypass changeit -keystore&lt;/strong&gt;&lt;br /&gt;&amp;#34;C:\Program Files\Java\jdk1.7.0_45\jre\lib\security\cacerts&amp;#34;&lt;br /&gt;Example :&lt;br /&gt;D:\Softwares\cas-keys&amp;gt;keytool -import -alias tomcat -file server.cert -keypass changeit -&lt;br /&gt;keystore &amp;#34;C:\Program Files\Java\jdk1.7.0_45\jre\lib\security\cacerts&amp;#34;&lt;br /&gt;Enter keystore password:changeit&lt;br /&gt;Owner: CN=localhost, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown,&lt;br /&gt;C=Unknown&lt;br /&gt;Issuer: CN=localhost, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown,&lt;br /&gt;C=Unknown&lt;br /&gt;Serial number: 1d165110&lt;br /&gt;------&lt;br /&gt;------&lt;br /&gt;&lt;strong&gt;Trust this certificate? no: yes&lt;/strong&gt;&lt;br /&gt;Certificate was added to keystore&lt;br /&gt;&lt;strong&gt;(E) after completing step D try below command&lt;/strong&gt;&lt;br /&gt;Command :&lt;strong&gt; keytool -import -alias tomcatcert -file server.cert -keystore truststore&lt;/strong&gt;&lt;br /&gt;Example :&lt;br /&gt;D:\Softwares\cas-keys&amp;gt;keytool -import -alias tomcatcert -file server.cert -keystor&lt;br /&gt;tore&lt;br /&gt;Enter keystore password: changeit&lt;br /&gt;Re-enter new password: changeit&lt;br /&gt;Owner: CN=localhost, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown,&lt;br /&gt;C=Unknown&lt;br /&gt;Issuer: CN=localhost, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown,&lt;br /&gt;C=Unknown&lt;br /&gt;Serial number: 1d165110&lt;br /&gt;----&lt;br /&gt;----&lt;br /&gt;&lt;strong&gt;Trust this certificate? no: yes&lt;/strong&gt;&lt;br /&gt;Certificate was added to keystore&lt;br /&gt;&lt;strong&gt;Step 5 : Now go to this directory&lt;/strong&gt;&lt;br /&gt;...\liferay-tomcat\liferay-portal-6.2-ce-ga2\tomcat-7.0.42\conf and open server.xml&lt;br /&gt;and just un comment this tag with the changes&lt;br /&gt;&lt;br /&gt;&amp;lt;Service name=&amp;#34;Catalina&amp;#34;&amp;gt;&lt;br /&gt;---&lt;br /&gt;---&lt;br /&gt;&amp;lt;Connector port=&amp;#34;8443&amp;#34; protocol=&amp;#34;HTTP/1.1&amp;#34; SSLEnabled=&amp;#34;true&amp;#34;&lt;br /&gt;maxThreads=&amp;#34;150&amp;#34; scheme=&amp;#34;https&amp;#34; secure=&amp;#34;true&amp;#34;&lt;br /&gt;clientAuth=&amp;#34;false&amp;#34; sslProtocol=&amp;#34;TLS&amp;#34;&lt;br /&gt;keystoreFile=&amp;#34;C:/Users/vikash/.keystore&amp;#34;&lt;br /&gt;keystorePass=&amp;#34;changeit&amp;#34; &lt;br /&gt;truststoreFile=&amp;#34;C:/Program Files/Java/jdk1.7.0_45/jre/lib/security/cacerts/&amp;#34; /&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 6 : Now create portal-ext.properties and system-ext.properties file &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;(1) portal-ext.properties&lt;/strong&gt; (file location .....\liferay-tomcat\liferay-portal-6.2-ce-ga2\) &lt;br /&gt;ldap.auth.password.encryption.algorithm=NONE&lt;br /&gt;passwords.encryption.algorithm=NONE&lt;br /&gt;ldap.connection.com.sun.jndi.ldap.read.timeout=20000&lt;br /&gt;ldap.auth.enabled=true&lt;br /&gt;ldap.auth.required=true&lt;br /&gt;ldap.auth.method=bind&lt;br /&gt;ldap.export.enabled=true&lt;br /&gt;#CAS Configuration&lt;br /&gt;cas.auth.enabled=true&lt;br /&gt;&lt;strong&gt;(2) system-ext.properties&lt;/strong&gt;(file location .......\liferay-tomcat\liferay-portal-6.2-ce-ga2\tomcat-7.0.42\webapps\ROOT\WEB-INF\classes\)&lt;br /&gt;com.liferay.filters.sso.cas.CASFilter=true&lt;br /&gt;&lt;strong&gt;Step 7 : Now to restart tomcat server &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Step 8 : now open your browser and enter below address&lt;/strong&gt;&lt;br /&gt;https://localhost:8443/cas/login&lt;br /&gt;username :test&lt;br /&gt;password: test&lt;br /&gt;after login you will see below screen with login successfully message.&lt;br /&gt;now in the second tab trying to access liferay control panel&lt;br /&gt;http://localhost:8080/group/control_panel&lt;br /&gt;then you will see you have successfully login into the liferay portal&lt;br /&gt;&lt;br /&gt;thank you&lt;br /&gt;​​​​​​​Ram</summary>
    <dc:creator>Ramalingaiah. D</dc:creator>
    <dc:date>2019-04-10T13:07:33Z</dc:date>
  </entry>
  <entry>
    <title>SAML SSO Implementation in Liferay 6.2 CE GA2</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113087941" />
    <author>
      <name>anu Arora</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113087941</id>
    <updated>2019-04-09T11:53:51Z</updated>
    <published>2019-04-09T11:53:51Z</published>
    <summary type="html">Hi Team,&lt;br /&gt;&lt;br /&gt;Please suggest , Can we implement SSO  using SAML in Liferay CE 6.2 using any customization as we know it&amp;#39;s  directly supported to Liferay EE not to Liferay CE.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;​​​​​​​Anu Arora</summary>
    <dc:creator>anu Arora</dc:creator>
    <dc:date>2019-04-09T11:53:51Z</dc:date>
  </entry>
</feed>
