rave-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jc...@apache.org
Subject svn commit: r1187312 - /incubator/rave/site/trunk/content/rave/documentation/configure-ssl.mdtext
Date Fri, 21 Oct 2011 12:29:01 GMT
Author: jcian
Date: Fri Oct 21 12:29:01 2011
New Revision: 1187312

URL: http://svn.apache.org/viewvc?rev=1187312&view=rev
Adding a page on configuring Rave for SSL.  Hoping I'm not publishing this to production by
checking it in...


Added: incubator/rave/site/trunk/content/rave/documentation/configure-ssl.mdtext
URL: http://svn.apache.org/viewvc/incubator/rave/site/trunk/content/rave/documentation/configure-ssl.mdtext?rev=1187312&view=auto
--- incubator/rave/site/trunk/content/rave/documentation/configure-ssl.mdtext (added)
+++ incubator/rave/site/trunk/content/rave/documentation/configure-ssl.mdtext Fri Oct 21 12:29:01
@@ -0,0 +1,105 @@
+Title:  Configuring Rave for SSL
+Notice:    Licensed to the Apache Software Foundation (ASF) under one
+           or more contributor license agreements.  See the NOTICE file
+           distributed with this work for additional information
+           regarding copyright ownership.  The ASF licenses this file
+           to you under the Apache License, Version 2.0 (the
+           "License"); you may not use this file except in compliance
+           with the License.  You may obtain a copy of the License at
+           .
+             http://www.apache.org/licenses/LICENSE-2.0
+           .
+           Unless required by applicable law or agreed to in writing,
+           software distributed under the License is distributed on an
+           KIND, either express or implied.  See the License for the
+           specific language governing permissions and limitations
+           under the License.Get default Tomcat based Rave installation up and running.
+## Prerequisites
+To follow these instructions you'll need a working copy of Rave up and running under Tomcat
6.  Please see the [Installing Rave][1] page for instructions on how to get up and running.
+These instructions are written assuming a Tomcat installation path of /temp/tomcat so you
may want to use that path for testing while you follow these instructions.
+Also note that these instructions were written and tested using Tomcat running on Windows.
 Tomcat on other platforms *should* be exaclty the same except for startup scripts (.bat vs
.sh) and file locations (c:\ vs /).
+## Enabling SSL in Tomcat
+These instructions demonstrate how to get Tomcat 6 running over SSL using a self signed certificate.
+ - Copy the default cacerts file to /temp/tomcat (this allows you to not have to pollute
your real cacerts file with test certs).
+    cp "%JAVA_HOME%/jre/lib/security/cacerts" "/temp/tomcat/custom-cacerts"
+ - Generate a self signed certificate that you'll use with Tomcat.
+    "%JAVA_HOME%\bin\keytool" -genkey -alias tomcat -keyalg RSA -validity 365 -storepass
changeit -keystore /temp/tomcat/custom-cacerts
+    What is your first and last name?
+      [Unknown]:  rave-server.example.com
+    What is the name of your organizational unit?
+      [Unknown]:  example unit
+    What is the name of your organization?
+      [Unknown]:  example organization
+    What is the name of your City or Locality?
+      [Unknown]:  example city
+    What is the name of your State or Province?
+      [Unknown]:  example state
+    What is the two-letter country code for this unit?
+      [Unknown]:  US
+    Is CN=rave-server.example.com, OU=example unit, O=example organization, L=example city,
ST=example state, C=US correct?
+      [no]:  yes
+    Enter key password for <tomcat>
+            (RETURN if same as keystore password):
+ - Edit Tomcats startup.bat file to get the JVM to use our alternate cacerts file.  It is
important for the JVM to trust our self signed certificate because Rave makes HTTP requests
to Shindig to fetch gadget metadata, and if those requests are over SSL then the JVM must
trust the certificate being used for the SSL communication.
+    ** Added the following line above the "call "%EXECUTABLE%" start ..." line:
+    set JAVA_OPTS=%JAVA_OPTS% -Djavax.net.ssl.trustStore=c:\temp\tomcat\custom-cacerts
+ - Edit Tomcats server.xml to enable an SSL listener on port 443 using our alternate cacerts
file.  By default Tomcat looks for a certificate with the alias "tomcat" which is what we
used to create our self signed certificate.
+    ** Did a search and replace of 8443 with 443
+    ** Uncommented the HTTPS connector and configured it to use our custom cacerts file:
+    <Connector port="443" protocol="HTTP/1.1" SSLEnabled="true"
+               maxThreads="150" scheme="https" secure="true"
+               keystoreFile="c:\temp\tomcat\custom-cacerts" keystorePass="changeit"
+               clientAuth="false" sslProtocol="TLS" />
+ - Startup Tomcat and verify that Rave still runs properly on http://localhost:8080/portal/
+ - Make sure you can access the Rave login page at https://rave-server.example.com/portal
+    Note - if you already have an authenticated session open in your browser you'll probably
need to close and re-open your browser to access the login page.
+    Also note that the rest of Rave wont work over SSL yet.
+## Configure Rave and Shindig to run over SSL.
+ - Edit the /temp/tomcat/webapps/portal/WEB-INF/classes/portal.properties file to configure
Rave to use SSL.
+    ** Updated the following values at the top of the portal.properties config file with:
+    portal.opensocial_engine.protocol=https
+    portal.opensocial_engine.root=rave-server.example.com
+    portal.opensocial_engine.gadget_path=/gadgets
+ - Edit the /temp/tomcat/webapps/ROOT/WEB-INF/classes/rave.shindig.properties and /temp/tomcat/webapps/ROOT/WEB-INF/classes/containers/default/container.js
files to configure Shindig to use SSL.
+    Note - there may be other ways to get Shindig to use SSL but this method does work.
+    Also note - the changes to container.js are a search and replace of http:// with https://
+    ** Updated the following values at the top of the rave.shindig.properties config file
+    shindig.host=rave-server.example.com
+    shindig.port=
+    shindig.contextroot=
+ - Startup Tomcat and verify that Rave runs properly on https://rave-server.example.com/portal
+## Complete diff of modified files follows
+[1]: installing.html
\ No newline at end of file

View raw message