【Azure Storage Account】使用Azure Policy来检查Storage Account中是否有开启匿名访问的Container

简介: 【Azure Storage Account】使用Azure Policy来检查Storage Account中是否有开启匿名访问的Container

问题描述

因为Storage Account中的Container可以开启匿名访问,因安全要求,需要检测出那些Container开启了匿名访问。所以使用Azure Policy策略来进行检测。

但是,想使用以上规则,保存报错。

The policy definition 'xxxxxxx' rule is invalid. The resource type 'storageAccounts/blobServices/containers' referenced by the 'field' property 'Microsoft.Storage/storageAccounts/blobServices/containers/publicAccess' of the policy rule doesn't exist under provider 'Microsoft.Storage'.

 

问题解答

经过对Storage Account的内置Policy (Configure your Storage account public access to be disallowed)对比,发现它使用的 field 为 Microsoft.Storage/storageAccounts/allowBlobPublicAccess ,只是它只能检测到Stroage Account层面,无法继续深入到Storage Account下的Container中。无法达到列出被设置为匿名的Container名称的目的!

最终,经过和Azure支持团队确认,Azure Policy Rule无法完成Audit Blob Container匿名访问配置的需求。

最后,提供了使用 Blob Inventory 可以在相关数据内查看到关于Container匿名访问配置的信息作为替代方案。

启用 Azure 存储 Blob 清单报表:https://docs.azure.cn/zh-cn/storage/blobs/blob-inventory-how-to?tabs=azure-portal

 

 

 

[END]

相关文章
|
14天前
|
存储 安全
【Azure Policy】使用deployIfNotExists 把 Azure Activity logs 导出保存在Storage Account
本文描述了如何使用 Azure Policy 对订阅下的所有 Activity Log 配置 Diagnostic Setting。具体要求包括:在 Subscription 或 Management Group 级别启用 Activity Log 功能、纠正已启用 Activity Log 的订阅参数配置、将日志存储在特定 Storage Account 中并保留 6 个月,以及收集特定类型的日志(如 Administrative、Security、Alert、Recommendation 和 ResourceHealth)。文章还介绍了常见错误及解决方法,并提供了相关参考链接。
36 9
|
8天前
|
数据中心
【Azure Service Bus】创建 ServiceBus 的Terraform脚本报错GetAuthorizationRule: Invalid input
为了最佳的体验,需要确保使用最新 Terraform azurerm 组件!
|
24天前
|
存储 网络安全 数据中心
【Azure 存储服务】App Service 访问开启防火墙的存储账号时遇见 403 (This request is not authorized to perform this operation.)
【Azure 存储服务】App Service 访问开启防火墙的存储账号时遇见 403 (This request is not authorized to perform this operation.)
【Azure 存储服务】App Service 访问开启防火墙的存储账号时遇见 403 (This request is not authorized to perform this operation.)
|
25天前
|
存储 安全 API
【Azure 存储服务】关于对Azure Storage Account 的 Folder 权限管理和设定
【Azure 存储服务】关于对Azure Storage Account 的 Folder 权限管理和设定
|
24天前
|
存储 安全 API
【Azure API Management】实现在API Management服务中使用MI(管理标识 Managed Identity)访问启用防火墙的Storage Account
【Azure API Management】实现在API Management服务中使用MI(管理标识 Managed Identity)访问启用防火墙的Storage Account
|
24天前
|
存储 Java 关系型数据库
【Azure 存储服务】关于Storage Account Queue使用的几个问题
【Azure 存储服务】关于Storage Account Queue使用的几个问题
|
24天前
|
Java
【Azure 应用服务】在App Service 中如何通过Managed Identity获取访问Azure资源的Token呢? 如Key Vault
【Azure 应用服务】在App Service 中如何通过Managed Identity获取访问Azure资源的Token呢? 如Key Vault
|
24天前
【Azure 应用服务】Azure Function 启用 Managed Identity后, Powershell Funciton出现 ERROR: ManagedIdentityCredential authentication failed
【Azure 应用服务】Azure Function 启用 Managed Identity后, Powershell Funciton出现 ERROR: ManagedIdentityCredential authentication failed
|
24天前
|
存储 Linux API
【Azure 应用服务】Azure App Service能否使用Storage Account File Share
【Azure 应用服务】Azure App Service能否使用Storage Account File Share
|
24天前
|
存储 安全 Shell
【Azure 存储服务】关于Azure Storage Account(存储服务) 基于AAD用户的权限设定以及SAS key的管理问题
【Azure 存储服务】关于Azure Storage Account(存储服务) 基于AAD用户的权限设定以及SAS key的管理问题