Store Certificates in AWS
Last updated
Was this helpful?
Last updated
Was this helpful?
Follow these steps to store your certificate and private keys in AWS that can be used by CloudGuard WAF to process HTTPS traffic
When a certificate is renewed, you must update the certificate manager 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 WAF in the portal, or by using .
In order to use encrypted traffic (HTTPS) a managed reverse proxy must have access to the relevant certificates of the domains and URLs it exposes.
Example - you have two applications and one API endpoint to protect:
www.acme.com
www.acme.com/sales
products.acme.com/catalog
Case 1
You have one wildcard certificate for *.acme.com
Place the certificate in the desired certificate storage by following the instructions below. CloudGuard WAF will use it for all relevant applications
Case 2
You have two certificates: (1) for www.acme.com and (2) for products.acme.com
Place both certificates in the desired certificate storage by following the instructions below. CloudGuard WAF will automatically use certificate 1 for the first two Applications/APIs and certificate 2 for the last Application
Log in to AWS Console and select the relevant Region.
Navigate to the AWS Certificate Manager (ACM) and import a PEM-encoded certificate and private key.
The certificate must be imported from a different certificate provider and only hosted by the ACM.
Creation of the certificate via the ACM is not supported as this prevents access to the private key required in the next step.
Encode your private key into base64 using this command (Linux or Mac):
openssl base64 -A -in <path to private key> -out <output file>
You will need the output of the command in Step 4.
Navigate to AWS Secrets Manager and click Store a new secret:
Choose Other types of secret, and add a new secret key-value pair:
In the key cell enter: private key
In the value cell enter your private key as a base64 encoded single string (the output of the openssl command above).
Set the Encryption key to: aws/secretmanager
Click Next
Enter the name of your secret in the secret name field
In the Tags section, add Key-Value Pair:
In the key cell enter: certificate
In the value cell enter the Amazon Resource Name (ARN) of the matching certificate that you placed in the AWS Certificate Manager (step 4 above).
Repeat the above steps for each additional private key you have. You must store each private key as a separate secret.
To launch the CloudFormation Stack, select the acknowledgement check boxes and click Create stack.
Open CloudGuard WAF Web Interface in your browser and click the Enforce button at the top bar. This will signal the Gateways to read the certificates from AWS.