Shown below are the steps to configure the Repertoire server to run in secure protocol (HTTPS) mode.
-
Stop the Repertoire Server.
-
In the Repertoire Server, edit /config/ERS2.xml and uncomment the lines as shown below
<!-- use these for secure mode (https) -->
<ers:property name="Secure">true</ers:property>
<ers:property name="Port">8443</ers:property>
<ers:property name="Password">secret</ers:property>
- Afterwards, do comment out the plain mode lines as shown below:
<!-- use these for plain mode (http) -->
<!--<ers:property name="Secure">false</ers:property>
<ers:property name="Port">8080</ers:property>-->
-
Create a new directory, “ssl” inside the /config directory. (To store the “keystore”)
for example,
-
Open a command prompt in the new /ssl directory and enter the following to create a keystore.
<JAVA_HOME>/bin/keytool -keystore keystore -alias jetty -genkey -keyalg RSA
*Based on the above command, do ensure to replace “<JAVA_HOME>” with your respective JAVA home path.
Feel free to refer to the following link for more details on creating a keytool.
-
After generating the keystore in /config/ssl directory, go back to the ERX2.xml file and enter the password you chose into the password property as highlighted below.
<ers:property name=“Password”>secret</ers:property> -
Save the ERS2.xml file and restart the Repertoire server. Repertoire server would than be accessible through the HTTPS protocol.
For example, “https://localhost:8080”