Steps for SSL Certificate
Open Command Prompt and type given below command
keytool -genkey -alias tomcat -keypass changeit -keyalg RSA
Enter keystore password: changeit
What is your first and last name?
[Unknown]: localhost
What is the name of your organizational unit?
[Unknown]: localhost
What is the name of your organization?
[Unknown]:
What is the name of your City or Locality?
[Unknown]:
What is the name of your State or Province?
[Unknown]:
What is the two-letter country code for this unit?
[Unknown]:
Is CN=localhost, OU=localhost, O=Unknown, L=Unknown, ST=Unknown, C=Unknown correct?
[no]: yes
keytool -export -alias tomcat -keypass changeit -file D:\liferay5.2.3\server.crt
Enter keystore password: changeit
Certificate stored in file D:\liferay5.2.3\server.crt
keytool -import -file D:\liferay5.2.3\server.crt -keypass changeit -keystore %JAVA_HOME%\jre\lib\security\cacerts
Enter keystore password: changeit
Owner: CN=localhost, OU=localhost, O=Unknown, L=Unknown, ST=Unknown, C=Unknown
Issuer: CN=localhost, OU=localhost, O=Unknown, L=Unknown, ST=Unknown, C=Unknown
Serial number: 462067d8
Valid from: Fri Apr 13 15:39:36 HST 2010 until: Thu Jul 12 15:39:36 HST 2010
Certificate fingerprints:
MD5: CC:3B:FB:FB:AE:12:AD:FB:3E:D 5:98:CB:2E:3B:0A:AD
SHA1: A1:16:80:68:39:C7:58:EA:2F:48:59:AA:1D:73:5F:56:78:CE:A4:CE
Trust this certificate? [no]: yes
Certificate was added to keystore
Steps for ApacheTomcat Server
Remove comments from server.xml file for HTTPS request which runs on port no 8443.
keystorePass="changeit" truststoreFile="C:/Program Files/Java/jdk1.6.0_14/jre/lib/security/cacerts" />
Setting up CAS server
1. Download the CAS Server and find the war file e.g. \cas-server-3.2.1\modules\cas-server-webapp-3.2.1.war
2. Start the Apache Tomcat server. Deploy the war file (cas-server-webapp-3.2.1.war) to the Tomcat’s webapps folder and rename it. e.g. C:\apache-tomcat-6.0.14\webapps\cas-web
3. Now that CAS is deployed you should have an unpacked directory in your webapps folder e.g. C:\apache-tomcat-6.0.14\webapps\cas-web
4. Restart tomcat and log in with the username and password at the url https://localhost:8443/cas-web/login
Setting up Liferay
1. Create system-ext.properties (webapps\ROOT\WEB_INF\classes)
2. Open system-ext.properties and enter and Save it.
com.liferay.filters.sso.cas.CASFilter=true
3. Open portal-ext.properties and enter and Save it.
auto.login.hooks=com.liferay.portal.security.auth.BasicAutoLogin
auto.login.hooks=com.liferay.portal.security.auth.BasicAutoLogin,com.liferay.portal.security.auth.CASAutoLogin
4. Login as administrator and go to control panel->settings->Authentication->CAS
5. Give Login URL: https://localhost:8443/cas-web/login
6. Give Logout URL: https://localhost:8443/cas-web/logout?http://localhost:8080/c/portal/login
7. Give Server Name: localhost:8080
8. Give Service URL: http://localhost:8080/c/portal/login
9. Give Validate URL: https://localhost:8443/cas-web/proxyValidate
10. Save it
Subscribe to:
Post Comments (Atom)
Please post complete configuration. I am in urgent need.
ReplyDeleteThanks in advance.
Thank you for the knowledge sharing.
ReplyDeleteCan someone or the author confirm if this is the complete article or just a part of the whole knowledge? I am in need of something like this. The way this blog ended, It looks like it is incomplete.
ReplyDeleteCan someone confirm if it works?