Configure the DAM Azure Blob submodule
To store asset binaries in Azure Blob Storage, configure the DAM Azure Blob module to connect Magnolia to your Azure Blob Storage account.
Asset metadata is stored in the dam JCR workspace.
To configure the module, you must:
-
Install the required module versions.
-
Set up Azure Blob Storage account permissions.
-
Provide connection credentials for Azure Blob Storage.
Prerequisites
Make sure you have at least the following modules installed:
-
dam6.0.0, including thedam-azure-blobsubmodule -
Optional:
image-recognition4.0.0
Azure Storage account permissions
Minimum required permissions
To use Magnolia DAM with Azure Blob Storage, the following permissions are required.
-
Blob Data Contributorrole or equivalent permissions for: -
Read blob content
-
Write blob content
-
Delete blob content
-
List blob containers
For more details, see Authorize access to Azure Blob Storage.
| Your Azure Storage account must have blob versioning enabled if you want to maintain version history. For more details, see Blob versioning. |
Configure the dam-azure-blob module
-
Stop Magnolia.
-
Provide the following required properties, either in your
WEB-INF/config/default/magnolia.propertiesfile or using MicroProfile Config.magnolia.propertiesdam.core.binary.strategy=azure-blob (1) dam.core.binary.azure-blob.container-name=<container-name> (2)1 The binary storage strategy azure-blob.2 The name of the Azure Blob Storage container where you store your asset binaries. -
Choose one of the following authentication methods:
Provide the connection string that contains the credentials and endpoint information needed to connect to your Azure Storage account.
magnolia.propertiesdam.core.binary.azure-blob.connection-string=DefaultEndpointsProtocol=https;AccountName=<account-name>;AccountKey=<account-key>;EndpointSuffix=core.windows.net (1)1 The Azure Blob connection string that provides access to your storage account and blob containers. To obtain your connection string:
-
Go to the Azure Portal.
-
Navigate to your account’s settings.
-
Copy the connection string from either the primary or secondary access keys.
For more details, see Configure a connection string for an Azure storage account.
Provide the account name and account key separately.
magnolia.propertiesdam.core.binary.azure-blob.account-name=<account-name> dam.core.binary.azure-blob.account-key=<account-key>To obtain your account name and key:
-
Go to the Azure Portal.
-
Navigate to your account’s settings.
-
Copy the account name and either the primary or secondary key.
-
-
Restart Magnolia.
Avoid editing assets on public instances when using Azure Blob Storage
Editing or replacing assets on a public instance can corrupt Azure Blob Storage binaries. Always make changes on the author instance.
When Azure Blob Storage binary storage is enabled, updating or replacing an asset on a public instance deletes the asset binaries and leaves the asset in a broken state. Subsequent publication from the author instance propagates this corrupted state to public instances.
Ensure all asset changes are made on the author instance and published. Consider restricting access to the Assets app on public instances to prevent accidental edits.