Managing/auto-rotating Azure cosmos Db keys using Azure key vault

Saravanan Nakkeeran 1 Reputation point
2020-08-25T11:33:01.157+00:00

Does azure cosmos db and key vault provide ways using which the secret can be managed using keyvault similar to Azure Storage account overview-storage-keys-powershell?

Funcitonalities required are

  1. Onboarding a cosmos db account to keyvault and set it to auto rotate.
  2. Get sas key to access the cosmos db data.
Azure Key Vault
Azure Key Vault
An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.
1,144 questions
Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,469 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Saurabh Sharma 23,761 Reputation points Microsoft Employee
    2020-08-26T19:30:10.63+00:00

    @Saravanan Nakkeeran

    1. There is not inbuilt mechanism for achieving the same and you may write PowerShell scripting using the New-AzCosmosDBAccountKey cmdlet to auto rotate the keys periodically. Please refer to the documentation. You can also try checking tutorial for automating the rotation of secrets implementation for databases credentials.
    2. SAS keys are not supported to access cosmos db and cosmos db can be accessed using Keys only. Please provide this as a feedback at Uservoice.