This page was last edited on June 27, 2017, at 23:20.
Comments or questions about this documentation? Contact us for support!
The Jetty web server supplied with the Co-browse solution includes a pre-configured, self-signed certificate. This allows you to use HTTPS out of the box in a lab or demo environment, with the restrictions described in Basic Instrumentation.
For a production environment, you should use a certificate issued by a third-party Certificate Authority. The procedures on this page provide examples of ways to load SSL certificates and configure Jetty. These examples may vary depending on your environment.
Prerequisites
Start of procedure
keytool -keystore <keystore> -importcert -alias <alias> -file <certificate_file> -trustcacerts
<keystore>
is the name of your JSSE keystore.<alias>
is the unique alias for your certificate in the JSSE keystore.<certificate_file>
is the name of your certificate file. For example, jetty.crt
.openssl pkcs12 -inkey <private_key> -in <certificate> -export -out <pkcs12_file>
<private_key>
is the name of your private key file. For example, jetty.key
.<certificate>
is the name of your certificate file. For example, jetty.crt
.<pkcs12_file>
is the name of the PKCS12 file that will be created. For example, jetty.pkcs12
.keytool -importkeystore -srckeystore <pkcs12_file> -srcstoretype <store_type> -destkeystore <keystore>
<pkcs12_file>
is the name of your PKCS12 file. For example, jetty.pkcs12
.<store_type>
is the file type you are importing into the keystore. In this case, the type is PKCS12.<keystore>
is the name of your JSSE keystore.End of procedure
Next Steps
Prerequisites
Start of procedure
<jetty_installation>/etc/jetty-ssl.xml
.<New id="sslContextFactory" class="org.eclipse.jetty.http.ssl.SslContextFactory">
<Set name="KeyStore"><Property name="jetty.home" default="." />/etc/keystore</Set>
<Set name="KeyStorePassword">OBF:<obfuscated_keystore_password></Set>
<Set name="KeyManagerPassword">OBF:<obfuscated_keymanager_password></Set>
<Set name="TrustStore"><Property name="jetty.home" default="." />/etc/keystore</Set>
<Set name="TrustStorePassword">OBF:<obfuscated_truststore_password></Set>
</New>
End of procedure
The keystore file in the example above is given relative to the Jetty home directory. For production, you should keep your keystore in a private directory with restricted access. Even though the keystore has password, the password may be configured into the runtime environment and is vulnerable to theft.
You can now start Jetty the normal way (make sure that jcert.jar, jnet.jar and jsse.jar are on your classpath) and SSL can be used with a URL, such as https://<your_IP>:8743/