Remediation
Please see the additional information about the requirements needed before starting this remediation procedure.
From Azure Portalβ
- From Azure Home open the Portal Menu in the top left.
- Select
Key Vaults. - Select a Key Vault to audit.
- Select
Networkingin the left column. - Select
Private endpoint connectionsfrom the top row. - Select
+ Create. - Select the subscription the Key Vault is within, and other desired configuration.
- 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 the Endpoint. - Select other configuration options as desired, including an existing or new application security group.
- Select
Next. - Select the private DNS the Private Endpoints will use.
- Select
Next. - Optionally add
Tags. - Select
Next : Review + Create. - Review the information and select
Create. Follow the Audit Procedure to determine if it has successfully applied. - 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 <resourceGroup> --vnet-name <vnetName> --subnet <subnetName> --name <PrivateEndpointName> --private-connection-resource-id "/subscriptions/<AZURE SUBSCRIPTION ID>/resourceGroups/<resourceGroup>/providers/Microsoft.KeyVault/vaults/<keyVaultName>" --group-ids vault --connection-name <privateLinkConnectionName> --location <azureRegion> --manual-request
- To manually approve the endpoint request, run the following command:
az keyvault private-endpoint-connection approve --resource-group <resourceGroup> --vault-name <keyVaultName> βname <privateLinkName>
- Determine the Private Endpoint's IP address to connect the Key Vault to the Private DNS you have previously created.
- Look for the property networkInterfaces then id; the value must be placed in the variable
privateEndpointNICwithin step 7:
az network private-endpoint show -g <resourceGroupName> -n <privateEndpointName>
- Look for the property networkInterfaces then id; the value must be placed on
privateEndpointNICin step 7:
az network nic show --ids <privateEndpointName>
- 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 <resourcecGroupName> -z "privatelink.vaultcore.azure.net" -n <keyVaultName> -a <privateEndpointNIC>
- nslookup the private endpoint to determine if the DNS record is correct:
nslookup <keyVaultName>.vault.azure.net nslookup <keyVaultName>.privatelink.vaultcore.azure.n