Connected Assets – AEM 6.5

Connected assets is  a long awaited feature by many enterprise customers of AEM. Customers that have their separate central DAM (Digital asset Management) for assets and different instance for Sites. Connected assets also called as remote dam allows seamless access to a centralized DAM for search, drag & drop, save and publish remote assets from your AEM sites instance.

Connected Assets feature is well suited for both AMS hosted instances as well as on premise instance, for this tutorial i am going to use on premise instances.

In this tutorial we will see :-

Connected Assets Overview:-

connected-assets-aem-overview

Connected assets simply means accessing assets (image only) stored in remote instance on your site instance where content author can drag and drop them from content finder bar onto the page.

Prerequisites:-

Before you use or configure connected assets capability, ensure that following prerequisite are met:

  • An AEM Assets 6.5 instance running on AMS or on premise.
  • One of more licenses of AEM Sites 6.5 running on AMS or on premise.
  • The users are part of the appropriate user groups on each instance.

What customer problem Connected Assets solves:-

Till AEM 6.5 sites authors did not have seamless access to a Connected DAM to discover, use and publish assets from AEM. Connected asset or remote dam feature allows sites author to login to connected assets from the Content Finder panel in AEM Page Editor, and allows page/content editors to search, drag & drop, save and publish remote assets by creating a local copy of remote asset.

Integrate Connected Assets instance in AEM

Follow below steps to integrate Asset instance with your Site instance in AEM:-

  • Set up two AEM instances one for Site and one for Asset. Run below command to start an AEM instance
  • In the folder of the JAR file, execute the following command on a terminal to create each AEM instance.

java -Xmx4096m -jar -p 4502

Note:- For this tutorial i have started two author instance on below ports:-

  • localhost:4502 —> Site Instance
  • localhost:4504 —> Asset Instance
  • Navigate to Asset Instance and create one user , which will be used on site instance to access assets from remote dam instance.
  • For better understanding i am creating this user by name remotedamuser and it should be part of DAM Users group.
  • Access the local AEM Sites instance at http://localhost:4502
  • Navigate to Tools > Assets > Connected Assets Configuration
connected-asset-configuration
  • Configure below values:-
    • Title – connectedAssetDemo
    • Connected Asset URL – http://localhost:4504
    • Username – remotedamuser
    • Password – <password for remotedamuser >
    • Mount Point – connectedassets ( If you want to keep assets at inner level you can give path like connectedassets/< yourfolder name>)
    • Original Binary transfer Optimization Threshold – Default is 100
Connected-Assets-Configurations-aem
  • Click on Test button to test site instance connection with Remote DAM instance
validate-connected-asset-connection
  • Click on Save button to save your configuration.

Disable Launcher for connected assets folder in Site Instance:-

  • As Assets are already processed on remote asset instance and renditions are generated. We need to disable launcher for asstes inside mount point folder( connected assets).
  • Navigate to Tools > Workflow > Launchers.
  • Search for Launchers with workflows as DAM Update Asset and DAM Metadata Writeback.
  • Select the workflow launcher and click Properties on the action bar.
  • In the Properties wizard, change the Path fields as the following mappings to update their regular expressions to exclude the mount point connectedassets.
update-dam-asset-workflow
  • Click on Save and Close button.
Before After
/content/dam(/((?!/subassets).)*/)renditions/original /content/dam(/((?!/subassets)(?!connectedassets).)*/)renditions/original
/content/dam(/.*/)renditions/original /content/dam(/((?!connectedassets).)
*/)renditions/original
/content/dam(/.*)/jcr:content/metadata /content/dam(/((?!connectedassets).)*/)jcr:content/metadata

Note:- These are default launcher configurations scripts, but feel free to change it as per your project requirements.

Update CORS Configuration on Remote Asset Instance:-

We need to add AEM Sites instance as one of the Allowed Origins on the remote AEM Asset’s CORS configuration.

  1. Access https://[dam]:[port]/system/console/configMgr in a browser.
  2. Login using the administrator credentials. Search for Cross-Origin.
  3. To create a CORS configuration for AEM Sites instance, click  icon next to Adobe Granite Cross-Origin Resource Sharing Policy.
  4. In the field Allowed Origins, input the URL of the local Sites, that is, http://[local_sites]:4502.
  5. Save the configuration.
configure-cors-aem

Testing Connected Assets:-

Login as content author and navigate to any page on Site instance . For ex:-http://localhost:4502/editor.html/content/we-retail/us/en/women.html

  • Click on connected assets icon in content finder. You can see all assets from Remote asset instance.
testing-connected-assets
  • Drag and drop any image on image component.
  • As soon as you drag and drop the image on image component, it is fetched from remote dam instance and copied under connected assets folder in our site instance.
test-asset-site-instance-aem

Important Points to Note

Recently i got a chance to attend AEM Meetup 2019, Below are few of the questions that are asked during the session on connected asset and answered by the experts.

  • How Network structure is optimized to support assets from remote dam across geographical locations?
    • As per the test records, it took around 1 sec without noise to fetch 100 mb file without original asset (only metadata and renditions ) asynchronously and 10 sec with noise.
  • Does connected DAM supports both upstream and downstream? Means can we upload asset to third party like adobe stock from sites instance or it can only download from remote instance?
    • Currently it can only supports downstream means we can only download remote assets, upload is not supported.
  • How connected asset is different from dynamic media in aem?
    • Connected assets is used for authoring where as dynamics media is used as a means for delivering content.
  • When connected asset creates local copy of asset ? When as soon as we we see them in content finder or when we drag and drop them onto the page?
    • Local copy of assets is created when we drag and drop the asset on the page.
  • How custom rendition are handled in case of connected assets on site instance?
    • We can restrict custom renditions by modifying the launchers for DAM Update Asset and DAM Metadata Writeback under Tools > Workflow > Launchers.
  • If i move an connected asset local copy from one place to another then will it update all page reference of all image reference?
    • Yes it will update all existing image references on the pages.

More topics covered during Meet up

Limitations

  • Local assets are not synchronized with the original assets on the remote instance. Any edits, deletions, or revoking of permissions on the DAM instance are not propagated downstream.
  • Local assets are read-only copies. Only non-destructive edits are permitted that are allowed by the Sites components.
  • Locally fetched assets are available for authoring purposes only. Asset update workflows cannot be applied and metadata cannot be edited.
  • Only image formats are supported. Dynamic Media, documents, content fragments, and experience fragments are not supported.
  • Metadata schemas are not fetched.
  • All Sites Authors have read permissions on the fetched copies, even if they do not have access to the remote DAM instance.
  • No API support to customize the integration.

Spread the love

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.