This post has been republished via RSS; it originally appeared at: Azure SQL Database articles.
Azure SQL Transparent Data Encryption (TDE) with customer-managed keys enables customers to control the key lifecycle management, permissions and operations of keys stored in their own Azure Key Vault. We are announcing the public preview of TDE with customer-managed keys on Azure SQL Database Hyperscale.
Quick start instructions with Azure CLI
1. Assign Azure AD identity to your server.
- If it is a new server you are creating, then you can assign an AAD identity while creating it via az sql create
az sql server create --name <servername> --resource-group <rgname> --location <location> --admin-user <user> --admin-password <password> --assign-identity
- If it is an existing server can use az sql server update.
az sql server update --name <servername> --resource-group <rgname> --location <location> --admin-user <user> --admin-password <password> --assign-identity
You will need the principalId from the commands above to be able to grant permissions in step 4. Example output is below
2. Create a test Hyperscale database
3. Create a Key vault in the same region as your database server and a key if you do not already have one
4. Grant Key vault permissions to your server Identity using the principalId from step1.
5. Obtain the kid from the key that was created in step 3 using the command below.
Snippet of output:
6. Add the Key vault key to the server and set the TDE protector
7. Enable TDE at the database level. Note that the encryption could take a while depending on the database size and the tier.
8. Check Encryption state and activity using CLI or powershell or TSQL
For more information please see requirements and recommendations for configuration customer-managed TDE
Azure SQL databases that have TDE with customer-managed keys on other tiers will be not able to update to Hyperscale tier and will fail with the error below:
Error message: 'The logical server is using customer managed key (AKV), switch to service managed key before moving to 'Hyperscale' edition. Update to service objective 'HS_Gen5_2' with customer managed key is not supported' for entity 'dbname'.
We will be addressing this before General availability of the feature.
Let us know your experiences as you try this out on hyperscale!