Connected Assets/DAM Configuration

Kinjal P Darji
4 min readFeb 22, 2024

It was a bit challenging to find a sample configuration that can help me understanding the configuration required for connected Assets set up on AEMaaCS DAM and Sites instances. Hence, in this blog, I will be proving step by step configurations those I followed to use connected Assets on my AEMaaCS environments. Here I will refer DAM instance as the AEMaaCS environment where DAM is configured and assets are placed and Sites Instance as the AEMaaCS environment where we’ll be using the DAM assets.

DAM Instance configuration :

Step 1 : Check this group is available and ACLs are set up : connectedassets-assets-techaccts. Set up DAM distributor user group. It is combination of two groups — content-authors and connectedassets-assets-techaccts.

Step 2 : Administrators and dam-users group should be preconfigured.

Step 3 : Now, create a user on DAM instance. Let’s say it is — remotedamuser. Provide password and remember the same. And add this user as member of DAM-distributor, administrators, dam-users, connectedassets-assets-techaccts.

Step 4 : Do CORS configuration as below image. This may need more evaluation and unrequired configuration can be deleted. Code repository and code pipeline to deploy the same on intended DAM environment will be needed to proceed with this step. Considering AEMaaCS doesn’t allow system console access. This configuration will go in ui.config folder. I have done it for author run mode. The file name is — com.adobe.granite.cors.impl.CORSPolicyImpl~connectedassetstest.cfg.json

{
"supportedmethods":[
"GET",
"HEAD",
"POST",
"DELETE",
"PUT"
],
"alloworigin":[
"https://<<sites environment url>>"
],
"allowedpaths":[
"/content"
],
"supportedheaders":[
"Origin",
"Accept",
"X-Requested-With",
"Content-Type",
"Access-Control-Request-Method",
"Access-Control-Request-Headers",
"Authorization",
"CSRF-Token"
]
}

Step 5: Configure dispatcher for headers and clientheaders. However, this step may not be required for AEMaaCS author environment. The code changes will have to go through dispatcher deployment pipeline. Below are the changes those should be done.

In site-specific farm file (in available farms) add below lines in /headers.

 /headers {
...
"Access-Control-Allow-Origin"
"Access-Control-Expose-Headers"
"Access-Control-Max-Age"
"Access-Control-Allow-Credentials"
"Access-Control-Allow-Methods"
"Access-Control-Allow-Headers"
}

Also add below headers in site-specific clientheaders file.

"Origin"
"Access-Control-Request-Method"
"Access-Control-Request-Headers"

Step 6: Configure same site cookie attribute in Token authentication handler. File name is — com.day.crx.security.token.impl.impl.TokenAuthenticationHandler.cfg.json

{
"token.samesite.cookie.attr":"None"
}

Now, let’s set up Sites instance where DAM assets will be used.

Sites Instance Configuration :

Step 1 : Check this group exists and ACLs are set up : connectedassets-sites-techaccts. Create a user let’s say localdamuser and provide password. Remember the password for further configurations. Add this user as member of administrators, authors, dam-users and connectedassets-sites-techaccts.

Step 2 : Change workflow launcher path configuration for DAM metadata writeback with this /content/dam(/((?!connectedassets).)*/)jcr:content/metadata.

In AEMaaCS there’s no dam update asset workflow, hence, the other configurations may not be needed.

Step 3 : Go to Tools > Assets > Connected Assets Configurations and provide values as below. Mountpoint is the folder where DAM assets will be uploaded on the Sites instance.

Step 4 : Test the connection.

On DAM instance, go to Tools > Assets > Connected Assets — Configured Sites. Here there’ll be list of all the Sites instances to which the DAM instance is configured using connected assets.

Usage :

In sites instance, open any page for editing, toggle the side panel and click on Connected Assets Icon like below. You should be able to see the images from remote DAM here. Drag and drop the image on page. And then check Navigation > Assets > Files > connectedassets. Basically the path — /content/dam/connectedassets. The image that was used on the page will be uploaded here. Currently Images and documents can be shared using Connected Assets. There is no option shown for videos. Also, I could not find a way to sync all the images, only the images those are being used in the page are visible here.

More details can be found at — https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/assets/admin/use-assets-across-connected-assets-instances.html?lang=en

--

--

Kinjal P Darji

Hi, I am an AEM architect and a certified AWS Developer — Associate.