Repository
universal-editor-service-proxy
This bundle provides a proxy to the Universal Editor Service (UES) to speed up the local development setup.
README
Universal Editor Service Proxy
This bundle provides a proxy to the Universal Editor Service (UES) to speed up the local development setup.
It proxies requests from the local AEM instance to a local running Universal Editor Service.
By this, users won't need to provide Authentication tokens or similar as requests will include AEM's login-token cookie for authentication as all calls (to Universal Editor Service as well as AEM) will have the same origin.
This works with AEMCS as well as AEM 6.5 local development instances.
!!!ONLY USE THIS ON YOUR LOCAL AEM SDK OR AEM 6.5 INSTANCE!!!
!!!DON'T PUT THIS INTO ANY PRODUCTION, STAGE, UAT OR AEM CLOUD SERVICE SETUP!!!
Prerequisites
- AEMCS >= 2025.2.x
- AEM 6.5 LTS SP 1
- AEM 6.5 SP23 or higher
Building this Package
mvn clean install
Install
- Build the bundle yourself
or
- Download the latest released bundle from https://github.com/adobe/universal-editor-service-proxy/releases/latest
And then
- Install the
core/target/universal-editor-service-proxy.core-*.jarfile directly into the Felix console http://localhost:4502/system/console/bundles.
Setting up the whole development environment
AEM SDK
- Ensure your AEM SDK is running on HTTPS. Either via AEM SSL configuration or a local https proxy.
- Basic OSGi setup
- Set
token.samesite.cookie.attr=Partitionedfor the OSGi config for com.day.crx.security.token.impl.impl.TokenAuthenticationHandler - See: https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/implementing/developing/universal-editor/developer-overview#samesite-cookies for more details.
- Remove
X-FRAME-Options=SAMEORIGINheader from the OSGi config for org.apache.sling.engine.impl.SlingMainServlet in case a AEM rendered page is used
- Set
Universal Editor Service
- Download the latest Universal Editor Service from Software Distribution
- Unzip the downloaded file
- Create a .env file or set following environment variables and run the service
export UES_TLS_REJECT_UNAUTHORIZED=false export UES_CORS_PRIVATE_NETWORK=true export UES_DISABLE_IMS_VALIDATION=true node universal-editor-service.cjs
More details can be found at Running Your Own Universal Editor Service
Universal Editor Service Proxy
- Download the JAR File from Releases
- Install the bundle into your local AEM instance
- Configure the
Universal Editor Service Proxy - USE ONLY ON SDKSservice if you run the Universal Editor Service elsewhere at http://localhost:4502/system/console/configMgr/
Instrument your page
- Do your normal required instrumentation on the page.
- Change the protocol to use
aem65instead ofaemas it will then also use the local AEM pickers- Change this
<meta name="urn:adobe:aue:system:aemconnection" content="aem:https://localhost:8443">to<meta name="urn:adobe:aue:system:aemconnection" content="aem65:https://localhost:8443">
- Change this
- Add a new service endpoint (**must be removed or adapted before pushing to production or any AEM Cloud instance)
- By adding following meta tag:
<meta name="urn:adobe:aue:config:service" content="https://localhost:8443/universal-editor">
- By adding following meta tag:
Run it
- Open the Universal Editor
- Paste your AEM URL or your external rendered URL into the Universal Editor
- Click on
Local Developer Loginin the header menu - Put your AEM credentials into the login form and submit
- Refresh the Page
Now you should see all requests going to AEM having the login-token cookie set.