The Azure Chat Solution Accelerator powered by Azure OpenAI Service allows organizations to deploy a private chat tenant with enhanced security and control over their data. One of the new features is the support for Managed Identities, adding a layer of security by eliminating the need for managing service principals and secrets through the application, and leveraging Azure's built-in role-based access controls.
Managed Identities for Azure resources provide the following benefits:
-
Improved Security:
- No Secret Management: Eliminates the need to manually store and manage credentials or keys.
- Automatic Rotation: Managed Identities’ credentials are rotated automatically, eliminating potential security risk from non-rotated credentials.
- Scope Limited Access: Access to Azure resources can be fine-grained, allowing least-privilege access policies.
-
Simplified Management:
- Platform Managed: The Azure platform handles identity creation and lifecycle management.
- Simplified Resource Access: Applications can request tokens to access resources without handling secrets.
The following services within the Azure Chat Solution Accelerator use Managed Identities for authentication:
- Azure OpenAI Service
- Azure Cosmos DB
- Azure AI Services (e.g., Document Intelligence, Azure OpenAI DALL-E)
- Azure AI Search Service
- Azure Storage Account
Note: Currently, due to compatibility issues, the Azure AI Speech Service does not utilize Managed Identities. There is no available documentation for using Entra ID authentication with the Speech Service, making it a
TODO
item.
Using Managed Identities is preferred for production deployments due to:
- Enhanced Security: Eliminates risks associated with secret management such as accidental exposure or non-rotation of credentials.
- Compliance and Governance: Managed Identities integrate with Azure's role-based access control (RBAC), facilitating easier audits and compliance management.
- Operational Efficiency: Reduces the operational overhead of managing secrets, while also providing a more straightforward implementation.
To deploy the application to Azure App Service with Managed Identities, follow the standard deployment instructions available in the Deploy to Azure - GitHub Actions section of the repository. Ensure to:
- Update the Parameter:
- Set the parameter
disableLocalAuth
totrue
ininfra/main.bicep
(orinfra/main.json
for ARM deployment) to use Managed Identities.
- Set the parameter
- Deploy as normal:
- refer to the README
- (Optional) Setup your local development environment:
- Run this script to grant yourself RBAC permissions on the Azure resources so you can run AzureChat locally
- In Powershell:
PS> .\scripts\appreg_setup.ps1
- You can now refer to the documentation to run Azure Chat locally.
By leveraging Managed Identities, you enhance the security posture of your Azure Chat deployment while simplifying secret management and access control. This guide outlines the security advantages and highlights the necessary parameter changes to ensure a secure and efficient production setup. For more details, review the complete code and configurations available in the repository's infra
directory.