Hi @Christian Hyltoft ,
As said above that, I understand that you would like to setup container-per-tenant model for multi-tenancy in Azure Blob Storage, to make sure that complete data isolation and scalability.
Deploying a dedicated storage account for each tenant offers the highest level of isolation. This ensures that all storage keys are isolated and can be rotated independently. This method allows you to scale your solution to avoid the limits and quotas of each storage account. However, you must also consider the maximum number of storage accounts that can be deployed in a single Azure subscription.
In order to setup a container-per-tenant model in Azure Blob Storage for secure multi tenancy, please follow the below steps:
- Create a dedicated blob container for each tenant within your Azure Storage account. Azure supports the creation of multiple blob containers without a specific limit, which helps in isolating tenant data. Name the container (e.g.,
tenant1-container
,tenant2-container
) and set the Access level to "Private" and repeat for each tenant. - Then configure the Authentication and Authorization, please make sure to assign Azure roles (e.g.,
Storage Blob Data Contributor
orStorage Blob Data Reader
) to tenant-specific users or service principals, scoped to their containers. And, using Azure Storage access controls, like Shared Access Signatures (SAS), which helps to manage and restrict access to each tenant's blob container. This ensures only authorized users can access their data. Also, set expiration times for enhanced security. - Also, implement monitoring to track the usage and performance of each container. This will help manage resources effectively and ensure the security and isolation of each tenant's data. Also, when working with a multitenant solution, consider if you need to measure the consumption for each tenant, and define the specific metrics to track, such as the storage capacity used by each tenant or the number of operations performed on each tenant's data. You can also use cost allocation to monitor the cost of each tenant's usage and enable chargeback across multiple subscriptions.
- To have cost optimization use Life Cycle Mangement policies to automatically move blobs to lower cost tiers such as cool or Archive based on the access patterns.
- Also, please be aware of the storage limits, for a single storage account we can have up to 500TB of data.
Please refer the below documentation for more information and best practices:
- Multitenancy and Azure Storage
- Architectural approaches for storage and data in multitenant solutions.
I hope by following the above will help in implement a container-per-tenant model in Azure Blob Storage.
Please let us know in the comments below, if the issue is resolved or still persists. We will be glad to assist you closely.
Please do consider to “up-vote” wherever the information provided helps you, this can be beneficial to other community members.