Foren

Integrate liferay 7 with CAS server using ldap

dev doe, geändert vor 7 Jahren.

Integrate liferay 7 with CAS server using ldap

New Member Beiträge: 4 Beitrittsdatum: 31.03.17 Neueste Beiträge
Hello,

I'm newbie to liferay 7,I want to integrate liferay 7 with CAS server using ldap.

my liferay's version is 7.0.2 GA3,CAS server's version is 3.5.2 and I'm using opendj active directory.

I have installed liferay on localhost:8080,CAS server is on one of my server
machine over ssl and ldap is on the same server machine.

I have successfully integrated CAS with ldalp that is I can able to login in CAS server from ldap users.
After this I have configured CAS authentication in liferay that is in Configuration->Instance Setting->Authentication under this CAS tab.
when I try to login im getting following url:

http://localhost:8080/?ticket=ST-36-tP25deAgea9pUfwEcf6V-cas01.example.org

Although ticket is generating,but I'm not able to access admin panel.
I have attached screenshot.

Please help,
Thanks in advace
Mickael ROMME, geändert vor 6 Jahren.

RE: Integrate liferay 7 with CAS server using ldap

New Member Beiträge: 15 Beitrittsdatum: 05.05.17 Neueste Beiträge
Hi,

I've the same problem on liferay 7 release.
Did you find the solution to your problem ?

Best regards,
Kush Bhogan, geändert vor 6 Jahren.

RE: Integrate liferay 7 with CAS server using ldap

New Member Beiträge: 4 Beitrittsdatum: 31.03.17 Neueste Beiträge
Hello Mickael,

Sorry for late reply.
This error occur due to import certificates issue.
To solve this please follow the steps.

First you must create self signed certificate to run CAS login service.
Steps to Create self signed certificate:
Commands to generate, export,and add the certificate to CACERT
1.Command to generate the key:
keytool -genkey -alias mycas -keypass changeit -keyalg RSA

2.Command to export the generated key to a certificate
keytool -export -alias mycas -keypass changeit -file %FILE_NAME%
Here file name is to be replaced by your custom certificate name eg: " mycas.cert”


3.Command to import the certificate to a trusted store (cacerts in this case)
keytool -import -alias mycas -file mycas.cert -keypass changeit -keystore "C:/Program Files/Java/jdk1.8.0_121/jre/lib/security/cacerts"

4.Command to verify if the certificate was successfully added to the trusted store
Keytool -list -alias tomcat -keystore cacerts
(Present working directory :%JAVA_HOME%/jre/lib/security)


NOTE: The server certificate must contain the name of the server in which CAS server exists for e.g. your alias must equal to your domain name you have entered while creating certificate.
Use first and second command on server in order to generate certificate on server.
Use third and fourth command on client side in order to import certificate and check if it is imported successfully.


Enter this code in server.xml file to enable ssl connection for CAS.

	<connector port="8443" protocol="HTTP/1.1" SSLEnabled="true" maxThreads="150" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" keyAlias="alias entered while creating certificate" keystoreFile="C:/Users/Administrator/.keystore" keystorePass="password enter while creating cerificate" truststoreFile="C:/Program Files/Java/jdk1.8.0_121/jre/lib/security/cacerts" />

Once it is imported successfully open admin panel and go to Control Panel -> Configuration -> Instance Setting.
Go to Authentication -> CAS and enter appropriate urls and first check for TEST CAS CONFIGURATION.
It should Pass the test otherwise the same error will occur.

for reference check this url.
http://www.fulcrumww.com/documents/33824/33997/liferay-liferay-portal-content-management-system-cms-website.pdf/c85b80b9-dab3-4fa3-871e-f0eab281ad57
Mickael ROMME, geändert vor 6 Jahren.

RE: Integrate liferay 7 with CAS server using ldap

New Member Beiträge: 15 Beitrittsdatum: 05.05.17 Neueste Beiträge
Thank you for your answer. Finally I didn't have the same problem.

Best regards,