Generate and deploy an X-AEM-Edge-Key in AEMaaCS
This article provides step-by-step instructions to generate, configure, and deploy the X-AEM-Edge-Key for an Adobe Experience Manager as a Cloud Service environment. It also explains how to use the key across multiple domains and deploy it through Cloud Manager.
Description description
Environment
Adobe Experience Manager as a Cloud Service (AEMaaCS) (all versions)
Issue/Symptoms
- Need to configure the X-AEM-Edge-Key for a new staging or non-production environment.
- Uncertainty about using the same edge key for multiple domains within the same environment.
- The Config deployment option is not visible when creating a Non-Production pipeline in Cloud Manager, preventing deployment of the required CDN configuration.
Cause
The customer manages the X-AEM-Edge-Key and must configure and deploy it through a Config pipeline in Cloud Manager. Only one Config pipeline is allowed per environment, and the key applies to the environment instead of individual domains.
Resolution resolution
Follow these steps to resolve the issue:
-
Generate the X-AEM-Edge-Key:
- Use a secure random generator to create a 32-byte hexadecimal string. For example:
openssl rand -hex 32 - Use the generated value as your X-AEM-Edge-Key.
- Use a secure random generator to create a 32-byte hexadecimal string. For example:
-
Create a secret environment variable in Cloud Manager:
- In Cloud Manager, add a secret environment variable, such as
CDN_EDGEKEY_<date>, to the target environment. - Set its value to the generated edge key.
- In Cloud Manager, add a secret environment variable, such as
-
Reference the secret in the CDN configuration:
- In your repository, add or update the CDN configuration file at the appropriate configuration path, such as
config/staging/cdn.yaml. - Reference the secret variable in the YAML file. For example:
edgeKey1: ${{CDN_EDGEKEY_<date>}}
- In your repository, add or update the CDN configuration file at the appropriate configuration path, such as
-
Deploy the CDN configuration through a Config pipeline: Note: Only one Config pipeline can exist per environment. If the Config option isn’t visible, check whether a Config pipeline already targets the environment. If no Config pipeline exists, contact Adobe Support to enable the option.
-
In Cloud Manager, confirm that a Config pipeline targets the environment.
-
If a Config pipeline already exists, edit it to use the following settings:
- Repository: Your AEM repository
- Branch: Your development branch, such as
dev - Code location:
configor the appropriate subfolder
-
Run the pipeline to deploy the
cdn.yamlconfiguration to the Adobe CDN
-
-
Configure the external CDN:
-
Set the following headers when you forward traffic to the publish instance:
Host: Your publish instance hostnameX-Forwarded-Host: Your domainX-AEM-Edge-Key: The generated edge key
-
-
Verify the configuration:
- After deployment, confirm that requests forwarded from the external CDN to AEM include the correct
X-AEM-Edge-Key. - Confirm that the Adobe CDN accepts the requests.
- After deployment, confirm that requests forwarded from the external CDN to AEM include the correct