External content stores
Hybrid assets store their content outside of Magnolia in external content stores. External content stores take care reading asset content when needed and writing asset content when a hybrid asset is created or updated.
External asset content stores don’t decide where the content of asset will be stored, the reference factory decides where the asset content will be stored when it generates the content storage URL for an asset.
You can create multiple extern content stores. You can configure your content stores to store some asset content and reject other asset content. This is done with the content storage URL; an external content store is allowed to decide if can store the asset content for a given content storage URL.
An external content store will have:
-
a name and description
-
credentials configuration -operational configuration
The configuration of an external asset content store is described below.
Selecting an external content store
Since you can define more than one external content stores, the Hybrid Assets module must choose one external content store to store the hybrid asset content.
Each content store has a check to if it can handle a storage URL:
boolean accepts(final String reference);
When the content of a hybrid asset needs to be read or written, the Hybrid Asset finds the first external content store that accepts the content storage URL and uses that content store to read or write the hybrid asset content.
Be careful when defining more than one content store that can handle the same storage URLs: changing the order of content store definitions could inadvertently make hybrid asset unavailable. |
Configuring external content stores
External content stores are configured as part of the Hybrid Assets module. Content stores are configured at Configuration > /modules/hybrid-assets/config/stores
.
S3 external content store
The Hybrid Assets module includes an S3 external content store, which also works with S3 compatible storage: info.magnolia.dam.hybrid.store.S3AssetStore
.
Here are the configurable properties of a S3 external content store:
Property | Description | ||
---|---|---|---|
|
required Must be |
||
|
required The name of the external content store. |
||
|
required Set to |
||
|
optional A brief description of the external content store. |
||
|
required A Java regular expression, the external content stores whose referencePattern match the storage URL of a hybrid asset may be used to content. |
||
|
optional The buffering policy when reading or writing content to S3. Valid values:
|
||
|
optional The maximum buffer size in bytes. The default is |
||
|
optional If If
|
||
|
optional The maximum time in milliseconds a cached S3 will be kept. Connections older than The default value is |
Azure external content store
The Hybrid Assets module also supports to work with external Azure content storage: info.magnolia.dam.hybrid.store.AzureAssetStore
.
Here are the configurable properties of a Azure external content store:
Property | Description |
---|---|
|
required Must be |
|
required Set to |
|
optional A brief description of the external content store. |
|
required Base URL to build connection string to REST API. |
|
required The endpoint suffix to Azure storage. |
|
required Azure account name. |
|
required Azure container name. |
|
required Max results per request, default is 10. |
|
required Expiration time for token when getting blob url, default value is 1 hour. |
|
required The SAS can only be used over HTTPS, default value is 'https'. |
|
required Specifies the version of the service. |
|
required Grants read, write, delete, list, add, create, update, and process permissions. |
|
required Signed start time. |
|
required Signed expiry time. |
|
optional Grants access to service, container, and object. |
|
optional Grants access to service, container, and object. |
|
optional Grants access to the Blob service. |
|
optional More parameters that are optional and can be put in a dynamic requestParams configuration. |