Configure Cargo for SSL/TLS
On this page
Introduction
Goal
Configure your local Cargo-based development environment to use SSL/TLS.
Background
A standard implementation project created using the Bloomreach Experience Manager Maven archetype is configured to run in a local Cargo-based development environment. By default, the Tomcat container in this environment is configured to use an unencrypted HTTP connection, which is sufficient for most local development use cases. This page explains how you can configure Cargo to use an encrypted HTTPS connection instead, in case you need to develop or test an SSL/TLS setup locally.
Instructions
Prepare Keystore, Certificate, and Truststore
From within your project's root directory, change to the conf directory:
Use the Java keytool command to create a keystore inside the conf directory:
When answering the questions asked by keytool, make sure to use the name (CN) "127.0.0.1":
There should now be a file called tomcatkeystore in your project's conf directory.
Next, use keytool to export a certificate from the keystore:
Finally, use keytool to create a truststore and import the certificate into it:
When asked to trust the certificate, answer 'yes':
There should now be a file called tomcattruststore in your project's conf directory.
Configure Cargo Plugin
In your project's root pom.xml, find the cargo.run profile.
Inside the cargo.run profile, find the cargo-maven3-plugin plugin configuration properties.
Add the following plugin configuration properties to plugin/configuration/configuration/properties:
Still inside the cargo.run profile, add the following system properties to plugin/configuration/container/systemProperties:
Build your project.
Configure the HST
Run your project.
Point your web browser to the console at:
Login as admin and browse to the node /hst:platform/hst:hosts.
Set the property hst:scheme to https:
Browse to the node /hst:platform/hst:hosts/dev-localhost.
Set the hst:defaultport property to port 8443:
Repeat the previous two steps for the site host configuration at /hst:myproject/hst:hosts/.
Set the property hst:scheme to https:
Set the hst:defaultport property to port 8443:
Write your changes to the repository.
Point your browser to the CMS at:
Verify that the channel manager is working.