How To: Compare Between the Gateway's Certificate and the Upstream Certificate
Last updated
Last updated
The issue related to traffic validation between the gateway certificate and the upstream certificate. Usually, it is reflected by an asset not working via Android but is working through iOS and web browsers.
Surf to the protected asset via Chrome browser.
Click on the lock icon → Certificate is valid (to see the full certificate).
Move to the Details tab → choose the lowest hierarchy and click Export. Save the file on the local machine.
Login with SSH access to the AppSec Gateway machine
Browse the /etc/cp/rpmanager/manualCerts and get the private key file, save it locally in the same folder as the file from section 3.
Run both files with CertVerify according to the manual: Store Certificates on Gateway - CloudGuard AppSec (checkpoint.com)
Place the exported .pkg file under /etc/certs
Login to the Infinity Portal and click Enforce.
Login with SSH to the AppSec Gateway machine
Run echo | openssl s_client -showcerts -servername
<
Protected URI> -connect 127.0.0.1:443 > proxy_certs.txt
Run
echo | openssl s_client -showcerts -servername
<
Protected URI> -connect <Ppstream IP>:443 > upstream_certs.txt
Check the difference between proxy_certs.txt and upstream_certs.txt
In case they are different, fix it manually:
Copy the certs from upstream_certs.txt file into /etc/cp/rpmanager/manualCerts/<Cert File Name>.pem
Copy the certs from upstream_certs.txt file into /etc/certs/<Cert File Namee>.pem
Run docker exec <nginx container> nginx -s reload
To avoid this from happening again after changing the certificates, we advise to use the CertVerify tool and adding the full chain to the certificate.