How to enable SSL on Jetty for HTTPS in REST API. |
This knowledge article may contain information that does not apply to version 21.05 or later which runs in a container environment. Please refer to Article Number 000385088 for more information about troubleshooting BMC products in containers.
Note: <ARSystem>/jetty/etc
2.- Place your Keystore file in this location; jetty-selector.xml
<Set name="keyStore"><Property name="jetty.home" default="." />/etc/<Your_Keystore_File></Set> <Set name="trustStore"><Property name="jetty.home" default="." />/etc/<Your_Keystore_File></Set> jetty-http.xml <Set name="KeyStorePath"><Property name="jetty.home" default="." />/etc/<Your_Keystore_File></Set> <Set name="TrustStorePath"><Property name="jetty.home" default="." />/etc/<Your_Keystore_File></Set>
6.1) Navigate to the following directory: <ARSystem>/lib/start/startlevel1
6.2) Locate the jetty-util JAR file. (i.e jetty-util-9.4.15.v20190215.jar for 20.02). 6.3) Execute the following command on a CMD (Windows) or Console (Unix), for example: java -cp jetty-util-9.4.15.v20190215.jar org.eclipse.jetty.util.security.Password jetty <password_to_obfuscate> Note:
If Java is not configured in your Environment variables, you can call java with the full path. i.e: (Windows) C:\Java\bin\java -cp jetty-util-9.4.15.v20190215.jar org.eclipse.jetty.util.security.Password jetty <password_to_obfuscate> (Unix) /opt/java/bin/./java -cp jetty-util-9.4.15.v20190215.jar org.eclipse.jetty.util.security.Password jetty <password_to_obfuscate>
<Set name="KeyManagerPassword">OBF:yourObfuscatedPassword</Set>
<Set name="KeyStorePassword">OBF:yourObfuscatedPassword</Set> <Set name="TrustStorePassword">OBF:yourObfuscatedPassword</Set>
Add the option using the following statement as an example:
jvm.option.<next no>=-Dorg.apache.activemq.broker.BouncyCastlePosition=100 Note: Use the next available number for the jvm.option.## relevant to your installation. (Change <next_no> to the following number in your file).
The Bouncy Castle Crypto package is a Java implementation of cryptographic algorithms. The package is organized so that it contains a light-weight API suitable for use in any environment (including the newly released J2ME) with the additional infrastructure to conform the security algorithms to the JCE framework.
1.- Locate and modify the following string at the end of your HTTPS Connector:
<Set name="port">8443</Set>
2.- Save changes and restart the AR Server.
1.- In jetty-http.xml file, locate and modify the following string at the end of your HTTPS Connector:
<Set name="port">8443</Set>
2.- In jetty.xml file, locate and modify the following string:
<Set name="securePort">8443</Set>
3.- Save changes on both files and restart the AR Server.
|