Skip to content

Commit 79f4241

Browse files
authored
Merge pull request #100645 from arv100kri/arjagann/ip-whitelisting
Add documentation about IP range restriction, NSG rules and service tag
2 parents 29ec13c + 4e08aa3 commit 79f4241

3 files changed

+50
-15
lines changed

articles/search/search-howto-connecting-azure-sql-iaas-to-azure-search-using-indexers.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,12 @@ The links below provide instructions on NSG configuration for VM deployments. Us
6868

6969
IP addressing can pose a few challenges that are easily overcome if you are aware of the issue and potential workarounds. The remaining sections provide recommendations for handling issues related to IP addresses in the ACL.
7070

71-
#### Restrict access to the search service IP address
72-
We strongly recommend that you restrict the access to the IP address of your search service in the ACL instead of making your SQL Azure VMs wide open to any connection requests. You can easily find out the IP address by pinging the FQDN (for example, `<your-search-service-name>.search.windows.net`) of your search service.
71+
#### Restrict access to the Azure Cognitive Search
72+
We strongly recommend that you restrict the access to the IP address of your search service and the IP address range of `AzureCognitiveSearch` [service tag](https://docs.microsoft.com/azure/virtual-network/service-tags-overview#available-service-tags) in the ACL instead of making your SQL Azure VMs open to all connection requests.
73+
74+
You can find out the IP address by pinging the FQDN (for example, `<your-search-service-name>.search.windows.net`) of your search service.
75+
76+
You can find out the IP address range of `AzureCognitiveSearch` [service tag](https://docs.microsoft.com/azure/virtual-network/service-tags-overview#available-service-tags) for the particular region in which your Azure Cognitive Search service is located by either using [Downloadable JSON files](https://docs.microsoft.com/azure/virtual-network/service-tags-overview#discover-service-tags-by-using-downloadable-json-files) or via the [Service Tag Discovery API](https://docs.microsoft.com/azure/virtual-network/service-tags-overview#use-the-service-tag-discovery-api-public-preview). The IP address range is updated weekly.
7377

7478
#### Managing IP address fluctuations
7579
If your search service has only one search unit (that is, one replica and one partition), the IP address will change during routine service restarts, invalidating an existing ACL with your search service's IP address.

articles/search/search-howto-connecting-azure-sql-mi-to-azure-search-using-indexers.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ Check the Network Security Group has the correct **Inbound security rules** that
3030

3131
![NSG Inbound security rule](media/search-howto-connecting-azure-sql-mi-to-azure-search-using-indexers/nsg-rule.png "NSG Inbound security rule")
3232

33+
> [!NOTE]
34+
> You can choose to be more restrictive in the inbound access to your managed SQL instance by replacing the current rule (`public_endpoint_inbound`) with 2 rules:
35+
>
36+
> * Allowing inbound access from the `AzureCognitiveSearch` [service tag](https://docs.microsoft.com/azure/virtual-network/service-tags-overview#available-service-tags) ("SOURCE" = `AzureCognitiveSearch`)
37+
>
38+
> * Allowing inbound access from the IP address of the search service, which can be obtained by pinging its fully qualified domain name (eg., `<your-search-service-name>.search.windows.net`). ("SOURCE" = `IP address`)
39+
3340
## Get public endpoint connection string
3441
Make sure you use the connection string for the **public endpoint** (port 3342, not port 1433).
3542

articles/search/search-indexer-troubleshooting.md

Lines changed: 37 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,33 +15,57 @@ ms.date: 11/04/2019
1515

1616
Indexers can run into a number of issues when indexing data into Azure Cognitive Search. The main categories of failure include:
1717

18-
* [Connecting to a data source](#data-source-connection-errors)
18+
* [Connecting to a data source or other resources](#connection-errors)
1919
* [Document processing](#document-processing-errors)
2020
* [Document ingestion to an index](#index-errors)
2121

22-
## Data Source Connection Errors
22+
## Connection errors
2323

24-
### Blob Storage
24+
> [!NOTE]
25+
> Indexers have limited support for accessing data sources and other resources that are secured by Azure network security mechanisms. Currently, indexers can only access data sources via corresponding IP address range restriction mechanisms or NSG rules when applicable. Details for accessing each supported data source can be found below.
26+
>
27+
> You can find out the IP address of your search service by pinging its fully qualified domain name (eg., `<your-search-service-name>.search.windows.net`).
28+
>
29+
> You can find out the IP address range of `AzureCognitiveSearch` [service tag](https://docs.microsoft.com/azure/virtual-network/service-tags-overview#available-service-tags) for the particular region in which your Azure Cognitive Search service is present by either using [Downloadable JSON files](https://docs.microsoft.com/azure/virtual-network/service-tags-overview#discover-service-tags-by-using-downloadable-json-files) or via the [Service Tag Discovery API](https://docs.microsoft.com/azure/virtual-network/service-tags-overview#use-the-service-tag-discovery-api-public-preview). The IP address range is updated weekly.
2530
26-
#### Storage account firewall
31+
### Configure firewall rules
2732

28-
Azure Storage provides a configurable firewall. By default, the firewall is disabled so Azure Cognitive Search can connect to your storage account.
33+
Azure Storage, CosmosDB and Azure SQL provide a configurable firewall. There's no specific error message when the firewall is enabled. Typically, firewall errors are generic and look like `The remote server returned an error: (403) Forbidden` or `Credentials provided in the connection string are invalid or have expired`.
2934

30-
There's no specific error message when the firewall is enabled. Typically, firewall errors look like `The remote server returned an error: (403) Forbidden`.
35+
There are 2 options for allowing indexers to access these resources in such an instance:
3136

32-
You can verify that the firewall is enabled in the [portal](https://docs.microsoft.com/azure/storage/common/storage-network-security#azure-portal). The only supported workaround is to disable the firewall by choosing to allow access from ['All networks'](https://docs.microsoft.com/azure/storage/common/storage-network-security#azure-portal).
37+
* Disable the firewall, by allowing access from **All Networks** (if feasible).
38+
* Alternatively, you can allow access for the IP address of your search service and the IP address range of `AzureCognitiveSearch` [service tag](https://docs.microsoft.com/azure/virtual-network/service-tags-overview#available-service-tags) in the firewall rules of your resource (IP address range restriction).
3339

34-
If your indexer does not have an attached skillset, you _may_ attempt to [add an exception](https://docs.microsoft.com/azure/storage/common/storage-network-security#managing-ip-network-rules) for the IP addresses of your search service. However, this scenario is not supported and is not guaranteed to work.
40+
Details for configuring IP address range restrictions for each data source type can be found from the following links:
3541

36-
You can find out the IP address of your search service by pinging its FQDN (`<your-search-service-name>.search.windows.net`).
42+
* [Azure Storage](https://docs.microsoft.com/azure/storage/common/storage-network-security#grant-access-from-an-internet-ip-range)
3743

38-
### Cosmos DB
44+
* [Cosmos DB](https://docs.microsoft.com/azure/storage/common/storage-network-security#grant-access-from-an-internet-ip-range)
3945

40-
#### Indexing isn't enabled
46+
* [Azure SQL](https://docs.microsoft.com/azure/sql-database/sql-database-firewall-configure#create-and-manage-ip-firewall-rules)
47+
48+
**Limitation**: As stated in the documentation above for Azure Storage, IP address range restrictions will only work if your search service and your storage account are in different regions.
49+
50+
Azure functions (that could be used as a [Custom Web Api skill](cognitive-search-custom-skill-web-api.md)) also support [IP address restrictions](https://docs.microsoft.com/azure/azure-functions/ip-addresses#ip-address-restrictions). The list of IP addresses to configure would be the IP address of your search service and the IP address range of `AzureCognitiveSearch` service tag.
51+
52+
Details for accessing data in SQL server on an Azure VM are outlined [here](search-howto-connecting-azure-sql-iaas-to-azure-search-using-indexers.md)
53+
54+
### Configure network security group (NSG) rules
55+
56+
When accessing data in a SQL managed instance, or when an Azure VM is used as the web service URI for a [Custom Web Api skill](cognitive-search-custom-skill-web-api.md), customers need not be concerned with specific IP addresses.
57+
58+
In such cases, the Azure VM, or the SQL managed instance can be configured to reside within a virtual network. Then a network security group can be configured to filter the type of network traffic that can flow in and out of the virtual network subnets and network interfaces.
59+
60+
The `AzureCognitiveSearch` service tag can be directly used in the inbound [NSG rules](https://docs.microsoft.com/azure/virtual-network/manage-network-security-group#work-with-security-rules) without needing to look up its IP address range.
61+
62+
More details for accessing data in a SQL managed instance are outlined [here](search-howto-connecting-azure-sql-mi-to-azure-search-using-indexers.md)
63+
64+
### CosmosDB "Indexing" isn't enabled
4165

4266
Azure Cognitive Search has an implicit dependency on Cosmos DB indexing. If you turn off automatic indexing in Cosmos DB, Azure Cognitive Search returns a successful state, but fails to index container contents. For instructions on how to check settings and turn on indexing, see [Manage indexing in Azure Cosmos DB](https://docs.microsoft.com/azure/cosmos-db/how-to-manage-indexing-policy#use-the-azure-portal).
4367

44-
## Document Processing Errors
68+
## Document processing errors
4569

4670
### Unprocessable or unsupported documents
4771

@@ -76,7 +100,7 @@ api-key: [admin key]
76100
}
77101
```
78102

79-
## Index Errors
103+
## Index errors
80104

81105
### Missing documents
82106

0 commit comments

Comments
 (0)