Skip to content

Commit 4451e24

Browse files
authored
Merge pull request #109979 from ramankumarlive/patch-44
added key rotation steps
2 parents 5495c46 + 1747627 commit 4451e24

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

articles/virtual-machines/linux/disk-encryption.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ By default, managed disks use platform-managed encryption keys. As of June 10, 2
3030

3131
## Customer-managed keys
3232

33-
You can choose to manage encryption at the level of each managed disk, with your own keys. Server-side encryption for managed disks with customer-managed keys offers an integrated experience with Azure Key Vault. You can either import [your RSA keys](../../key-vault/key-vault-hsm-protected-keys.md) to your Key Vault or generate new RSA keys in Azure Key Vault. Azure managed disks handles the encryption and decryption in a fully transparent fashion using [envelope encryption](../../storage/common/storage-client-side-encryption.md#encryption-and-decryption-via-the-envelope-technique). It encrypts data using an [AES](https://en.wikipedia.org/wiki/Advanced_Encryption_Standard) 256 based data encryption key (DEK), which is, in turn, protected using your keys. You have to grant access to managed disks in your Key Vault to use your keys for encrypting and decrypting the DEK. This allows you full control of your data and keys. You can disable your keys or revoke access to managed disks at any time. You can also audit the encryption key usage with Azure Key Vault monitoring to ensure that only managed disks or other trusted Azure services are accessing your keys.
33+
You can choose to manage encryption at the level of each managed disk, with your own keys. Server-side encryption for managed disks with customer-managed keys offers an integrated experience with Azure Key Vault. You can either import [your RSA keys](../../key-vault/key-vault-hsm-protected-keys.md) to your Key Vault or generate new RSA keys in Azure Key Vault.
34+
35+
Azure managed disks handles the encryption and decryption in a fully transparent fashion using [envelope encryption](../../storage/common/storage-client-side-encryption.md#encryption-and-decryption-via-the-envelope-technique). It encrypts data using an [AES](https://en.wikipedia.org/wiki/Advanced_Encryption_Standard) 256 based data encryption key (DEK), which is, in turn, protected using your keys. The Storage service generates data encryption keys and encrypts them with customer-managed keys using RSA encryption. The envelope encryption allows you to rotate (change) your keys periodically as per your compliance policies without impacting your VMs. When you rotate your keys, the Storage service re-encrypts the data encryption keys with the new customer-managed keys.
36+
37+
You have to grant access to managed disks in your Key Vault to use your keys for encrypting and decrypting the DEK. This allows you full control of your data and keys. You can disable your keys or revoke access to managed disks at any time. You can also audit the encryption key usage with Azure Key Vault monitoring to ensure that only managed disks or other trusted Azure services are accessing your keys.
3438

3539
For premium SSDs, standard SSDs, and standard HDDs: When you disable or delete your key, any VMs with disks using that key will automatically shut down. After this, the VMs will not be usable unless the key is enabled again or you assign a new key.
3640

@@ -186,6 +190,32 @@ az vm disk attach --vm-name $vmName --lun $diskLUN --ids $diskId
186190
187191
```
188192

193+
#### Change the key of a DiskEncryptionSet to rotate the key for all the resources referencing the DiskEncryptionSet
194+
195+
```azurecli
196+
197+
rgName=yourResourceGroupName
198+
keyVaultName=yourKeyVaultName
199+
keyName=yourKeyName
200+
diskEncryptionSetName=yourDiskEncryptionSetName
201+
202+
203+
keyVaultId=$(az keyvault show --name $keyVaultName--query [id] -o tsv)
204+
205+
keyVaultKeyUrl=$(az keyvault key show --vault-name $keyVaultName --name $keyName --query [key.kid] -o tsv)
206+
207+
az disk-encryption-set update -n keyrotationdes -g keyrotationtesting --key-url $keyVaultKeyUrl --source-vault $keyVaultId
208+
209+
```
210+
211+
#### Find the status of server-side encryption of a disk
212+
213+
```azurecli
214+
215+
az disk show -g yourResourceGroupName -n yourDiskName --query [encryption.type] -o tsv
216+
217+
```
218+
189219
> [!IMPORTANT]
190220
> Customer-managed keys rely on managed identities for Azure resources, a feature of Azure Active Directory (Azure AD). When you configure customer-managed keys, a managed identity is automatically assigned to your resources under the covers. If you subsequently move the subscription, resource group, or managed disk from one Azure AD directory to another, the managed identity associated with managed disks is not transferred to the new tenant, so customer-managed keys may no longer work. For more information, see [Transferring a subscription between Azure AD directories](../../active-directory/managed-identities-azure-resources/known-issues.md#transferring-a-subscription-between-azure-ad-directories).
191221

0 commit comments

Comments
 (0)