Configure the DAM connector in Sitecore
How to enable the Insert from Sitecore DAM function in the Sitecore Connect for Content Hub connector
The Sitecore Connect for Content Hub (SCCH) installation adds the Insert from Sitecore DAM item to the Rich Text Default profile for the Rich Text Editor. To enable the Insert from Sitecore DAM function, you must configure a connection to the Sitecore Digital Asset Management (DAM) part of the SCCH connector.
To configure the connection to Sitecore DAM in Sitecore:
Open the
C:\inetpub\<site>\App_Config\ConnectionStrings.config
file, and add the following connection strings:<add name="DAM.ContentHub" connectionString="ClientId={client_id};ClientSecret={client_secret};UserName={username};Password={password};URI={uri};" /> <add name="DAM.SearchPage" connectionString="<Sitecore Content Hub search page URI>" /> <add name="DAM.ExternalRedirectKey" connectionString="Sitecore" />
Substitute the placeholders in the example with the values from this table:
Placeholder
Value
Sitecore Content Hub URI
The URI for your Sitecore Content Hub DAM instance, for example,
https://dam-connector.stylelabs.qa.com
.Sitecore Content Hub search page URI
The URI for the page that opens the DAM in an IFrame. For example,
<Sitecore Content Hub DAM URI>/en-us/sitecore-dam-connect/approved-assets
.Note
The user account using the connector must have read access to the connector pages in Sitecore DAM.
Save the changes.
In the root folder (by default,
wwwroot
), open theweb.config
file. Make sure the URL of the Content Hub instance (for example,content-hub-url.stylelabs.com
), other delivery hostnames (for example,content-hub-url-delivery.stylelabs.cloud
), and generated public links (for example,content-hub-url.stylelabs.com:8686
) are added as sources to theContent-Security-Policy
tag. For example:<add name="Content-Security-Policy" value="default-src 'self' 'unsafe-inline' 'unsafe-eval' https://apps.sitecore.net; img-src 'self' data https://content-hub-url.stylelabs.com/ https://content-hub-url-delivery.stylelabs.cloud/; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' 'unsafe-inline' https://fonts.gstatic.com; upgrade-insecure-requests; block-all-mixed-content; child-src 'self' https://content-hub-url.stylelabs.com/ https://content-hub-url-delivery.stylelabs.cloud/; connect-src 'self' https://content-hub-url.stylelabs.com/ https://content-hub-url-delivery.stylelabs.cloud/; media-src https://content-hub-url.stylelabs.com/ https://content-hub-url-delivery.stylelabs.cloud/;" />
Note
In Content Hub, you can configure different delivery hostnames for public links by using the
AssetExtensionDataConfigurationSetting
setting.If you have configured different hostnames, you must add all the hostnames as sources. You do this in the
Content-Security-Policy
parameter, in theimg-src
,child-src
andconnect-src
properties.The Insert from Sitecore DAM icon
is now available in the Rich Text Editor for fields that use the Rich Text Default profile. If you want to access DAM assets in profiles other than Rich Text Default:
In the Core database, navigate to /sitecore/system/Settings/Html Editor Profiles/Rich Text Default/Toolbar 1.
Copy the Insert from Sitecore DAM item.
Navigate to the Rich Text Editor profile you intend to use, and paste the Insert from Sitecore DAM item.