简体   繁体   English

无法从 Azure Synapse 访问具有防火墙限制的 Cosmos Db

[英]Can't access Cosmos Db that has firewall restrictions from Azure Synapse

I am attempting to setup Synapse to access a Cosmos Db that has firewall rules set to only allow whitelisted IPs.我正在尝试设置 Synapse 以访问防火墙规则设置为仅允许列入白名单的 IP 的 Cosmos Db。

After a bit of research, I came across this article:经过一番研究,我看到了这篇文章:

Securing Azure Synapse Workspaces?保护 Azure Synapse 工作区? Beware of One Inescapable Networking Blocker |当心一个不可避免的网络拦截器 | by Moussa Taifi PhD |穆萨泰菲博士 | Towards Dev走向发展

According to that post, the only option is to whitelist the entire range of IPs that might be used by the pool.根据该帖子,唯一的选择是将池可能使用的整个 IP 范围列入白名单。 Can someone let me know if this is indeed the case?如果确实如此,有人可以告诉我吗? I started looking at private endpoints as that seems like a perfect solution, but I can't get it to work.我开始研究私有端点,因为这似乎是一个完美的解决方案,但我无法让它发挥作用。 I tried the following multiple times:我多次尝试以下操作:

Create new CosmosDb with Azure Synapse Link enabled在启用 Azure Synapse Link 的情况下创建新的 CosmosDb

Restrict to Selected.networks仅限于选定的网络

Create a new DB and Container创建一个新的数据库和容器

Verify that I can't add a new item验证我不能添加新项目

Add my IP添加我的 IP

Add new item添加新项目

Create a new Synapse Workspace, choosing Managed VNet创建一个新的 Synapse 工作区,选择托管 VNet

After creation, verify that the Integration Runtime is in the Managed VNet.创建后,验证集成运行时是否位于托管 VNet 中。

