AEM: HttpOnly and Secure attribute support for AMCV and AMCVS cookies

This article explains whether the Secure and HttpOnly attributes can be enabled for AMCV and AMCVS cookies in Adobe Experience Manager and provides Adobe’s recommendations for secure cookie configuration.

Description description

Environment

Adobe Experience Manager (all versions)

Issue/Symptoms

  • During security assessments, there may be recommendations to enable the Secure and HttpOnly flags on all application cookies.
  • Questions often arise about whether the HttpOnly attribute can be applied to the AMCV and AMCVS cookies set by the Adobe Experience Cloud Identity Service (ECID), and whether this would impact Experience Cloud or AEM functionality.

Cause

The AMCV and AMCVS cookies require client-side JavaScript access for core Experience Cloud Identity Service functionality. Setting the HttpOnly attribute would prevent this access and disrupt Experience Cloud features.

Resolution resolution

Follow the steps below to resolve the issue:

  1. Do not set the HttpOnly attribute on AMCV and AMCVS cookies, as they require JavaScript access for standard Adobe Experience Cloud functionality.
  2. Use the HttpOnly attribute for standard AEM, authentication, session, and application cookies wherever supported and compatible.
  3. Serve all website pages and relevant subdomains exclusively over HTTPS.
  4. Enable secureCookie: true in the Experience Cloud Identity Service implementation only when all relevant pages use HTTPS.
  5. Retain the default SameSite=Lax behavior unless cross-site or iframe functionality requires another setting. If SameSite=None is used, it must be combined with Secure.
  6. Apply your organization’s consent and privacy rules to Experience Cloud cookies, and prevent related Adobe libraries from loading before consent where required.

Verify that Experience Cloud features continue to function as expected after applying these recommendations.

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