如何监视 Azure Blob 存储上的读写活动

How to monitor read write activities on Azure Blob Storage

需要弄清楚如何 log/retrieve 关于谁(哪个 Azure AD 用户)在我们的 Azure Blob 存储中有 read/write Blob 的信息。

我知道您可以使用此功能打开存储帐户级别的日志记录:

我可以在日志中看到对 blob 执行的不同 api 调用,但是如果我自己通过 azure 门户打开一些 blob,我看不到这个 activity 记录在日志中。任何想法如何监控这个?我需要它用于审计目的。

当您 enable Storage Analytics 使用 Portal 时,您的 Blob 上将有 $logs 个文件夹,其中包含存储日志。

当你使用 Azure AD 身份验证时,你需要配置 2.0 logs 并使用 UserPrincipalName 列来识别用户并解析带有 JSON AuthorizationDetail.action 的列来识别用户对存储的操作,即 Microsoft.Storage/storageAccounts/blobServices/containers/read 用于列出容器中的 blob。

您将不会捕获日志格式为 1.0 的 OAuth/Azure AD 身份验证请求。

在 Azure Storage Uservoice 上也有 integration with LogAnalytics 简化日志监控的请求,私有预览应该在本月开始。