Ensure that your Microsoft Azure Cosmos DB accounts are configured to use Microsoft Entra ID for authentication rather than access keys. Microsoft Entra Authentication is a password-free mechanism that integrates with Microsoft Entra ID and incorporates Role-Based Access Control (RBAC) functionality.
Using access keys for authentication can result in serious security vulnerabilities due to the potential leakage of secrets to source control systems and their exposure to the public. To ensure optimal security, it is strongly recommended to use Microsoft Entra ID with managed identities to authorize access to Azure CosmosDB data plane. This method offers superior security and ease of use compared to access key authorization. Enabling and configuring Microsoft Entra Authentication allows connections via a user, service principal, or managed identity. Implementing Role-Based Access Control (RBAC) ensures that individuals are granted appropriate access to the necessary resources.
Note:
- Disabling key-based authentication prevents your Cosmos DB account from being used without the more secure Microsoft Entra ID authentication method. To ensure that key-based authentication is disabled for your Azure Cosmos DB accounts, see Disable Key-Based Authentication for Azure Cosmos DB Accounts.
- Ensure that your Azure Cosmos DB accounts are configured with system-assigned and/or user-assigned managed identities for secure authorization and authentication with other Azure cloud services and resources. For more details, see Use Managed Identities for Azure Cosmos DB Accounts.
Audit
To determine if Role-Based Access Control (RBAC) is configured for Azure CosmosDB data plane access, perform the following operations:
Getting the RBAC configuration for Azure Cosmos DB accounts using Microsoft Azure Portal is not currently supported.Remediation / Resolution
To ensure that Role-Based Access Control (RBAC) is configured for secure CosmosDB data plane access, perform the following operations:
Configuring Role-Based Access Control (RBAC) for Azure Cosmos DB accounts using Microsoft Azure Portal is not currently supported.References
- Azure Official Documentation
- Security in Azure Cosmos DB
- Use data plane role-based access control with Azure Cosmos DB for NoSQL
- Azure Command Line Interface (CLI) Documentation
- az account list
- az account set
- az cosmosdb list
- az cosmosdb show
- az cosmosdb sql role definition list
- az cosmosdb sql role assignment list
- az cosmosdb sql role assignment create