Create two new private endpoints for my Cosmos db.为我的 Cosmos 数据库创建两个新的专用端点。 One for type Sql, and one for Analytical (I'm not sure which I need yet)一种用于 Sql 类型,另一种用于分析(我不确定我需要哪种)

Go to the Private Link center and approve both end points Go 到私链中心,两端点审批

Data > Connect to External Data数据 > 连接到外部数据

Ensure that my runtime is in the Manage VNet确保我的运行时在管理 VNet 中

Select my DB Select 我的数据库

I waited 10 min, but the managed endpoint list is stuck at “Refreshing.”我等了 10 分钟,但托管端点列表停留在“正在刷新”。 I continued to save anyway, but when I try to make a SQL call (after creating the credential), I get:无论如何我继续保存,但是当我尝试拨打 SQL 电话时(在创建凭据之后),我得到:

Resolving CosmosDB path has failed with error 'Access to the database account '*******' is forbidden.'.解析 CosmosDB 路径失败,出现错误“禁止访问数据库帐户‘*******’。”。

The endpoints are permanently "Refreshing" in both the properties of the connection and also in the Manage Private Endpoints.端点在连接属性和管理专用端点中永久“刷新”。 The end point links are "approved" and show as such in Cosmos DB.终点链接是“已批准”的,并在 Cosmos DB 中显示为这样。

Can anyone let me know:谁能告诉我:

Are Private endpoints a method that I can use to connect my Synapse Workspace to my locked down Cosmos DB?私有终结点是一种可用于将 Synapse Workspace 连接到锁定的 Cosmos DB 的方法吗?

If so, what might I be doing wrong?如果是这样,我可能做错了什么?

Thanks!谢谢!

You should consider opening a support case in the case of misconfiguration in your settings.如果您的设置配置错误,您应该考虑打开一个支持案例。

There should be an option to allow access to Azure IPs.应该有一个选项允许访问 Azure IP。 This is contained in documentation located here:这包含在位于此处的文档中:

Add a managed private endpoint for Azure Cosmos DB analytical store 为 Azure Cosmos DB 分析存储添加托管专用终结点

Sign into the Azure portal.登录 Azure 门户。

From the Azure portal, navigate to your Synapse Analytics workspace and open the Overview pane.从 Azure 门户导航到您的 Synapse Analytics 工作区并打开概述窗格。

Launch Synapse Studio by navigating to Getting Started pane and select Open under Open Synapse Studio.通过导航到“入门”窗格和 select 在“打开 Synapse Studio”下打开来启动 Synapse Studio。

In the Synapse Studio, open the Manage tab.在 Synapse Studio 中,打开“管理”选项卡。

Navigate to Managed private endpoints and select New导航到托管专用端点和 select 新

Create a new private endpoint for analytical store.为分析存储创建一个新的专用端点。

Select Azure Cosmos DB(SQL API) account type > Continue. Select Azure Cosmos DB(SQL API) 帐户类型 > 继续。

Select Azure Cosmos DB SQL API to create a private endpoint. Select Azure Cosmos DB SQL API 创建专用端点。

Fill out the New managed private endpoint form with the following details:使用以下详细信息填写新托管专用端点表单:

Name - Name for your managed private endpoint.名称 - 托管专用终结点的名称。 This name cannot be updated after it's created.此名称创建后无法更新。 Description - Provide a friendly description to identify your private endpoint.说明 - 提供友好的说明以识别您的专用端点。 Azure subscription - Select an Azure Cosmos DB account from the list of available accounts in your Azure subscriptions. Azure 订阅 - Azure 订阅中的可用帐户列表中的 Select 和 Azure Cosmos DB 帐户。 Azure Cosmos DB account name - Select an existing Azure Cosmos DB account of type SQL or MongoDB. Target sub-resouce - Select one of the following options: Analytical: If you want to add the private endpoint for Azure Cosmos DB analytical store. Azure Cosmos DB account name - Select an existing Azure Cosmos DB account of type SQL or MongoDB. Target sub-resouce - Select one of the following options: Analytical: If you want to add the private endpoint for Azure Cosmos DB analytical store. Sql (or MongoDB): If you want to add OLTP or transactional account endpoint. Sql(或 MongoDB):如果要添加 OLTP 或交易帐户端点。 Note笔记

You can add both transactional store and analytical store private endpoints to the same Azure Cosmos DB account in an Azure Synapse Analytics workspace.您可以将事务存储和分析存储专用终结点添加到 Azure Synapse Analytics 工作区中的同一个 Cosmos DB 帐户 Azure。 If you only want to run analytical queries, you may only want to map the analytical private endpoint.如果只想运行分析查询,则可能只需要 map 分析专用端点。

Choose analytical for the target subresource.为目标子资源选择分析。

After creating, go to the private endpoint name and select Manage approvals in Azure portal.创建后,go 到专用端点名称和 select 在 Azure 门户中管理批准。

Navigate to your Azure Cosmos DB account, select the private endpoint, and select Approve.导航到您的 Azure Cosmos DB 帐户、select 专用端点和 select 批准。

Navigate back to Synapse Analytics workspace and click Refresh on the Managed private endpoints pane.导航回 Synapse Analytics 工作区,然后单击托管专用端点窗格上的刷新。 Verify that private endpoint is in Approved state.验证专用终结点是否已批准 state。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从 Azure Synapse Notebook 访问 PostgreSQL - Access PostgreSQL from Azure Synapse Notebook 如何将 Java 客户端连接到 Windows 10 上的 Azure Cosmos db 模拟器,找不到证书 - How to connect a Java client to Azure Cosmos db emulator on Windows 10, can't find cert 请求通过服务端点源自 .NET。 这已被您的 Cosmos DB 帐户防火墙设置阻止 - Request originated from VNET through service endpoint. This is blocked by your Cosmos DB account firewall settings 找不到资源 Azure Cosmos DB - Resource Not Found Azure Cosmos DB Azure Cosmos DB 连接速度慢 - Azure Cosmos DB Connection Slow 如何使用查询从 azure cosmos db 使用 cosmos batch 存储超过 100 条记录 - How to store more than 100 records using cosmos batch from azure cosmos db using query 无法从 Azure Function 连接到 Azure Cosmos DB。 获取“Microsoft.Azure.Cosmos.Direct:Object 引用未设置为 object 的实例 - Unable to Connect from Azure Function to Azure Cosmos DB. Getting "Microsoft.Azure.Cosmos.Direct: Object reference not set to an instance of an object Azure Cosmos db 监控指标 - Azure Cosmos db monitoring metrics Azure Synapse - Github 个人访问令牌无效 - Azure Synapse - Github personal access token is invalid Azure Cosmos DB 模拟器 - 无效的 SSL 证书 - Azure Cosmos DB Emulator - Invalid SSL Certificate
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM