After patching ca-certificates on PSM HTML Gateway connections fail
Symptom
After applying a patch to the ca-certificates on the HTML5 GW server, connections stop working.
The following errors were seen in the /var/log/messages log:
Unable to set up SSL/TLS: SSL accept failed
The cyberark-psm-gateway-webapp.log contains the error:
Creation of WebSocket tunnel to guacd failed: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Environment
11.1;11.2;11.3;11.4;11.5;11.6;11.7;12.0;12.1;12.2
HTML5 GW servers to which Linux patches are applied
Cause
The patch can remove certificates from the java keystore in $JAVA_HOME/jre/lib/security/cacerts.
This can break the trust of the certificate used to secure the connection between the webapp and the guacamole on the HTML5 GW server, either by removing the guacd certificate or by removing the certificate that was used to issue the guacd certificate.
Resolution
The resolution is to import the necessary certificates back into the java keystore.
First, to see where the java is installed on the server run the command:
readlink -f /usr/bin/java | sed "s:bin/java::"
Then the following command can be used to see what is currently in the keystore, (use the path received from the command above for <JavaPath>):
keytool -list -v -keystore <JavaPath>/jre/lib/security/cacerts
(if the output is too long, it can be redirected to a file by adding "> /tmp/certslist" at the end of the command to put the output in a file /tmp/certslist)
Locate the missing certificate or certificates Then import them using the command:
keytool -import -alias webapp_guacd_cert -keystore <JavaPath>/jre/lib/security/cacerts -trustcacerts -file certificate.crt
(Where certificate.crt is the file containing the missing certificate)