Azure 存储网络安全组

Azure Storage Network Security Group

我想将 Azure 存储帐户添加到 VNet/网络安全组,但一直收到授权失败消息。

The error was: 'code: AuthorizationFailure content: _CYCLIC_OBJECT_ message: This request is not authorized to perform this operation.

我已将 VNet 添加到具有 Microsoft.Storage 服务终结点的存储帐户,并且子网已与 NSG 相关联。

我已经为 IP 地址创建了入站规则,并使用 NSG 上的存储服务标签创建了出站规则。

我什至尝试过使用全 Internet 入站规则,但没有成功。

如果我在存储帐户的防火墙和虚拟网络设置中将 IP 地址列入白名单,则它可以正常工作。

有什么我遗漏的吗?

在您的评论中,您希望通过将存储帐户与 VNet 和 NSG 相关联来管理其防火墙规则。这方向不对。

您不能使用 network security rules for Azure Storage Services because the storage account can not be inside a VNet or a part of a VNet and the NSG works at the IP address, port, protocol level. For more information, you could refer to

此外,如果您在存储帐户的 Firewall and Virtual Network 设置中添加了选定的 VNet,则它 grants access storage account 来自虚拟网络。因此只有选定的 VNet 才能访问你的存储帐户。如果您不在防火墙中添加其外部 IP 地址,它将显示拒绝从您的公司网络访问。

您可能想要创建 Private Endpoints for your storage account,它会将私有 IP 地址从 VNet 分配给存储帐户,并通过私有 link 保护 VNet 与存储帐户之间的所有流量。这样,您还可以在使用专用端点时使用防火墙阻止通过 public 端点的所有访问。请注意,目前您无法为专用终结点配置 NSG 规则和用户定义的路由。