Store Certificates on Gateway

Note About Certificate Renewal

When a certificate is renewed, you must update the certificate according to the instructions below, then enforce policy again (even if configuration has not changed) by clicking on "Enforce" on the top bar of the web administration application for CloudGuard AppSec in the portal, or by using management API.

Storing certificates locally on AppSec Gateway

Follow these steps to store your certificate and private keys on the gateway that can be used by CloudGuard AppSec to process HTTPS traffic:
  • Pros: you have full control of your secrets.
  • Cons: Method fits a single gateway deployment, not an auto-scaled deployment.

Step 1: Download command-line tool

The tool's purpose is to verify the certificate and key files and generate an output .pkg file with a unique name.
Linux Download or run: wget && chmod +x certverify
You can use this tool on any machine where you have the files, before you actually store them on your CloudGuard AppSec Gateway(s).

Step 2: Run the command-line tool

Linux and Mac:
  • PEM certificates: ./certverify --cert {certificate.pem} --key {private-key.key}
  • PFX certificates: ./certverify --cert {certificate.pfx} --pass {password}
  • PEM certificates : certverify --cert {certificate.pem} --key {private-key.key}
  • PFX certificates : certverify --cert {certificate.pfx} --pass {password}
Repeat this step for each certificate/private key you wish to use.
Only certificates that contain Subject Alternative Name (SAN) are supported.
The tool will verify the certificate and key files, and generate an output .pkg file with a unique name that includes both.
Step 3: Store certificate and private key on your AppSec Gateway using SCP
You must store the files in directory /etc/certs on the AppSec Gateway or else it will not be identified. If the commands below end with an error, navigate to /etc and make sure a directory exists called "certs" (in linux, use the mkdir command).
The input pkg file for this step is the uniquely named pkg output file of the previous step.
  • Linux or Mac: ./scp {unique-name.pkg} [email protected]{gateway-ip}:/etc/certs
  • Windows: "C:\Program Files (x86)\WinSCP\" /command "open scp://admin:{password}@{gateway-ip}" "put cert_cert.pkg /etc/certs/" "exit"
Repeat this step for each certificate/private key you wish to use and for each AppSec Gateway.

Step 4: Enforce Policy

AppSec will now use the relevant certificates with HTTPS clients that are trying to access your applications.

Step 5: Change relevant DNS entries

You can now change your DNS entries as relevant to point to your AppSec Gateway IP or to a Load Balancer in front of several AppSec Gateways.