【Azure 存储服务】App Service 访问开启防火墙的存储账号时遇见 403 (This request is not authorized to perform this operation.)

本文涉及的产品
云防火墙,500元 1000GB
简介: 【Azure 存储服务】App Service 访问开启防火墙的存储账号时遇见 403 (This request is not authorized to perform this operation.)

问题描述

需要 App Service 访问开启防火墙的存储账号。存储账号中设置为允许选中的VNET访问,同时允许了信任的Azure服务的访问,但是仍然报错 “403 (This request is not authorized to perform this operation.)

因为App Service 并没有与Stroage Account允许访问所选的VNET进行集成,所以App Service是通过Outbound IP地址与Storage Account进行通信。当Storage Account与App Service处于同一数据中心时,把App Service所有的出口IP地址都添加到Storage Account的 Firewall中,依然出现403问题。这是什么原因呢?

 

问题分析

查看Storage Account的IP网络规则文档,发现其中有一点 “限制对与存储帐户部署在同一区域中的 Azure 服务的访问 ” 这是因为与存储帐户部署在同一区域中的Azure服务使用专用的 Azure IP 地址进行通信。 因此,不能基于特定的 Azure 服务的公共出站 IP(App Service的出口IP) 地址范围来限制对其的访问。

 

如何来避免这个问题呢?

1)当App Service 与 Stroage Account 都处于同一区域时,可以把App Service集成在Storage Account所允许访问的VNET中,使得App Service与Storage Account通过VNET进行通信。

2)当App Service 与 Storage Account 不在同一个区域时,在Storage Account的Firewall中添加 所有App Service的出口IP地址为允许访问即可。

 

参考文档

配置 Azure 存储防火墙和虚拟网络: https://docs.azure.cn/zh-cn/storage/common/storage-network-security?toc=%2Fstorage%2Fblobs%2Ftoc.json&tabs=azure-portal#grant-access-from-an-internet-ip-range

将应用与 Azure 虚拟网络集成: https://docs.azure.cn/zh-cn/app-service/web-sites-integrate-with-vnet#regional-vnet-integration

相关文章
|
9天前
【Azure Logic App】使用Event Hub 连接器配置 Active Directory OAuth 认证无法成功连接到中国区Event Hub的解决之法
An exception occurred while retrieving properties for Event Hub: logicapp. Error Message: 'ClientSecretCredential authentication failed: AADSTS90002: Tenant 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' not found. Check to make sure you have the correct tenant ID and are signing into the correct cloud. Che
|
15天前
|
安全
【Azure App Service】App service无法使用的情况分析
App Service集成子网后,如果子网网段中的剩余IP地址非常少的情况下,会在App Service实例升级时( 先加入新实例,然后在移除老实例 )。新加入的实例不能被分配到正确的内网IP地址,无法成功的访问内网资源。 解决方法就是为App Service增加子网地址, 最少需要/26 子网网段地址。
|
24天前
|
开发框架 .NET Windows
【App Service】在App Service中配置Virtual applications and directories,访问目录中的静态文件报错404
【App Service】在App Service中配置Virtual applications and directories,访问目录中的静态文件报错404
|
24天前
|
C++
【Azure Logic App】使用Event Hub 连接器配置 Active Directory OAuth 认证无法成功连接到中国区Event Hub
【Azure Logic App】使用Event Hub 连接器配置 Active Directory OAuth 认证无法成功连接到中国区Event Hub
|
24天前
【Azure Logic App】在逻辑应用中开启或关闭一个工作流是否会对其它工作流产生影响呢?
【Azure Logic App】在逻辑应用中开启或关闭一个工作流是否会对其它工作流产生影响呢?
|
24天前
|
安全 前端开发 网络安全
【Azure App Service】访问App Service应用报错 SSL: WRONG_VERSION_NUMBER
【Azure App Service】访问App Service应用报错 SSL: WRONG_VERSION_NUMBER
|
26天前
|
安全 Linux 应用服务中间件
在Linux中,包过滤防火墙与代理应用防火墙有什么区别?有哪些相应的产品?
在Linux中,包过滤防火墙与代理应用防火墙有什么区别?有哪些相应的产品?
|
15天前
|
机器学习/深度学习 安全 网络协议
Linux防火墙iptables命令管理入门
本文介绍了关于Linux防火墙iptables命令管理入门的教程,涵盖了iptables的基本概念、语法格式、常用参数、基础查询操作以及链和规则管理等内容。
175 73
|
20天前
|
Linux 网络安全
linux关闭方防火墙的命令
linux关闭方防火墙的命令
32 2
|
26天前
|
Linux 网络安全
在Linux中,如何设置防火墙规则?
在Linux中,如何设置防火墙规则?