Remediation
Please see the additional information about the requirements needed before starting this remediation procedure.
From Azure Portalβ
- In the Azure portal, open the portal menu in the upper-left corner.
- Select
Key Vaults. - Select a Key Vault to configure.
- Select
Networkingin the left column. - Select
Private endpoint connectionsfrom the top row. - Select
+ Create. - Select the subscription the Key Vault is in, and any other configuration options.
- Select
Next. - For resource type, select
Microsoft.KeyVault/vaults. - Select the Key Vault to associate the Private Endpoint with.
- Select
Next. - In the
Virtual Networkingfield, select the network to assign to the endpoint. - Select other configuration options as desired, including an existing or new application security group.
- Select
Next. - Select the private DNS that the private endpoint will use.
- Select
Next. - Optionally add
Tags. - Select
Next: Review + Create. - Review the information and select
Create. Follow the Audit procedure to verify that the configuration applied successfully. - Repeat steps 3-19 for each Key Vault.
From Azure CLIβ
-
To create an endpoint, run the following command:
az network private-endpoint create \
--resource-group {{resource-group-name}} \
--vnet-name {{vnet-name}} \
--subnet {{subnet-name}} \
--name {{private-endpoint-name}} \
--private-connection-resource-id "/subscriptions/{{azure-subscription-id}}/resourceGroups/{{resource-group-name}}/providers/Microsoft.KeyVault/vaults/{{key-vault-name}}" \
--group-ids vault \
--connection-name {{private-link-connection-name}} \
--location {{azure-region}} \
--manual-request -
To manually approve the endpoint request, run the following command:
az keyvault private-endpoint-connection approve \
--resource-group {{resource-group-name}} \
--vault-name {{key-vault-name}} \
--name {{private-link-name}} -
Determine the Private Endpoint's IP address to connect the Key Vault to the Private DNS you have previously created.
-
Look for the
networkInterfacesproperty, thenid. Use that value asprivateEndpointNICin step 6:az network private-endpoint show \
-g {{resource-group-name}} \
-n {{private-endpoint-name}} -
Use the NIC ID to query the private IP address:
az network nic show --ids {{private-endpoint-nic-id}} -
Create a Private DNS record within the DNS Zone you created for the Private Endpoint:
az network private-dns record-set a add-record \
-g {{resource-group-name}} \
-z "privatelink.vaultcore.azure.net" \
-n {{key-vault-name}} \
-a {{private-endpoint-nic}} -
Run
nslookupfor the private endpoint to verify the DNS record:nslookup {{key-vault-name}}.vault.azure.net
nslookup {{key-vault-name}}.privatelink.vaultcore.azure.net