You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-vmware/configure-customer-managed-keys.md
+38-37Lines changed: 38 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Configure customer-managed key encryption at rest in Azure VMware Solution
3
3
description: Learn how to encrypt data in Azure VMware Solution with customer-managed keys using Azure Key Vault.
4
4
ms.topic: how-to
5
-
ms.date: 5/09/2022
5
+
ms.date: 6/30/2022
6
6
7
7
---
8
8
@@ -12,7 +12,7 @@ ms.date: 5/09/2022
12
12
13
13
This article illustrates how to encrypt VMware vSAN Key Encryption Keys (KEKs) with customer-managed keys (CMKs) managed by customer-owned Azure Key Vault.
14
14
15
-
When CMK encryptions are enabled on your Azure VMware Solution private cloud, Azure VMware Solution uses the CMK from your Key Vault to encrypt the vSAN KEKs. Each ESXi host that participates in the vSAN cluster uses randomly generated Disk Encryption Keys (DEKs) that ESXi uses to encrypt disk data at rest. vSAN encrypts all DEKs with a KEK provided by Azure VMware Solution key management system (KMS). Azure VMware Solution private cloud and Key Vault don't need to be in the same subscription.
15
+
When CMK encryptions are enabled on your Azure VMware Solution private cloud, Azure VMware Solution uses the CMK from your key vault to encrypt the vSAN KEKs. Each ESXi host that participates in the vSAN cluster uses randomly generated Disk Encryption Keys (DEKs) that ESXi uses to encrypt disk data at rest. vSAN encrypts all DEKs with a KEK provided by Azure VMware Solution key management system (KMS). Azure VMware Solution private cloud and Azure Key Vault don't need to be in the same subscription.
16
16
17
17
When managing your own encryption keys, you can do the following actions:
18
18
@@ -27,17 +27,20 @@ The Customer-managed keys (CMKs) feature supports the following key types. See t
27
27
28
28
## Topology
29
29
30
-
The following diagram shows how Azure VMware Solution uses Azure Active Directory (Azure AD) and a Key Vault to deliver the customer-managed key.
30
+
The following diagram shows how Azure VMware Solution uses Azure Active Directory (Azure AD) and a key vault to deliver the customer-managed key.
Before you begin to enable customer-managed key (CMK) functionality, ensure the following listed requirements are met:
37
37
38
-
1. You'll need an Azure Key Vault to use CMK functionality. If you don't have an Azure Key Vault, you can create one using [Quickstart: Create a Key Vault using the Azure portal](https://docs.microsoft.com/azure/key-vault/general/quick-create-portal).
39
-
2. If you enabled restricted access to Key Vault, you'll need to allow Microsoft Trusted Services to bypass the Azure Key Vault firewall. Go to [Configure Azure Key Vault networking settings](https://docs.microsoft.com/azure/key-vault/general/how-to-azure-key-vault-network-security?tabs=azure-portal) to learn more.
40
-
3. Enable **System Assigned identity** on your Azure VMware Solution private cloud if you didn't enable it during software-defined data center (SDDC) provisioning.
38
+
1. You'll need an Azure Key Vault to use CMK functionality. If you don't have an Azure Key Vault, you can create one using [Quickstart: Create a key vault using the Azure portal](https://docs.microsoft.com/azure/key-vault/general/quick-create-portal).
39
+
2. If you enabled restricted access to key vault, you'll need to allow Microsoft Trusted Services to bypass the Azure Key Vault firewall. Go to [Configure Azure Key Vault networking settings](https://docs.microsoft.com/azure/key-vault/general/how-to-azure-key-vault-network-security?tabs=azure-portal) to learn more.
40
+
>[!NOTE]
41
+
>After firewall rules are in effect, users can only perform Key Vault [data plane](https://docs.microsoft.com/azure/key-vault/general/security-features#privileged-access) operations when their requests originate from allowed VMs or IPv4 address ranges. This also applies to accessing key vault from the Azure portal. This also affects the key vault Picker by Azure VMware Solution. Users may be able to see a list of key vaults, but not list keys, if firewall rules prevent their client machine or user does not have list permission in key vault.
42
+
43
+
1. Enable **System Assigned identity** on your Azure VMware Solution private cloud if you didn't enable it during software-defined data center (SDDC) provisioning.
41
44
42
45
# [Azure Portal](#tab/azure-portal)
43
46
@@ -67,15 +70,14 @@ Before you begin to enable customer-managed key (CMK) functionality, ensure the
67
70
```azurecli-interactive
68
71
az resource update --ids $privateCloudId --set identity.type=SystemAssigned --api-version "2021-12-01"
69
72
```
70
-
71
73
---
72
74
73
-
4. Configure the Key Vault access policy to grant permissions to the managed identity. It will be used to authorize access to the Key Vault.
75
+
4. Configure the key vault access policy to grant permissions to the managed identity. It will be used to authorize access to the key vault.
74
76
75
77
# [Azure Portal](#tab/azure-portal)
76
78
77
79
1. Sign in to Azure portal.
78
-
1. Navigate to **Key vaults** and locate the Key Vault you want to use.
80
+
1. Navigate to **Key vaults** and locate the key vault you want to use.
79
81
1. From the left navigation, under **Settings**, select **Access policies**.
80
82
1. In **Access policies**, select **Add Access Policy**.
81
83
1. From the Key Permissions drop-down, check **Select all**, **Unwrap Key**, and **Wrap key**.
@@ -87,13 +89,13 @@ Before you begin to enable customer-managed key (CMK) functionality, ensure the
87
89
88
90
# [Azure CLI](#tab/azure-cli)
89
91
90
-
Get the principal ID for the system-assigned managed identity and save it to a variable. You'll need this value in the next step to create the Key Vault access policy.
92
+
Get the principal ID for the system-assigned managed identity and save it to a variable. You'll need this value in the next step to create the key vault access policy.
To configure the Key Vault access policy with Azure CLI, call [az keyvault set-policy](https://docs.microsoft.com/cli/azure/keyvault#az-keyvault-set-policy) and provide the variable for the principal ID that you previously retrieved for the managed identity.
98
+
To configure the key vault access policy with Azure CLI, call [az keyvault set-policy](https://docs.microsoft.com/cli/azure/keyvault#az-keyvault-set-policy) and provide the variable for the principal ID that you previously retrieved for the managed identity.
97
99
98
100
```azurecli-interactive
99
101
az keyvault set-policy --name $keyVault --resource-group $resourceGroupName --object-id $principalId --key-permissions get unwrapKey wrapKey
@@ -103,12 +105,29 @@ Before you begin to enable customer-managed key (CMK) functionality, ensure the
103
105
104
106
---
105
107
108
+
## Customer-managed key version lifecycle
109
+
110
+
You can change the customer-managed key (CMK) by creating a new version of the key. The creation of a new version won't interrupt the virtual machine (VM) workflow.
111
+
112
+
In Azure VMware Solution, CMK key version rotation will depend on the key selection setting you've chosen during CMK setup.
113
+
114
+
**Key selection setting 1**
115
+
116
+
A customer enables CMK encryption without supplying a specific key version for CMK. Azure VMware Solution selects the latest key version for CMK from the customer's key vault to encrypt the vSAN Key Encryption Keys (KEKs). Azure VMware Solution tracks the CMK for version rotation. When a new version of the CMK key in Azure Key Vault is created, it's captured by Azure VMware Solution automatically to encrypt vSAN KEKs.
117
+
118
+
>[!NOTE]
119
+
>Azure VMware Solution can take up to ten minutes to detect a new auto-rotated key version.
120
+
121
+
**Key selection setting 2**
122
+
123
+
A customer can enable CMK encryption for a specified CMK key version to supply the full key version URI under the **Enter Key from URI** option. When the customer's current key expires, they'll need to extend the CMK key expiration or disable CMK.
124
+
106
125
## Enable CMK with system-assigned identity
107
126
108
127
System-assigned identity is restricted to one per resource and is tied to the lifecycle of the resource. You can grant permissions to the managed identity on Azure resource. The managed identity is authenticated with Azure AD, so you don't have to store any credentials in code.
109
128
110
129
>[!IMPORTANT]
111
-
> Ensure that Key Vault is in the same region as the Azure VMware Solution private cloud.
130
+
> Ensure that key vault is in the same region as the Azure VMware Solution private cloud.
112
131
113
132
# [Azure Portal](#tab/azure-portal)
114
133
@@ -135,7 +154,7 @@ Navigate to your **Azure Key Vault** and provide access to the SDDC on Azure Key
135
154
136
155
# [Azure CLI](#tab/azure-cli)
137
156
138
-
To configure customer-managed keys for an Azure VMware Solution private cloud with automatic updating of the key version, call [az vmware private-cloud add-cmk-encryption](https://docs.microsoft.com/cli/azure/vmware/private-cloud?view=azure-cli-latest#az-vmware-private-cloud-add-cmk-encryption). Get the Key Vault URL and save it to a variable. You will need this value in the next step to enable CMK.
157
+
To configure customer-managed keys for an Azure VMware Solution private cloud with automatic updating of the key version, call [az vmware private-cloud add-cmk-encryption](https://docs.microsoft.com/cli/azure/vmware/private-cloud?view=azure-cli-latest#az-vmware-private-cloud-add-cmk-encryption). Get the key vault URL and save it to a variable. You'll need this value in the next step to enable CMK.
You can change the customer-managed key (CMK) by creating a new version of the key. The creation of a new version won't interrupt the virtual machine (VM) workflow.
167
-
168
-
In Azure VMware Solution, CMK key version rotation will depend on the key selection setting you've chosen during CMK setup.
169
-
170
-
**Key selection setting 1**
171
-
172
-
A customer enables CMK encryption without supplying a specific key version for CMK. Azure VMware Solution selects the latest key version for CMK from the customer's Key Vault to encrypt the vSAN Key Encryption Keys (KEKs). Azure VMware Solution tracks the CMK for version rotation. When a new version of the CMK key in Azure Key Vault is created, it's captured by Azure VMware Solution automatically to encrypt vSAN KEKs.
173
-
174
-
>[!NOTE]
175
-
>Azure VMware Solution can take up to ten minutes to detect a new auto-rotated key version.
176
-
177
-
**Key selection setting 2**
178
-
179
-
A customer can enable CMK encryption for a specified CMK key version to supply the full key version URI under the **Enter Key from URI** option. When the customer's current key expires, they'll need to extend the CMK key expiration or disable CMK.
180
-
181
182
## Change from customer-managed key to Microsoft managed key
182
183
183
184
When a customer wants to change from a customer-managed key (CMK) to a Microsoft managed key (MMK), it won't interrupt VM workload. To make the change from CMK to MMK, use the following steps.
@@ -199,19 +200,19 @@ Updating CMK settings won't work if the key is expired or the Azure VMware Solut
199
200
200
201
**Accidental deletion of a key**
201
202
202
-
If you accidentally delete your key in the Azure Key Vault, private cloud won't be able to perform some cluster modification operations. To avoid this scenario, we recommend that you keep soft deletes enabled on Key Vault. This option ensures that, if a key is deleted, it can be recovered within a 90-day period as part of the default soft-delete retention. If you are within the 90-day period, you can restore the key in order to resolve the issue.
203
+
If you accidentally delete your key in the Azure Key Vault, private cloud won't be able to perform some cluster modification operations. To avoid this scenario, we recommend that you keep soft deletes enabled on key vault. This option ensures that, if a key is deleted, it can be recovered within a 90-day period as part of the default soft-delete retention. If you are within the 90-day period, you can restore the key in order to resolve the issue.
203
204
204
-
**Restore Key Vault permission**
205
+
**Restore key vault permission**
205
206
206
-
If you have a private cloud that lost access to the customer managed key, check if Managed System Identity (MSI) requires permissions in Key Vault. The error notification returned from Azure may not correctly indicate MSI requiring permissions in Key Vault as the root cause. Remember, the required permissions are: get, wrapKey, and unwrapKey. See step 4 in [Prerequisites](#prerequisites).
207
+
If you have a private cloud that lost access to the customer managed key, check if Managed System Identity (MSI) requires permissions in key vault. The error notification returned from Azure may not correctly indicate MSI requiring permissions in key vault as the root cause. Remember, the required permissions are: get, wrapKey, and unwrapKey. See step 4 in [Prerequisites](#prerequisites).
207
208
208
209
**Fix expired key**
209
210
210
-
If you aren't using the auto-rotate function and the Customer Managed Key has expired in Key Vault, you can change the expiration date on key.
211
+
If you aren't using the auto-rotate function and the Customer Managed Key has expired in key vault, you can change the expiration date on key.
211
212
212
-
**Restore Key Vault access**
213
+
**Restore key vault access**
213
214
214
-
Ensure Managed System Identity (MSI) is used for providing private cloud access to Key Vault.
215
+
Ensure Managed System Identity (MSI) is used for providing private cloud access to key vault.
0 commit comments