|
1 | 1 | ---
|
2 |
| -title: Configure an IP firewall for your Azure Cognitive Search service |
| 2 | +title: Configure an IP firewall |
3 | 3 | titleSuffix: Azure Cognitive Search
|
4 |
| -description: Configure IP control policies to restrict access to your Azure Cognitive Search service. |
| 4 | +description: Configure IP control policies to restrict access to your Azure Cognitive Search service to specific IP addresses. |
5 | 5 |
|
6 | 6 | manager: nitinme
|
7 |
| -author: markheff |
8 |
| -ms.author: maheff |
| 7 | +author: HeidiSteen |
| 8 | +ms.author: heidist |
9 | 9 | ms.service: cognitive-search
|
10 | 10 | ms.topic: conceptual
|
11 |
| -ms.date: 02/16/2021 |
| 11 | +ms.date: 10/19/2021 |
12 | 12 | ---
|
13 | 13 |
|
14 |
| -# Configure IP firewall for Azure Cognitive Search |
| 14 | +# Configure an IP firewall for Azure Cognitive Search |
15 | 15 |
|
16 |
| -Azure Cognitive Search supports IP rules for inbound firewall support. This model provides an additional layer of security for your search service similar to the IP rules you'll find in an Azure virtual network security group. With these IP rules, you can configure your search service to be accessible only from an approved set of machines and/or cloud services. Access to data stored in your search service from these approved sets of machines and services will still require the caller to present a valid authorization token. |
| 16 | +Azure Cognitive Search supports IP rules for inbound access through a firewall, similar to the IP rules you'll find in an Azure virtual network security group. By leveraging IP rules, you can restrict search service access to an approved set of machines and cloud services. Access to data stored in your search service from the approved sets of machines and services will still require the caller to present a valid authorization token. |
17 | 17 |
|
18 |
| -You can set IP rules in the Azure portal, as described in this article. Alternatively, you can use the [Management REST API version 2020-03-13](/rest/api/searchmanagement/), [Azure PowerShell](/powershell/module/az.search), or [Azure CLI](/cli/azure/search). |
| 18 | +You can set IP rules in the Azure portal, as described in this article, on search services provisioned at the Basic tier and above. Alternatively, you can use the [Management REST API version 2020-03-13](/rest/api/searchmanagement/), [Azure PowerShell](/powershell/module/az.search), or [Azure CLI](/cli/azure/search). |
19 | 19 |
|
20 |
| -## <a id="configure-ip-policy"></a> Configure an IP firewall using the Azure portal |
| 20 | +<a id="configure-ip-policy"></a> |
21 | 21 |
|
22 |
| -To set the IP access control policy in the Azure portal, go to your Azure Cognitive Search service page and select **Networking** on the navigation menu. Endpoint networking connectivity must be **Public**. If your connectivity is set to **Private**, you can only access your search service via a Private Endpoint. |
| 22 | +## Configure an IP firewall using the Azure portal |
23 | 23 |
|
24 |
| - |
| 24 | +To set the IP access control policy in the Azure portal, go to your Azure Cognitive Search service page and select **Networking** on the left navigation pane. Endpoint networking connectivity must be **Public Access**. If your connectivity is set to **Private Access** or **Shared Private Access**, you can only access your search service via a Private Endpoint. |
25 | 25 |
|
26 |
| -The Azure portal provides the ability to specify IP addresses and IP address ranges in the CIDR format. An example of CIDR notation is 8.8.8.0/24, which represents the IPs that range from 8.8.8.0 to 8.8.8.255. |
27 |
| - |
28 |
| -> [!NOTE] |
29 |
| -> After you enable the IP access control policy for your Azure Cognitive Search service, all requests to the data plane from machines outside the allowed list of IP address ranges are rejected. When IP rules are configured, some features of the Azure portal are disabled. You'll be able to view and manage service level information, but portal access to index data and the various components in the service, such as the index, indexer, and skillset definitions, is restricted for security reasons. As an alternative to the portal, you can use the [VS Code Extension](https://aka.ms/vscode-search) to interact with the various components in the service. |
| 26 | +:::image type="content" source="media/service-configure-firewall/azure-portal-firewall.png" alt-text="Screenshot showing how to configure the IP firewall in the Azure portal" border="true"::: |
30 | 27 |
|
31 |
| -### Requests from your current IP |
| 28 | +The Azure portal provides the ability to specify IP addresses and IP address ranges in the CIDR format. An example of CIDR notation is 8.8.8.0/24, which represents the IPs that range from 8.8.8.0 to 8.8.8.255. |
32 | 29 |
|
33 |
| -To simplify development, the Azure portal helps you identify and add the IP of your client machine to the allowed list. Apps running on your machine can then access your Azure Cognitive Search service. |
| 30 | +After you enable the IP access control policy for your Azure Cognitive Search service, all requests to the data plane from machines outside the allowed list of IP address ranges are rejected. |
34 | 31 |
|
35 |
| -The portal automatically detects your client IP address. It might be the client IP address of your machine or network gateway. Make sure to remove this IP address before you take your workload to production. |
| 32 | +## Allow access from Azure portal |
36 | 33 |
|
37 |
| -To add your current IP to the list of IPs, check **Add your client IP address**. Then select **Save**. |
| 34 | +By default, when IP rules are configured, some features of the Azure portal are disabled. You'll be able to view and manage service level information, but portal access to indexes, indexers, and other top-level resources is restricted. |
38 | 35 |
|
39 |
| - |
| 36 | +To retain service administration through the portal, select the "Allow access" option under **Exceptions**. Alternatively, use the [VS Code Extension](https://aka.ms/vscode-search) to manage content. |
40 | 37 |
|
41 |
| -## <a id="troubleshoot-ip-firewall"></a>Troubleshoot issues with an IP access control policy |
| 38 | +## Allow access from your client |
42 | 39 |
|
43 |
| -You can troubleshoot issues with an IP access control policy by using the following options: |
| 40 | +Client applications that push indexing and query requests to the search service must be represented in an IP range. On Azure, you can generally determine the IP address by pinging the FQDN of a service (for example, `ping <your-search-service-name>.search.windows.net` will return the IP address of a search service). |
44 | 41 |
|
45 |
| -### Azure portal |
| 42 | +Providing IP addresses for clients ensures that the request is not rejected outright, but for successful access to content and operations, authorization is also necessary. Use one of the following methodologies to authenticate your request: |
46 | 43 |
|
47 |
| -Enabling an IP access control policy for your Azure Cognitive Search service blocks all requests from machines outside the allowed list of IP address ranges, including the Azure portal. You'll be able to view and manage service level information, but portal access to index data and the various components in the service, such as the index, indexer, and skillset definitions, is restricted for security reasons. |
| 44 | ++ [Key-based authentication](search-security-api-keys.md), where an admin or query API key is provided on the request |
| 45 | ++ [Role-based authorization](search-security-rbac.md), where the caller is a member of a security role on a search service, and the [registered app presents an OAuth token](search-howto-aad.md) from Azure Active Directory. |
48 | 46 |
|
49 |
| -### SDKs |
| 47 | +### Rejected requests |
50 | 48 |
|
51 |
| -When you access Azure Cognitive Search service using the SDK from machines that are not in the allowed list, a generic **403 Forbidden** response is returned with no additional details. Verify the allowed IP list for your account, and make sure that the correct configuration updated for your search service. |
| 49 | +When requests originate from IP addresses that are not in the allowed list, a generic **403 Forbidden** response is returned with no additional details. |
52 | 50 |
|
53 | 51 | ## Next steps
|
54 | 52 |
|
55 |
| -For more information on accessing your search service via Private Link, see the following article: |
| 53 | +If your client application is a static Web app on Azure, learn how to determine its IP range for inclusion in a search service IP firewall rule. |
56 | 54 |
|
57 |
| -* [Create a Private Endpoint for a secure connection to Azure Cognitive Search](service-create-private-endpoint.md) |
| 55 | +> [!div class="nextstepaction"] |
| 56 | +> [Inbound and outbound IP addresses in Azure App Service](../app-service/overview-inbound-outbound-ips.md) |
0 commit comments