【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]
当在复杂的环境中面临问题,格物之道需:浊而静之徐清,安以动之徐生。 云中,恰是如此!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
2023-05-22 【Azure 环境】标准版 Logic App 如何查看 Workflow的执行成功数和失败数的指标呢?