Set up HTTPS in Tomcat to use Pega Constellation
This article demonstrates step-by-step configurations of how to set up HTTPS in Tomcat to use Pega Constellation. This posting is more geared toward individual Pega architects who install and manage their own application server (Tomcat) and Pega software in their localhost for learning purpose and for developing various demos/POCs/validations for their Pega projects.
Client use case
During my 16+ years of Pega career, I have always installed the latest Pega software to my Pega laptop to play with it and also use it to build various POCs/demos and perform validations for my clients and teammates. When I installed Pega Platform 24.1.1 and built my application on Pega Constellation for the first time, however, I noticed that the portal would not launch, but instead keep hanging with loading icon.
Later, I realized that I was using HTTP, which did not work for Pega Constellation. When I later configured HTTPS in Tomcat and used it, the Pega Constellation portal (WebPortal) loaded correctly.
Here are the steps.
Configurations
Step 1 - Generate a certificate.
Go to the Tomcat config directory and run the keytool command provided by JDK.
keytool -genkey -alias tomcatks2 -keyalg RSA -keystore "C:\apache-tomcat-9.0.73\conf\tomcatks2"
Follow the prompt as shown below. Remember the password entered in the prompt.
Step 2 - Update server.xml in the Tomcat conf folder.
Add the following code to the server.xml file. The keystorePass value is same as the password entered while creating the certificate in Step 1 above.
<Connector
protocol="org.apache.coyote.http11.Http11NioProtocol"
port="8443"
maxThreads="200"
scheme="https"
secure="true"
SSLEnabled="true"
keystoreFile="conf/tomcatks2"
keystorePass="password"
clientAuth="false"
sslProtocol="TLS"
/>
Step 3 - Restart Tomcat
Validations
Step 1 - Open your browser and enter Pega URL using HTTPS (https://localhost:8443/prweb).
If you get the screen below, click Advanced.
Click Continue to localhost (unsafe).
Now, login to Pega.
Step 2 - Verify that your application is built on Constellation.
(Note: I generated the application by importing a Blueprint file, which by default configured the application to be built on Constellation.)
Step 3 - Verify that your access group has the WebPortal portal.
(Note: if you generated your application from a Blueprint file, then WebPortal should have been added by default.)
Step 4 - Launch the WebPortal (label="Work Portal")
It opens successfully.
Additional notes
- Set the Pega-UIEngine • ConstellationPegaStaticURL DSS. When I tried without this DSS, the Constellation WebPortal launched as blank screen.
https://release.constellation.pega.io
Please leave any feedback or question.