|
| 1 | +--- |
| 2 | +title: Configure cross-tenant customer-managed keys for Azure NetApp Files volume encryption |
| 3 | +description: Learn how to configure cross-tenant customer-managed keys for Azure NetApp Files volume encryption. |
| 4 | +services: azure-netapp-files |
| 5 | +author: b-ahibbard |
| 6 | +ms.service: azure-netapp-files |
| 7 | +ms.topic: how-to |
| 8 | +ms.custom: references_regions |
| 9 | +ms.date: 12/19/2024 |
| 10 | +ms.author: anfdocs |
| 11 | +--- |
| 12 | + |
| 13 | +# Configure cross-tenant customer-managed keys for Azure NetApp Files volume encryption (preview) |
| 14 | + |
| 15 | +Cross-tenant customer-managed keys (CMK) for Azure NetApp Files volume encryption allows service providers based on Azure to offer [customer-managed key encryption](configure-customer-managed-keys.md). In the cross-tenant scenario, the NetApp account resides in a tenant managed by an independent software vendor (ISV), while the key used for encryption of volumes in that NetApp account resides in a key vault in a tenant that you manage. |
| 16 | + |
| 17 | +## Understand cross-tenant customer-managed keys |
| 18 | + |
| 19 | +The following diagram illustrates a sample cross-tenant CMK configuration. In the diagram, there are two Azure tenants: a service provider's tenant (Tenant 1) and your tenant (Tenant 2). Tenant 1 hosts the NetApp Account (source Azure resource). Tenant 2 hosts your key vault. |
| 20 | + |
| 21 | +:::image type="content" source="./media/customer-managed-keys-cross-tenant/cross-tenant-diagram.png" alt-text="Screenshot of create application volume group interface for extension one." lightbox="./media/customer-managed-keys-cross-tenant/cross-tenant-diagram.png"::: |
| 22 | + |
| 23 | +A multitenant application registration is created by the service provider in Tenant 1. A [federated identity credential](/entra/workload-id/workload-identity-federation-create-trust?pivots=identity-wif-apps-methods-azp) is created on this application using a user-assigned managed identity along with a private endpoint to the key vault. Then, the name and application ID of the app are shared. |
| 24 | + |
| 25 | +Following these steps, you install the service provider's application in your tenant (tenant 2) and grant the service principal associated with the installed application access to the key vault. You also store the encryption key (that is, the customer-managed key) in the key vault. You also shares the key location (the URI of the key) with the service provider. Following configuration, the service provider has: |
| 26 | + |
| 27 | +- An application ID for a multitenant application installed in the customer's tenant, which has been granted access to the customer-managed key. |
| 28 | +- A managed identity configured as the credential on the multitenant application. |
| 29 | + The location of the key in the key vault. |
| 30 | + |
| 31 | +With these three parameters, the service provider provisions Azure resources in tenant 1 that can be encrypted with the customer-managed key in tenant 2. |
| 32 | + |
| 33 | +## Supported regions |
| 34 | + |
| 35 | +Azure NetApp Files cross-tenant customer-managed keys for volume encryption is supported for the following regions: |
| 36 | + |
| 37 | +- Australia Central |
| 38 | +- Australia Central 2 |
| 39 | +- Australia East |
| 40 | +- Australia Southeast |
| 41 | +- Brazil South |
| 42 | +- Brazil Southeast |
| 43 | +- Canada Central |
| 44 | +- Canada East |
| 45 | +- Central India |
| 46 | +- Central US |
| 47 | +- East Asia |
| 48 | +- East US |
| 49 | +- East US 2 |
| 50 | +- France Central |
| 51 | +- Germany North |
| 52 | +- Germany West Central |
| 53 | +- Israel Central |
| 54 | +- Italy North |
| 55 | +- Japan East |
| 56 | +- Japan West |
| 57 | +- Korea Central |
| 58 | +- Korea South |
| 59 | +- North Central US |
| 60 | +- North Europe |
| 61 | +- Norway East |
| 62 | +- Norway West |
| 63 | +- Qatar Central |
| 64 | +- South Africa North |
| 65 | +- South Central US |
| 66 | +- South India |
| 67 | +- Southeast Asia |
| 68 | +- Spain Central |
| 69 | +- Sweden Central |
| 70 | +- Switzerland North |
| 71 | +- Switzerland West |
| 72 | +- UAE Central |
| 73 | +- UAE North |
| 74 | +- UK South |
| 75 | +- UK West |
| 76 | +- West Europe |
| 77 | +- West US |
| 78 | +- West US 2 |
| 79 | +- West US 3 |
| 80 | + |
| 81 | +## Register the feature |
| 82 | + |
| 83 | +<!-- register the feature --> |
| 84 | + |
| 85 | +## Configure cross-tenant CMK for Azure NetApp Files |
| 86 | + |
| 87 | +Cross-tenant CMK is currently only supported for the REST API. |
| 88 | + |
| 89 | +## Configure a NetApp account to use a key from a vault in another tenant. |
| 90 | + |
| 91 | +1. Create the application registration. |
| 92 | + 1. Navigate to Microsoft Entra ID in the Azure Portal |
| 93 | + 1. Select **Manage > App registrations** from the left pane. |
| 94 | + 1. Select **+ New registration**. |
| 95 | + 1. Provide the name for the application registration then select **Account** in any organizational directory. |
| 96 | + 1. Select **Register**. |
| 97 | + 1. Take note of the ApplicationID/ClientID of the application. |
| 98 | +1. Create a user-assigned managed identity. |
| 99 | + 1. Navigate to Managed Identities in the Azure Portal. |
| 100 | + 1. Select **+ Create**. |
| 101 | + 1. Provide the resource group, region, and name for the managed identity. |
| 102 | + 1. Select **Review + create**. |
| 103 | + 1. On successful deployment, note the Azure ResourceId of the user-assigned managed identity, which is available under Properties. For example: |
| 104 | + `/subscriptions/aaaaaaaa-0000-aaaa-0000-aaaa0000aaaa/resourcegroups/<resourceGroup>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/<identityTitle>` |
| 105 | +1. Configure the user-assigned managed identity as a federated credential on the application |
| 106 | + 1. Navigate to **Microsoft Entra ID > App registrations > your application**. |
| 107 | + 1. Select **Certificates & secrets**. |
| 108 | + 1. Select **Federated credentials**. |
| 109 | + 1. Select **+ Add credential**. |
| 110 | + 1. Under Federated credential scenario, select **Customer Managed Keys**. |
| 111 | + 1. Choose **Select a managed identity**. From the pane, select the subscription. Under **Managed identity**, select **User-assigned managed identity**. In the Select box, search for the managed identity you created earlier, then choose **Select** at the bottom of the pane. |
| 112 | + 1. Under Credential details, provide a name and optional description for the credential. Select **Add**. |
| 113 | +1. Create a private endpoint to the your key vault: |
| 114 | + 1. Have the customer share the full Azure ResourceId of their Key Vault. <!-- huh? --> |
| 115 | + 1. Navigate to **Private Endpoints**. |
| 116 | + 1. Select **+ Create**. |
| 117 | + 1. Choose your subscription and resource group, and enter a name for the Private Endpoint, then select **Next > Resource**. |
| 118 | + 1. In the Resource tab, enter the following: |
| 119 | + - Under Connection Method, select **Connect to an Azure resource by resource ID or alias**. |
| 120 | + - Under **Resource ID or alias**, enter the ResourceID of the customer’s key vault. |
| 121 | + - Under target sub-resource enter “vault”. Then select **Next > Virtual Network**. |
| 122 | + 1. In the Virtual Network tab, select a virtual network and subnet for the private endpoint. The endpoint must be in the same virtual network as the volumes you wish to create. The subnet must be a different subnet than the one delegated to `Microsoft.NetApp/volumes`. |
| 123 | + 1. Select Next on the next few tabs. Finally, select **Create** on the final tab. |
| 124 | + |
| 125 | +### Authorize access to the key vault |
| 126 | + |
| 127 | +1. Install the service provider application in the customer tenant |
| 128 | + 1. Get the Admin Consent URL from the provider for their cross-tenant application. In our example the URL would look like this: https://login.microsoftonline.com/<tenant1 tenantId>/adminconsent/client_id=<client/application ID for the cross tenant-application> This opens a login page where you enter your credentials. Once you enter your credentials, you may see an error stating there is no redirect URL configured. This is OK. |
| 129 | +1. Grant the service provider application access to the key vault. |
| 130 | + 1. Navigate to your key vault. Select Access Control (IAM) from the left pane. |
| 131 | + 1. Under Grant access to this resource, select **Add role assignment**. |
| 132 | + 1. Search for then select **Key Vault Crypto User**. |
| 133 | + 1. Under Members, select **User, group, or service principal**. |
| 134 | + 1. Select **Members**. Search for the application name of the application you installed from the service provider. |
| 135 | + 1. Select **Review + Assign**. |
| 136 | +1. Accept the incoming private endpoint connection to the key vault. |
| 137 | + 1. Navigate to your key vault. Select **Networking** from the left pane. |
| 138 | + 1. Under **Private Endpoint Connections**, select the incoming Private Endpoint from the provider’s tenant, then select **Approve**. |
| 139 | + 1. Set an optional description or accept the default. |
| 140 | + |
| 141 | +### Configure the NetApp account to use your keys |
| 142 | + |
| 143 | +1. You must use the `az rest` command to configure your NetApp account to use CMK in a different tenant. Issue the following command: |
| 144 | + |
| 145 | + ```azurecli |
| 146 | + az rest --method put --uri "/subscriptions/<subscription Id>/resourceGroups/<resource group name>/providers/Microsoft.NetApp/netAppAccounts/<NetApp Account name>?api-version=2024-01-01-preview" --body |
| 147 | + '{ \"properties\": |
| 148 | + { \"encryption\": |
| 149 | + { \"keySource\": \"Microsoft.KeyVault\", \"keyVaultProperties\": |
| 150 | + {\"keyVaultUri\": \"<URI to the key vault>\", \"keyVaultResourceId\": \"/<full resource ID of the key vault>\", \"keyName\": \"<customer’s key name>\" }, |
| 151 | + \"identity\": |
| 152 | + { \"userAssignedIdentity\": \"<full resource ID of the user-assigned identity>", \"federatedClientId\": \"<clientId of multi-tenant application>\" |
| 153 | + } |
| 154 | + } |
| 155 | + }, |
| 156 | + \"location\": \"southcentralus\", \"identity\": |
| 157 | + {\"type\": \"userAssigned\", \"userAssignedIdentities\": |
| 158 | + { \"<full resource ID of the user-assigned identity>\": { |
| 159 | + } |
| 160 | + } |
| 161 | + } |
| 162 | + }' |
| 163 | + --verbose |
| 164 | + ``` |
| 165 | + Once you have sent the `az rest` command, your NetApp Account has been successfully configured with cross-tenant CMK. |
| 166 | +
|
| 167 | +
|
| 168 | +### Create a volume |
| 169 | +
|
| 170 | +1. To create a volume using cross-tenant CMK, you must use the Azure CLI. Issue the following command: |
| 171 | +
|
| 172 | +```azurecli |
| 173 | +az netappfiles volume create -g <resource group name> --account-name <NetApp account name> --pool-name <pool name> --name <volume name> -l southcentralus --service-level premium --usage-threshold 100 --file-path "<file path>" --vnet <virtual network name> --subnet default --network-features Standard --encryption-key-source Microsoft.KeyVault --kv-private-endpoint-id <full resource ID to the private endpoint to the customer's vault> --debug |
| 174 | +``` |
| 175 | + |
| 176 | +## Next steps |
| 177 | +* [Configure customer-managed keys](configure-customer-managed-keys.md) |
| 178 | +* [Understand data encryption in Azure NetApp Files](understand-data-encryption.md) |
0 commit comments