How to isolate each tenant's data in a multi-tenant SAAS application in Azure?

AMBAR RAY 1 Reputation point
2024-08-21T14:03:49.3+00:00

We are going to design a multi-tenant SAAS application to be hosted in Azure. How to isolate each tenant's data such that all tenant specific data are available to the appropriate tenant? Please give some good pointers how to go about the overall design.

Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Givary-MSFT 35,626 Reputation points Microsoft Employee Moderator
    2024-08-27T05:13:31.8033333+00:00

    @AMBAR RAY Thank you for reaching out to us, as this is more of design ask adding Azure SQL DB tag as well for more visibility and inputs on your requirement.

    Designing a multi-tenant SAAS application in Azure requires careful consideration of data isolation and security. Here are some pointers to help you get started:

    1. Use a separate database for each tenant: One of the most common approaches to data isolation is to use a separate database for each tenant. This ensures that each tenant's data is completely isolated from other tenants. You can use Azure SQL Database or Azure Cosmos DB to create separate databases for each tenant.
    2. Use a tenant identifier: To ensure that each tenant's data is stored in the correct database, you should use a tenant identifier. This identifier can be a unique ID or a domain name associated with each tenant. You can use this identifier to route requests to the appropriate database.
    3. Use Azure Active Directory/Entra ID for authentication and authorization: Azure Active Directory (Azure AD) provides a secure and scalable way to manage authentication and authorization for your SAAS application. You can use Azure AD to authenticate users and authorize access to tenant-specific data.
    4. Use Azure Key Vault for secrets management: Azure Key Vault provides a secure way to store and manage secrets such as connection strings, API keys, and certificates. You can use Azure Key Vault to store tenant-specific secrets and ensure that they are only accessible to the appropriate tenant.
    5. Use Azure Storage for tenant-specific files: If your SAAS application requires storing files such as images or documents, you can use Azure Storage to store tenant-specific files. You can create a separate container for each tenant and ensure that each tenant can only access their own container.
    6. Use Azure Virtual Networks for network isolation: Azure Virtual Networks provide a way to isolate your SAAS application's network traffic from other Azure resources. You can create a separate virtual network for each tenant and ensure that each tenant's resources are only accessible within their own virtual network.
    7. Use Azure Policy for governance: Azure Policy provides a way to enforce governance policies across your SAAS application. You can use Azure Policy to ensure that each tenant's resources are compliant with your organization's policies and standards.

    Reference links:

    https://learn.microsoft.com/en-us/azure/azure-sql/database/saas-tenancy-app-design-patterns?view=azuresql

    https://www.youtube.com/watch?v=dd7W_kMh-z4

    https://www.youtube.com/watch?v=FhUuT2YgEEU

    Let me know if you have any further questions, feel free to post back.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.