401 Unauthorized error occurs during functional testing on AEM as a Cloud Service
A 401 Unauthorized error occurs during functional tests on AEM as a Cloud Service because Dispatcher uses unsupported Basic authentication. To resolve this, update authentication settings and use CDN-level Basic authentication for secure access.
Description description
Environment
- Product: Adobe Experience Manager as a Cloud Service (AEMaaCS)
- Constraints: Dispatcher configured with Basic authentication; functional tests target content under
/content/test-site/
Issue/Symptoms
- Functional tests that create or delete test pages under
/content/test-site/result in 401 Unauthorized errors. - Logs show errors for requests targeting domains ending with
.netthat use special domain configurations. - Dispatcher includes some Basic authentication settings, but there are no explicit rules for
/content/test-site/. - This issue has been observed since initial environment setup and is not due to recent changes in configuration files.
Resolution resolution
Note: Basic authentication via Dispatcher is not supported for production author or publish environments in AEM as a Cloud Service. Use CDN-level controls instead.
- Review the current Dispatcher configuration in your Cloud Manager pipeline and identify any Basic authentication settings.
- Refer to Authentication in AEM as a Cloud Service for supported authentication methods in AEM as a Cloud Service, focusing on CDN layer-based Basic authentication.
- If functional testing requires access control, configure CDN-level Basic authentication instead of relying on Dispatcher-based settings. Refer to Configuring CDN Credentials and Authentication.
- Explicitly add an exclusion or adjustment in the CDN configuration for
/content/test-site/if access is required during testing. - After updating the CDN or relevant access control settings, rerun the functional tests targeting
/content/test-site/. - Verify that requests complete successfully without returning 401 Unauthorized errors.
For further details on supported authentication approaches, consult Adobe Experience Manager documentation regarding CDN-based access control and credentials management.
recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f