|
| 1 | +--- |
| 2 | +title: Integrate with Azure Private Link Service |
| 3 | +description: Learn how to integrate Azure Key Vault with Azure Private Link Service |
| 4 | +author: msmbaldwin |
| 5 | +ms.author: mbaldwin |
| 6 | +ms.date: 01/28/2020 |
| 7 | +ms.service: key-vault |
| 8 | +ms.topic: quickstart |
| 9 | + |
| 10 | +--- |
| 11 | + |
| 12 | +# Integrate Key Vault with Azure Private Link (Preview) |
| 13 | + |
| 14 | +Azure Private Link Service enables you to access Azure Services (for example, Azure Key Vault, Azure Storage, and Azure Cosmos DB) and Azure hosted customer/partner services over a Private Endpoint in your virtual network. |
| 15 | + |
| 16 | +An Azure Private Endpoint is a network interface that connects you privately and securely to a service powered by Azure Private Link. The private endpoint uses a private IP address from your VNet, effectively bringing the service into your VNet. All traffic to the service can be routed through the private endpoint, so no gateways, NAT devices, ExpressRoute or VPN connections, or public IP addresses are needed. Traffic between your virtual network and the service traverses over the Microsoft backbone network, eliminating exposure from the public Internet. You can connect to an instance of an Azure resource, giving you the highest level of granularity in access control. |
| 17 | + |
| 18 | +For more information, see [What is Azure Private Link (Preview)?](../private-link/private-link-overview.md) |
| 19 | + |
| 20 | +## Prerequisites |
| 21 | + |
| 22 | +To integrate a key vault with Azure Private Link (Preview), you will need the following: |
| 23 | + |
| 24 | +- A key vault. |
| 25 | +- An Azure virtual network. |
| 26 | +- A subnet in the virtual network. |
| 27 | +- Owner or contributor permissions for both the key vault and the virtual network. |
| 28 | + |
| 29 | +Your private endpoint and virtual network must be in the same region. When you select a region for the private endpoint using the portal, it will automatically filter only virtual networks that are in that region. Your key vault can be in a different region. |
| 30 | + |
| 31 | +Your private endpoint uses a private IP address in your virtual network. |
| 32 | + |
| 33 | +## Establish a private link connection to key vault |
| 34 | + |
| 35 | +First, create a virtual network by following the steps in [Create a virtual network using the Azure portal](../virtual-network/quick-create-portal.md) |
| 36 | + |
| 37 | +You can then either create a new key vault, or establish a private link connection to an existing key vault. |
| 38 | + |
| 39 | +### Create a new key vault and establish a private link connection |
| 40 | + |
| 41 | +You can create a new key Vault by following the steps in [Set and retrieve a secret from Azure Key Vault using the Azure portal](quick-create-portal.md) |
| 42 | + |
| 43 | +After configuring the key vault basics, select the Networking tab and follow these steps: |
| 44 | + |
| 45 | +1. Select the Private Endpoint (preview) radio button in the Networking tab. |
| 46 | +1. Click the "+ Add" Button to add a private endpoint. |
| 47 | + |
| 48 | +  |
| 49 | + |
| 50 | +1. In the "Location" field of the Create Private Endpoint Blade, select the region in which your virtual network is located. |
| 51 | +1. In the "Name" field, create a descriptive name that will allow you to identify this private endpoint. |
| 52 | +1. Select the virtual network and subnet you want this private endpoint to be created in from the dropdown menu. |
| 53 | +1. Leave the "integrate with the private zone DNS" option unchanged. |
| 54 | +1. Select "Ok". |
| 55 | + |
| 56 | +  |
| 57 | + |
| 58 | +You will now be able to see the configured private endpoint. You now have the option to delete and edit this private endpoint. |
| 59 | +Select the "Review + Create" button and create the key vault. It will take 5-10 minutes for the deployment to complete. |
| 60 | + |
| 61 | +### Establish a private link connection to an existing key vault |
| 62 | + |
| 63 | +If you already have a key vault, you can create a private link connection by following these steps: |
| 64 | + |
| 65 | +1. Sign in to the Azure portal. |
| 66 | +1. In the search bar, type in "key vaults" |
| 67 | +1. Select the key vault from the list to which you want to add a private endpoint. |
| 68 | +1. Select the "Networking" tab under Settings |
| 69 | +1. Select the Private endpoint connections (preview) tab at the top of the page |
| 70 | +1. Select the "+ Private Endpoint" button at the top of the page. |
| 71 | + |
| 72 | +  |
| 73 | +  |
| 74 | + |
| 75 | +You can choose to create a private endpoint for any Azure resource in using this blade. You can either use the dropdown menus to select a resource type and select a resource in your directory, or you can connect to any Azure resource using a resource ID. Leave the "integrate with the private zone DNS" option unchanged. |
| 76 | + |
| 77 | + |
| 78 | + |
| 79 | + |
| 80 | +## Manage private link connection |
| 81 | + |
| 82 | +When you create a private endpoint, the connection must be approved. If the resource for which you are creating a private endpoint is in your directory, you will be able to approve the connection request provided you have sufficient permissions; if you are connecting to an Azure resource in another directory, you must wait for the owner of that resource to approve your connection request. |
| 83 | + |
| 84 | +There are four provisioning states: |
| 85 | + |
| 86 | +| Service provide action | Service consumer private endpoint state | Description | |
| 87 | +|--|--|--| |
| 88 | +| None | Pending | Connection is created manually and is pending approval from the Private Link resource owner. | |
| 89 | +| Approve | Approved | Connection was automatically or manually approved and is ready to be used. | |
| 90 | +| Reject | Rejected | Connection was rejected by the private link resource owner. | |
| 91 | +| Remove | Disconnected | Connection was removed by the private link resource owner, the private endpoint becomes informative and should be deleted for cleanup. | |
| 92 | + |
| 93 | +### How to manage a private endpoint connection to key vault |
| 94 | + |
| 95 | +1. Log in to the Azure portal. |
| 96 | +1. In the search bar, type in "key vaults" |
| 97 | +1. Select the key vault that you want to manage. |
| 98 | +1. Select the "Networking" tab. |
| 99 | +1. If there are any connections that are pending, you will see a connection listed with "Pending" in the provisioning state. |
| 100 | +1. Select the private endpoint you wish to approve |
| 101 | +1. Select the approve button. |
| 102 | +1. If there are any private endpoint connections you want to reject, whether it is a pending request or existing connection, select the connection and click the "Reject" button. |
| 103 | + |
| 104 | +  |
| 105 | + |
| 106 | +## Validate that the private link connection works |
| 107 | + |
| 108 | +You should validate that the resources within the same subnet of the private endpoint resource are connecting to your key vault over a private IP address, and that they have the correct private DNS zone integration. |
| 109 | + |
| 110 | +First, create a virtual machine by following the steps in [Create a Windows virtual machine in the Azure portal](../virtual-machines/windows/quick-create-portal.md) |
| 111 | + |
| 112 | +In the "Networking" tab: |
| 113 | + |
| 114 | +1. Specify Virtual network and Subnet. You can create a new virtual network or select an existing one. If selecting an existing one, make sure the region matches. |
| 115 | +1. Specify a Public IP resource. |
| 116 | +1. In the "NIC network security group", select "None". |
| 117 | +1. In the "Load balancing", select "No". |
| 118 | + |
| 119 | +Open the command line and run the following command: |
| 120 | + |
| 121 | +```console |
| 122 | +nslookup <your-key-vault-name>.vault.azure.net |
| 123 | +``` |
| 124 | + |
| 125 | +If you run the ns lookup command to resolve the IP address of a key vault over a public endpoint, you will see a result that looks like this: |
| 126 | + |
| 127 | +```console |
| 128 | +c:\ >nslookup <your-key-vault-name>.vault.azure.net |
| 129 | + |
| 130 | +Non-authoritative answer: |
| 131 | +Name: |
| 132 | +Address: (public IP address) |
| 133 | +Aliases: <your-key-vault-name>.vault.azure.net |
| 134 | +``` |
| 135 | + |
| 136 | +If you run the ns lookup command to resolve the IP address of a key vault over a private endpoint, you will see a result that looks like this: |
| 137 | + |
| 138 | +```console |
| 139 | +c:\ >nslookup your_vault_name.vault.azure.net |
| 140 | + |
| 141 | +Non-authoritative answer: |
| 142 | +Name: |
| 143 | +Address: 10.1.0.5 (private IP address) |
| 144 | +Aliases: <your-key-vault-name>.vault.azure.net |
| 145 | + <your-key-vault-name>.privatelink.vaultcore.azure.net |
| 146 | +``` |
| 147 | + |
| 148 | +## Limitations and Design Considerations |
| 149 | + |
| 150 | +**Pricing**: For pricing information, see [Azure Private Link (preview) pricing](https://azure.microsoft.com/pricing/details/private-link/). |
| 151 | + |
| 152 | +**Limitations**: Private Endpoint for Azure Key Vault is in public preview. This feature is available in all Azure public regions. |
| 153 | + |
| 154 | +**Maximum Number of Private Endpoints per Key Vault**: 64. |
| 155 | + |
| 156 | +**Maximum Number of Key Vaults with Private Endpoints per Subscription**: 64. |
| 157 | + |
| 158 | +For more, see [Azure Private Link service: Limitations](../private-link/private-link-service-overview.md#limitations) |
| 159 | + |
| 160 | +## Next Steps |
| 161 | + |
| 162 | +- Learn more about [Azure Private Link (Preview)](../private-link/private-link-service-overview.md) |
| 163 | +- Learn more about [Azure Key Vault](key-vault-overview.md) |
0 commit comments