Use Connected Assets to share DAM assets in AEM Sites
In large enterprises the infrastructure required to create websites may be distributed. At times the website creation capabilities and digital assets used to create these websites may reside in different deployments. A few reasons can be geographically distributed existing deployments that are required to work in tandem or acquisitions leading to heterogenous infrastructure that the parent company wants to use together.
AEM Sites offers capabilities to create web pages and AEM Assets is the Digital Asset Management (DAM) system that supplies the required assets for websites. AEM now supports the above use case by integrating AEM Sites and AEM Assets.
Overview of Connected Assets
When editing pages in Page Editor, the authors can seamlessly search, browse, and embed assets from a different AEM Assets deployment. To do an AEM administrator do a one-time integration of a local deployment of AEM Sites with a different (remote) deployment of AEM Assets.
For the Sites authors, the remote assets are available as read-only local assets. The functionality supports seamless search and use of a few remote assets at a time. To make many remote assets available on local deployment in one-go, consider migrating the assets in bulk. See Assets migration guide .
Prerequisites and supported deployments
Before you use or configure this capability, ensure the following:
- The users are part of appropriate user groups on each deployment.
- For Adobe Experience Manager deployment types, one of the supported criterion is met. AEM 6.5 Assets works with AEM as a Cloud Service. For more information, see Connected Assets functionality in AEM as a Cloud Service .AEM Sites as a Cloud ServiceAEM 6.5 Sites on AMSAEM 6.5 Sites on-premiseAEM Assets as a Cloud ServiceSupportedSupportedSupportedAEM 6.5 Assets on AMSSupportedSupportedSupportedAEM 6.5 Assets on-premiseNot SupportedNot SupportedNot Supported
Supported file formats
Authors can search for images and the following types of documents in Content Finder and use the searched assets in Page Editor. Documents can be added to the Download component and images can be added to the Image component. Authors can also add the remote assets in any custom AEM component that extends the default Download or Image components. The list of supported formats are:
Users and groups involved
The various roles that are involved to configure and use the capability and their corresponding user groups are described below. Local scope is used for the use case where a web page is created by an author. Remote scope is used for the DAM deployment hosting the required assets. The Sites author fetches these remote assets.
User name in walk-through
AEM Sites Administrator
Set up AEM, configure integration with the remote Assets deployment.
Used to view and duplicate the fetched assets at /content/DAM/connectedassets/ .
AEM Sites author
Author (with read access on the remote DAM and author access on local Sites)
End user are Sites authors who use this integration to improve their content velocity. The authors search and browse assets in remote DAM using Content Finder and using the required images in local web pages. The credentials of ksaner DAM user are used.
AEM Assets administrator
admin on remote AEM
Configure Cross-Origin Resource Sharing (CORS).
ksaner on remote AEM
Author role on the remote AEM deployment. Search and browse assets in Connected Assets using the Content Finder.
DAM distributor (technical user)
package-builders and site authors
ksaner on remote AEM
This user present on the remote deployment is used by AEM local server (not the Site author role) to fetch the remote assets, on behalf of Sites author. This role is not same as above two ksaner roles and belongs to a different user group.
Configure a connection between Sites and Assets deployments
An AEM administrator can create this integration. Once created, the permissions required to use it are established via user groups that are defined on the Sites deployment and on the DAM deployment.
To configure Connected Assets and local Sites connectivity, follow these steps.
- Access an existing AEM Sites deployment or create a deployment using the following command:
- In the folder of the JAR file, execute the following command on a terminal to create each AEM server. java -XX:MaxPermSize=768m -Xmx4096m -jar <quickstart jar filepath> -r samplecontent -p 4502 -nofork -gui -nointeractive &
- After a few minutes, the AEM server starts successfully. Consider this AEM Sites deployment as the local machine for web page authoring, say at https://[local_sites]:4502 .
- Ensure that the users and roles with local scope exist on the AEM Sites deployment and on the AEM Assets deployment on AMS. Create a technical user on Assets deployment and add to the user group mentioned in users and groups involved .
- Access the local AEM Sites deployment at https://[local_sites]:4502 . Click Tools > Assets > Connected Assets Configuration and provide the following values:
Figure: A typical configuration for Connected Assets
- AEM Assets location is https://[assets_servername_ams]:[port] .
- Credentials of a DAM distributor (technical user).
- In Mount Point field, enter the local AEM path where AEM fetches the assets. For example, remoteassets folder.
- Adjust the values of Original Binary transfer optimization Threshold depending on your network. An asset rendition with a size that is greater than this threshold, is transferred asynchronously.
- Select Datastore Shared with Connected Assets , if you use a datastore to store your assets and the Datastore is the common storage between both AEM deployments. In this case, the threshold limit does not matter as actual asset binaries reside on the datastore and are not transferred.
- As the assets are already processed and the renditions are fetched, disable the workflow launchers. Adjust the launcher configurations on the local (AEM Sites) deployment to exclude the connectedassets folder, in which the remote assets are fetched.
BeforeAfter/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/metadataAll renditions that are available on the remote AEM deployment are fetched, when authors fetch an asset. If you want to create more renditions of a fetched asset, skip this configuration step. The DAM Update Asset workflow gets triggered and creates more renditions. These renditions are available only on the local Sites deployment and not on the remote DAM deployment.
- On AEM Sites deployment, click 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 .
- Add the AEM Sites instance as one of the Allowed Origins on the remote AEM Assets' CORS configuration.
- Login using the administrator credentials. Search for Cross-Origin. Access Tools > Operations > Web Console .
- To create a CORS configuration for AEM Sites instance, click icon next to Adobe Granite Cross-Origin Resource Sharing Policy .
- In the field Allowed Origins , input the URL of the local Sites, that is, https://[local_sites]:[port] . Save the configuration.
Use remote assets
The website authors use Content Finder to connect to the DAM instance. The authors can browse, search for, and drag the remote assets in a component. To authenticate to the remote DAM, keep the credentials of the DAM user provided by your administrator handy.
Authors can use the assets available on both, the local DAM and the remote DAM instances, in a single web page. Use the Content Finder to switch between searching the local DAM or searching the remote DAM.
Only those tags of remote assets are fetched that have an exact corresponding tag—with the same taxonomy hierarchy—available on the local Sites instance. Any other tags are discarded. Authors can search for remote assets using all the tags present on the remote AEM deployment, as AEM offers a full-text search.
Walk-through of usage
Use the above setup to try the authoring experience to understand how the functionality works. Use documents or images of your choice on the remote DAM deployment.
- Navigate to the Assets UI on the remote deployment by accessing Assets > Files from AEM workspace. Alternatively, access https://[assets_servername_ams]:[port]/assets.html/content/dam in a browser. Upload the assets of your choice.
- On the Sites instance, in the profile activator in the upper-right corner, click Impersonate as . Provide ksaner as user name, select the option provided, and click OK .
- Open a We.Retail website page at Sites > We.Retail > us > en . Edit the page. Alternatively, access https://[aem_server]:[port]/editor.html/content/we-retail/us/en/men.html in a browser to edit a page.Click Toggle Side Panel on upper-left corner of the page.
- Open the Assets tab and click Log in to Connected Assets .
- Provide the credentials -- ksaner as user name and password as password. This user has authoring permissions on both the AEM deployments.
- Search for the asset that you added to DAM. The remote assets are displayed in the left panel. Filter for images or documents and further filter for types of supported documents. Drag the images on an Image component and documents on a Download component.The fetched assets are read-only on the local AEM Sites deployment. You can still use the options provided by your AEM Sites components to edit the fetched asset. The editing by components is non-destructive.Figure: Options to filter document types and images when searching assets on remote DAM
- A site author is notified if an asset is fetched asynchronously and if any fetch task fails. While authoring or even after authoring, the authors can see detailed information about fetch tasks and errors in the async jobs user interface.Figure: Notification about asynchronous fetching of assets that happens in the background
- When publishing a page, AEM displays a complete list of assets that are used in the page. Ensure that the remote assets are fetched successfully at the time of publishing. To check the status of each fetched asset, see async jobs user interface.Even if one or more remote assets are not fetched, the page is published. The component using the remote asset is published empty. The AEM notification area displays notification for errors that show in async jobs page.
Once used in a web page, the fetched remote assets are searchable and usable by anyone who has permissions to access the local folder where the fetched assets are stored ( connectedassets in the above walk-through). The assets are also searchable and visible in the local repository via Content Finder.
The fetched assets can be used as any other local asset, except that the associated metadata cannot be edited.
Permissions and managing assets
- Local assets are not synchronized with the original assets on the remote deployment. Any edits, deletions, or revoking of permissions on the DAM deployment are not propagated downstream.
- Local assets are read-only copies. AEM components do non-destructive edits to assets. No other edits are allowed.
- Locally fetched assets are available for authoring purposes only. Asset update workflows cannot be applied and metadata cannot be edited.
- Only images and the listed document formats are supported. Dynamic Media assets, 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 deployment.
- No API support to customize the integration.
- The functionality supports seamless search and use of remote assets. To make many remote assets available on local deployment in one-go, consider migrating the assets. See Assets migration guide .
- It is not possible to use a remote asset as a page thumbnail on Page Properties user interface. You can set a thumbnail of a web page in Page Properties user interface from the Thumbnail by clicking Select Image.
Set up and licensing
- AEM Assets deployment on AMS is supported.
- AEM Sites can connect to a single AEM Assets repository at a time.
- A license of AEM Assets working as remote repository.
- One or more licenses of AEM Sites working as local authoring deployment.
- Only functionality supported is searching for remote assets and dragging the remote assets on local page to author content.
- Fetch operation times out after 5 seconds. Authors can have issues fetching assets, say if there are network issues. Authors can re-attempt by dragging the remote asset from Content Finder to Page Editor.
- Simple edits that are non-destructive and the edit supported via the AEM Image component, can be done on fetched assets. Assets are read-only.
Follow these steps to troubleshoot for the common error scenarios:
- If you cannot search for remote assets from the Content Finder, re-check and ensure that the required roles and permissions are in place.
- An asset fetched from remote dam may not be published on a web page for the following reasons: it doesn't exist on remote; lack of appropriate permissions to fetch it; network failure. Ensure that the asset is not removed from the remote DAM or permissions aren't changed; ensure that appropriate prerequisites are met; retry adding the asset to the page and republish. Check the list of asynchronous jobs for errors in asset fetching.