Configuring SSL in Adeptia Connect UI - Linux
If you want to access Adeptia Connect on HTTPS protocol then you need to configure SSL certificate in Adeptia Connect. You need to generate SSL certificate using Java Keytool only.Â
Generating SSL Certificate
To generate SSL certificate:
- Open Terminal.
- Go to the directory where JRE is installed.
Run the following Keytool command to create a Keystore for Jetty with a self signed certificate or CA signed certificate.
While executing the command, you will be prompted to provide other details. The default password is changeit. You can change the password. Note the Keystore password for future references.- Go to the location where Tomcat is installed. Create certs folder and copy the Keystore (certs.jks) in this folder.
- Go to …/<TomcatInstallFolder>/conf and open server.xml in the Text Editor.
Add the following code after the SSL/TLS HTTP 1.1 Connector section.
<Connector port="443" protocol="HTTP/1.1" SSLEnabled="true" maxThreads="150" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" keystoreFile="/opt/apache-tomcat-9.0.2/certs/certs.jks" keystoreType="JKS" keystorePass="xxxxxxx" compression="on" noCompressionUserAgents="gozilla, traviata" compressableMimeType="text/html,text/xml,text/css,application/javascript,application/json" useSendfile="false" server="Adeptia" xpoweredby="false"/>
If the keystore password contains any of following characters then it needs to be escaped with the value mentioned next to it.
CharacterValue" " ' ' < < > > & & For example, if the keystore password is p@ssw0rd&123! then it has to be defined as p@ssw0rd&123!
For better performance of Tomcat, refer to Performance Tuning for tuning other parameters.- Restart Tomcat.
Automatic HTTP to HTTPSÂ Redirection
If you want to access Adeptia Connect on HTTPS only then you need to redirect HTTP to HTTPS automatically. To enable automatic redirect:
- Go to …/<ApacheInstallFolder>/Tomcat<version_no>/.conf.
- Open server.xml.
- Change non-SSL/TLS HTTP/1.1 Connector to port number 80 and redirect to 443.
- Modify the SSL connector for the port 443.
- Save the file.
SSLÂ Configuration
- Go to …/<ApacheInstallFolder>/Tomcat<version_no>/conf.
- Open web.xml file.
Add the below security constraint within </web-app> and save the file.
<security-constraint> <web-resource-collection> <web-resource-name>Protected Context</web-resource-name> <url-pattern>/*</url-pattern> </web-resource-collection> <user-data-constraint> <transport-guarantee>CONFIDENTIAL</transport-guarantee> </user-data-constraint> </security-constraint> </web-app>
Verifying Configuration
To verify whether you have configured SSL certificate in Adeptia Connect:
- Open the browser and hit the URL to access Adeptia Connect using HTTPS protocol.
- Adeptia Connect login page appears. Verify your certificate by checking your https protocol color in the address bar. If you have used CA signed certificate then https protocol will be green in color () . However, if you have used self signed certificate then https protocol will be red in color ().
See also