【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]

 

posted @   路边两盏灯  阅读(25)  评论(1编辑  收藏  举报
相关博文:
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
历史上的今天:
2023-05-22 【Azure 环境】标准版 Logic App 如何查看 Workflow的执行成功数和失败数的指标呢?
点击右上角即可分享
微信分享提示