X-AEM-Edge-Key misconfiguration causes CDN traffic failures

Traffic routed through a customer-managed CDN fails or gets denied when the X-AEM-Edge-Key isn’t configured correctly. Generate the key, configure it in Cloud Manager, reference it in cdn.yaml, and deploy it to restore traffic flow and avoid pipeline failures.

Description description

Environment

  • Adobe Experience Manager as a Cloud Service
  • Adobe Developer App Builder

Issue/Symptoms

  • CDN traffic is blocked or denied by the Adobe CDN.
  • Requests fail due to missing X-AEM-Edge-Key header.
  • Configuration pipeline fails due to missing environment secret.
  • Requests for the edge key are declined because self-service is required.

Cause

The X-AEM-Edge-Key is not generated, not stored as a Cloud Manager secret, incorrectly referenced in configuration, or not sent by the CDN, resulting in authentication failure.

Resolution resolution

To resolve this issue, follow these steps:

  1. Generate a secure key using a command such as:

    code language-none
    openssl rand -hex 32
    
  2. Create a secret environment variable in Cloud Manager with the generated key and set the type to Secret.

  3. Add or update the configuration file in the repository and reference the secret:

    code language-none
    kind: "CDN"
    version: "1"
    metadata:
      envTypes:
        - "dev"
        - "stage"
        - "prod"
    data:
      authentication:
        authenticators:
          - name: "edge-auth"
            type: "edge"
            edgeKey1: ${{CDN_EDGEKEY}}
    
  4. Run the configuration pipeline and confirm successful execution without errors.

  5. Configure the CDN to send required headers:

    • Origin domain set to the publish endpoint
    • Host header matching the origin
    • X-Forwarded-Host set to the public domain
    • X-AEM-Edge-Key set to the generated key
  6. Validate traffic by accessing the site through the CDN and confirming requests include the correct header.

recommendation-more-help
experience-cloud-kcs-help-kbarticles