Store Certificates in AWS
Follow these steps to store your certificate and private keys in AWS that can be used by CloudGuard AppSec 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 AppSec in the portal, or by using management API.
Log in to AWS Console and select the relevant Region.
Navigate to the AWS Certificate Manager (ACM) and create or import a PEM-encoded certificate and private key.
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
It is recommended to copy the base64 encoded key into a text editor and then to the Secrets Manager to make sure it is copied correctly. Sometimes, copying directly from a terminal is not working well.
- 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.
The CloudFormation template allows you to input only two certificates and private keys. After the stack launches for additional certificates, go to the created IAM Role and edit the GetCertificatesPolicy and GetSecretsPolicy with the additional ARNs, after you repeat Steps 1-5.
Open CloudGuard AppSec 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.