You're viewing help content for version:

Use assets available on a remote AEM Assets instance when creating your web pages.

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 instances required to work in tandem; acquisitions leading to heterogenous infrastructure that parent company wants to consolidate; growth leading to such scale that dedicated instance is required for asset management.

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

AEM now provides capability to use assets from a DAM repository in websites created on separate AEM instances. While editing pages in Page Editor, the authors can seamlessly search, browse, and embed assets from a different AEM Assets instance.

You can integrate your local instances of AEM Sites with a different (remote) instance of AEM Assets. Your authors can browse, search for, and use assets just as they do for local instance of Assets. AEM Administrators create an integration between the two instances once and users continue to use it seasmlessly. A few limitations and the prerequisites are called out in this article.

For the Sites authors, the remote assets continue to be available and behave as read-only local assets.

Prerequisites

Before you use or configure this capability, ensure the following:

  • An AEM 6.5 Assets instance on AMS.
  • AEM 6.5 Sites instance on AMS or an on-premise instance.
  • The users are part of appropriate user groups on each instance.

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 instance hosting the required assets to be fetched by Sites author.

Role
Scope User group User name in walkthrough Requirement
AEM Sites administrator
Local AEM Administrator admin Set up AEM, configure integration with the remote Assets instance.
DAM user Local Author ksaner Used to view and duplicate the fetched assets at /content/DAM/connectedassets/.
AEM Sites author Local Author (with read access on the remote DAM and author access on local Sites) ksaner End user who uses this integration to improve their content velocity, by searching and browsing 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 Remote AEM Administrator admin on remote AEM
Configure CORS.
DAM user
Remote Author ksaner on remote AEM
Author role on the remote AEM instance. Search and browse assets in Connected Assets using the Content Finder.
DAM distributor (technical user) Remote package-builders and site authors ksaner on remote AEM
This user present on the remote instance 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 instances

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 instances and on the DAM instance.

The step-by-step instructions to configure Connected Assets and local Sites connectivity are below.

  1. Access an existing AEM Sites instance or create a new one using the following command:

    1. In the folder of the JAR file, execute the following command on a terminal to create each AEM instance.
      java -XX:MaxPermSize=768m -Xmx4096m -jar <quickstart jar filepath> -r samplecontent -p 4502 -nofork -gui -nointeractive &
    2. After a few minutes, the AEM server starts successfully. Consider this AEM Sites instance as the local machine for web page authoring, say at http://[local_sites]:4502.
  2. Ensure that the users and roles with local scope exist on the AEM Sites instance and on the AEM Assets instance on AMS. Create a technical user on Assets instance and add to the user group mentioned in users and groups involved.

  3. Access the local AEM Sites instance at http://[local_sites]:4502. Click Tools > Assets > Connected Assets Configuration and provide the following values:

    1. AEM Assets location is https://[assets_servername_ams]:[port].
    2. Credentials of a DAM distributor (technical user).
    3. In Mount Point field, enter the local AEM path where AEM fetches the assets. For example, remoteassets folder.
    4. 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.
    A typical configuration for Connected Assets
    A typical configuration for Connected Assets
  4. As the assets are already processed and the renditions are fetched, disable the workflow launchers. Adjust the launcher configurations on the local (AEM Sites) instance to exclude the connectedassets folder, in which the remote assets are fetched.

    1. On AEM Sites instance, click Tools > Workflow > Launchers.
    2. Search for Launchers with workflows as DAM Update Asset and DAM Metadata Writeback.
    3. Select the workflow launcher and click Properties on the action bar.
    4. In the Properties wizard, change the Path fields as the following mappings to update their regular expressions to exclude the mount point connectedassets.
    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
  5. Add the AEM Sites instance as one of the Allowed Origins on the remote AEM Assets' 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. 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 use the remote assets by dragging and dropping 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 webpage. Use the Content Finder to switch between searching the local DAM or searching the remote DAM.

The tags applied on the remote assets are also fetched from Connected Assets and merged with the local taxonomy. When the fetched assets are published, the tags are published on the local Sites instance as well.

Walk-through of usage

Use the above setup to try this authoring experience using assets of your choice.

  1. Navigate to the Assets UI on the remote instance by accessing Assets > Files from AEM workspace. Alternatively, access http://[assets_servername_ams]:[port]/assets.html/content/dam in a browser. Upload the assets of your choice.

  2. 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.

  3. Open a We.Retail website page at Sites > We.Retail > us > en. Edit the page. Alternatively, access http://[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.

  4. Open the Assets tab and click Log in to Connected Assets to log in.

  5. Provide the credentials -- ksaner as user name and password as password. This user has authoring permissions on both the AEM instances.

  6. Search for the asset that you added to DAM. The remote assets are displayed in the left panel. Drag-and-drop the asset on an Image component.

    Connected Assets search results
    Connected Assets search results are displayed in side panel.
     Drag and drop DAM assets from an AEM instance in Sites page on a different AEM instance
    Drag and drop DAM assets from an AEM instance in Sites page on a different AEM instance
  7. While the fetched assets are read-only, you can tweak the options allowed by your Sites components to edit the asset used in the Sites component. Publish the page.

Caution:

Once used in any 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.

Limitations

Permissions and managing assets

  • 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.

Setup

  • An AEM Assets 6.5 instance running on AMS is supported.
  • AEM Sites can connect to a single AEM Assets repository at a time.

Licensing

  • A license of AEM Assets working as remote repository.
  • One or more licenses of AEM Sites working as local authoring instances.

Usage

  • Fetch operation times out after 5 seconds. Authors can have issues fetching assets, say if there are network issues. Authors can attempt again, by dragging and dropping 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.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy