Skip to content

Commit bd33f07

Browse files
authored
Merge pull request #253492 from b-ahibbard/cmk-ga
customer-managed keys - ga announcement
2 parents b9b2e4a + 31f4cda commit bd33f07

File tree

3 files changed

+189
-16
lines changed

3 files changed

+189
-16
lines changed

articles/azure-netapp-files/configure-customer-managed-keys.md

Lines changed: 182 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,29 +35,17 @@ The following diagram demonstrates how customer-managed keys work with Azure Net
3535

3636
## Considerations
3737

38-
> [!IMPORTANT]
39-
> Customer-managed keys for Azure NetApp Files volume encryption is currently in preview. You need to submit a waitlist request for accessing the feature through the **[Customer-managed keys for Azure NetApp Files volume encryption](https://aka.ms/anfcmkpreviewsignup)** page. Customer-managed keys feature is expected to be enabled within a week after you submit the waitlist request. You can check the status of feature registration by using the following command:
40-
>
41-
> ```azurepowershell-interactive
42-
> Get-AzProviderFeature -ProviderNamespace Microsoft.NetApp -FeatureName ANFAzureKeyVaultEncryption
43-
>
44-
> FeatureName ProviderName RegistrationState
45-
> ----------- ------------ -----------------
46-
> ANFAzureKeyVaultEncryption Microsoft.NetApp Registered
47-
> ```
48-
4938
* Customer-managed keys can only be configured on new volumes. You can't migrate existing volumes to customer-managed key encryption.
5039
* To create a volume using customer-managed keys, you must select the *Standard* network features. You can't use customer-managed key volumes with volume configured using Basic network features. Follow instructions in to [Set the Network Features option](configure-network-features.md#set-the-network-features-option) in the volume creation page.
5140
* For increased security, you can select the **Disable public access** option within the network settings of your key vault. When selecting this option, you must also select **Allow trusted Microsoft services to bypass this firewall** to permit the Azure NetApp Files service to access your encryption key.
52-
* Automatic Managed System Identity (MSI) certificate renewal isn't currently supported. It is recommended to set up an Azure monitor alert for when the MSI certificate is going to expire.
41+
* Automatic Managed System Identity (MSI) certificate renewal isn't currently supported. It's recommended you create an Azure monitor alert to notify you when the MSI certificate is set to expire.
5342
* The MSI certificate has a lifetime of 90 days. It becomes eligible for renewal after 46 days. **After 90 days, the certificate is no longer be valid and the customer-managed key volumes under the NetApp account will go offline.**
5443
* To renew, you need to call the NetApp account operation `renewCredentials` if eligible for renewal. If it's not eligible, an error message communicates the date of eligibility.
5544
* Version 2.42 or later of the Azure CLI supports running the `renewCredentials` operation with the [az netappfiles account command](/cli/azure/netappfiles/account#az-netappfiles-account-renew-credentials). For example:
5645

5746
`az netappfiles account renew-credentials –-account-name myaccount –resource-group myresourcegroup`
5847

5948
* If the account isn't eligible for MSI certificate renewal, an error message communicates the date and time when the account is eligible. It's recommended you run this operation periodically (for example, daily) to prevent the certificate from expiring and from the customer-managed key volume going offline.
60-
6149
* Applying Azure network security groups on the private link subnet to Azure Key Vault isn't supported for Azure NetApp Files customer-managed keys. Network security groups don't affect connectivity to Private Link unless `Private endpoint network policy` is enabled on the subnet. It's recommended to keep this option disabled.
6250
* If Azure NetApp Files fails to create a customer-managed key volume, error messages are displayed. Refer to the [Error messages and troubleshooting](#error-messages-and-troubleshooting) section for more information.
6351
* If Azure Key Vault becomes inaccessible, Azure NetApp Files loses its access to the encryption keys and the ability to read or write data to volumes enabled with customer-managed keys. In this situation, create a support ticket to have access manually restored for the affected volumes.
@@ -110,12 +98,13 @@ Azure NetApp Files customer-managed keys is supported for the following regions:
11098

11199
## Requirements
112100

113-
Before creating your first customer-managed key volume, you must have set up:
101+
Before creating your first customer-managed key volume, you must set up:
114102
* An [Azure Key Vault](../key-vault/general/overview.md), containing at least one key.
115103
* The key vault must have soft delete and purge protection enabled.
116104
* The key must be of type RSA.
117105
* The key vault must have an [Azure Private Endpoint](../private-link/private-endpoint-overview.md).
118106
* The private endpoint must reside in a different subnet than the one delegated to Azure NetApp Files. The subnet must be in the same VNet as the one delegated to Azure NetApp.
107+
* You must register the feature before you can use customer-managed keys.
119108

120109
For more information about Azure Key Vault and Azure Private Endpoint, refer to:
121110
* [Quickstart: Create a key vault ](../key-vault/general/quick-create-portal.md)
@@ -125,8 +114,30 @@ For more information about Azure Key Vault and Azure Private Endpoint, refer to:
125114
* [Network security groups](../virtual-network/network-security-groups-overview.md)
126115
* [Manage network policies for private endpoints](../private-link/disable-private-endpoint-network-policy.md)
127116

117+
## Register the feature
118+
119+
You must register customer-managed keys before using it for the first time.
120+
121+
1. Register the feature:
122+
123+
```azurepowershell-interactive
124+
Register-AzProviderFeature -ProviderNamespace Microsoft.NetApp -FeatureName ANFAzureKeyVaultEncryption
125+
```
126+
127+
2. Check the status of the feature registration:
128+
129+
> [!NOTE]
130+
> The **RegistrationState** may be in the `Registering` state for up to 60 minutes before changing to `Registered`. Wait until the status is **Registered** before continuing.
131+
132+
```azurepowershell-interactive
133+
Get-AzProviderFeature -ProviderNamespace Microsoft.NetApp -FeatureName ANFAzureKeyVaultEncryption
134+
```
135+
You can also use [Azure CLI commands](/cli/azure/feature) `az feature register` and `az feature show` to register the feature and display the registration status.
136+
128137
## Configure a NetApp account to use customer-managed keys
129138
139+
### [Portal](#tab/azure-portal)
140+
130141
1. In the Azure portal and under Azure NetApp Files, select **Encryption**.
131142
132143
The **Encryption** page enables you to manage encryption settings for your NetApp account. It includes an option to let you set your NetApp account to use your own encryption key, which is stored in [Azure Key Vault](../key-vault/general/basic-concepts.md). This setting provides a system-assigned identity to the NetApp account, and it adds an access policy for the identity with the required key permissions.
@@ -157,7 +168,163 @@ For more information about Azure Key Vault and Azure Private Endpoint, refer to:
157168
* `Microsoft.KeyVault/vaults/keys/decrypt/action`
158169
The user-assigned identity you select is added to your NetApp account. Due to the customizable nature of role-based access control (RBAC), the Azure portal doesn't configure access to the key vault. See [Provide access to Key Vault keys, certificates, and secrets with an Azure role-based access control](../key-vault/general/rbac-guide.md) for details on configuring Azure Key Vault.
159170
160-
1. After selecting **Save** button, you'll receive a notification communicating the status of the operation. If the operation was not successful, an error message displays. Refer to [error messages and troubleshooting](#error-messages-and-troubleshooting) for assistance in resolving the error.
171+
1. Select **Save** then observe the notification communicating the status of the operation. If the operation was not successful, an error message displays. Refer to [error messages and troubleshooting](#error-messages-and-troubleshooting) for assistance in resolving the error.
172+
173+
### [Azure CLI](#tab/azure-cli)
174+
175+
The process to configure a NetApp account with customer-managed keys in the Azure CLI depends on whether you are using a [system-assigned identity](#use-a-system-assigned-identity) or an [user-assigned identity](#use-a-new-user-assigned-identity).
176+
177+
#### Use a system-assigned identity
178+
179+
1. Update your NetApp account to use a system-assigned identity.
180+
181+
```azurecli
182+
az netappfiles account update \
183+
--name <account_name> \
184+
--resource-group <resource_group> \
185+
--identity-type SystemAssigned
186+
```
187+
188+
1. To use an access policy, create a variable that includes the principal ID of the account identity, then run `az keyvault set-policy` and assign permissions of "Get", "Encrypt", and "Decrypt".
189+
190+
```azurecli
191+
netapp_account_principal=$(az netappfiles account show \
192+
--name <account_name> \
193+
--resource-group <resource_group> \
194+
--query identity.principalId \
195+
--output tsv)
196+
197+
az keyvault set-policy \
198+
--name <key_vault_name> \
199+
--resource-group <resource-group> \
200+
--object-id $netapp_account_principal \
201+
--key-permissions get encrypt decrypt
202+
```
203+
204+
1. Update the NetApp account with your key vault.
205+
206+
```azurecli
207+
key_vault_uri=$(az keyvault show \
208+
--name <key-vault> \
209+
--resource-group <resource_group> \
210+
--query properties.vaultUri \
211+
--output tsv)
212+
az netappfiles account update --name <account_name> \
213+
--resource-group <resource_group> \
214+
--key-source Microsoft.Keyvault \
215+
--key-vault-uri $key_vault_uri \
216+
--key-name <key>
217+
```
218+
219+
#### Use a new user-assigned identity
220+
221+
1. Create a new user-assigned identity.
222+
223+
```azurecli
224+
az identity create \
225+
--name <identity_name> \
226+
--resource-group <resource_group>
227+
```
228+
229+
1. Set an access policy for the key vault.
230+
```azurecli
231+
user_assigned_identity_principal=$(az identity show \
232+
--name <identity_name> \
233+
--resource-group <resource_group> \
234+
--query properties.principalId \
235+
-output tsv)
236+
az keyvault set-policy \
237+
--name <key_vault_name> \
238+
--resource-group <resource-group> \
239+
--object-id $user_assigned_identity_principal \
240+
--key-permissions get encrypt decrypt
241+
```
242+
243+
>[!NOTE]
244+
>You can alternately [use role-based access control to grant access to the key vault](#use-role-based-access-control).
245+
246+
1. Assign the user-assigned identity to the NetApp account and update the key vault encryption.
247+
248+
```azurecli
249+
key_vault_uri=$(az keyvault show \
250+
--name <key-vault> \
251+
--resource-group <resource_group> \
252+
--query properties.vaultUri \
253+
--output tsv)
254+
user_assigned_identity=$(az identity show \
255+
--name <identity_name> \
256+
--resource-group <resource_group> \
257+
--query id \
258+
-output tsv)
259+
az netappfiles account update --name <account_name> \
260+
--resource-group <resource_group> \
261+
--identity-type UserAssigned \
262+
--user-identity-id $user-assigned-identity \
263+
--key-source Microsoft.Keyvault \
264+
--key-vault-uri $key_vault_uri \
265+
--key-name <key> \
266+
--keyvault-resource-id <key-vault> \
267+
--user-assigned-identity $user_assigned_identity
268+
```
269+
270+
### [Azure PowerShell](#tab/azure-powershell)
271+
272+
The process to configure a NetApp account with customer-managed keys in the Azure CLI depends on whether you are using a [system-assigned identity](#enable-access-for-system-assigned-identity) or an [user-assigned identity](#enable-access-for-user-assigned-identity).
273+
274+
#### Enable access for system-assigned identity
275+
276+
1. Update your NetApp account to use system-assigned identity.
277+
278+
```azurepowershell
279+
$netappAccount = Update-AzNetAppFilesAccount -ResourceGroupName <resource_group> -Name <account_name> -AssignIdentity
280+
```
281+
282+
1. To use an access policy, run `Set-AzKeyVaultAccessPolicy` with the key vault name, the principal ID of the account identity, and the permissions "Get", "Encrypt", and "Decrypt".
283+
284+
```azurepowershell
285+
Set-AzKeyVaultAccessPolicy -VaultName <key_vault_name> -ResourceGroupname <resource_group> -ObjectId $netappAccount.Identity.PrincipalId -PermissionsToKeys get,encrypt,decrypt
286+
```
287+
288+
1. Update your NetApp account with the key vault information.
289+
290+
```azurepowershell
291+
Update-AzNetAppFilesAccount -ResourceGroupName $netappAccount.ResourceGroupName -AccountName $netappAccount.ResourceGroupName -KeyVaultEncryption -KeyVaultUri <keyVaultUri> -KeyName <keyName>
292+
```
293+
294+
#### Enable access for user-assigned identity
295+
296+
1. Create a new user-assigned identity.
297+
298+
```azurepowershell
299+
$userId = New-AzUserAssignedIdentity -ResourceGroupName <resourceGroupName> -Name $userIdName
300+
```
301+
302+
1. Assign the access policy to the key vault.
303+
304+
```azurepowershell
305+
Set-AzKeyVaultAccessPolicy -VaultName <key_vault_name> `
306+
-ResourceGroupname <resource_group> `
307+
-ObjectId $userId.PrincipalId `
308+
-PermissionsToKeys get,encrypt,decrypt `
309+
-BypassObjectIdValidation
310+
```
311+
312+
>[!NOTE]
313+
>You can alternately [use role-based access control to grant access to the key vault](#use-role-based-access-control).
314+
315+
1. Assign the user-assigned identity to the NetApp account and update the key vault encryption.
316+
317+
```azurepowershell
318+
$netappAccount = Update-AzNetAppFilesAccount -ResourceGroupName <resource_group> `
319+
-Name <account_name> `
320+
-IdentityType UserAssigned `
321+
-UserAssignedIdentityId $userId.Id `
322+
-KeyVaultEncryption `
323+
-KeyVaultUri <keyVaultUri> `
324+
-KeyName <keyName> `
325+
-EncryptionUserAssignedIdentity $userId.Id
326+
```
327+
---
161328
162329
## Use role-based access control
163330

articles/azure-netapp-files/create-cross-zone-replication.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Cross-zone replication is currently in preview. You need to register the feature
4040
2. Check the status of the feature registration:
4141
4242
> [!NOTE]
43-
> The **RegistrationState** may be in the `Registering` state for up to 60 minutes before changing to`Registered`. Wait until the status is **Registered** before continuing.
43+
> The **RegistrationState** may be in the `Registering` state for up to 60 minutes before changing to `Registered`. Wait until the status is **Registered** before continuing.
4444
4545
```azurepowershell-interactive
4646
Get-AzProviderFeature -ProviderNamespace Microsoft.NetApp -FeatureName ANFCrossZoneReplication

articles/azure-netapp-files/whats-new.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ ms.author: anfdocs
2020
# What's new in Azure NetApp Files
2121

2222
Azure NetApp Files is updated regularly. This article provides a summary about the latest new features and enhancements.
23+
24+
## January 2024
25+
26+
* [Customer-managed keys](configure-customer-managed-keys.md) is now generally available (GA).
27+
28+
You still must register the feature before using it for the first time.
2329

2430
## November 2023
2531

0 commit comments

Comments
 (0)