借助 Cloud KMS Inventory Service 的 Cloud Audit Logs,您可以跟踪对资源执行的管理和数据访问操作,从而帮助您监控访问和配置更改。您可以在 Logs Explorer 中查询这些日志,并查看哪些 Cloud KMS Inventory Service API 方法会生成 Cloud Audit Logs。
如需详细了解 Cloud Audit Logs,请参阅以下文档:
服务名称
如需查看 Cloud KMS Inventory Service 审核日志,请执行以下操作:
在 Google Cloud 控制台中,前往 Logs Explorer 页面:
将以下查询复制并粘贴到Logs Explorer的查询字段中,然后点击运行查询。
protoPayload.serviceName="kmsinventory.googleapis.com"
方法(按权限类型)
每个 IAM 权限都有一个 type 属性,该属性的值是一个枚举,可以是以下四个值之一:ADMIN_READ、ADMIN_WRITE、DATA_READ 或 DATA_WRITE。在您调用某个方法时,Cloud KMS Inventory Service 会生成一个审核日志,其类别取决于执行该方法所需权限的 type 属性。需要 IAM 权限且 type 属性值为 DATA_READ、DATA_WRITE 或 ADMIN_READ 的方法会生成数据访问审核日志。需要 IAM 权限且 type 属性值为 ADMIN_WRITE 的方法会生成管理员活动审核日志。
| 权限类型 | 方法 |
|---|---|
OTHER |
google.cloud.kms.inventory.v1.KeyDashboardService.ListCryptoKeys:如需启用此日志,请在服务 cloudkms.googleapis.com 下启用 ADMIN_READ。google.cloud.kms.inventory.v1.KeyTrackingService.GetProtectedResourcesSummary:如需启用此日志,请在服务 cloudkms.googleapis.com 下启用 ADMIN_READ。google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources:如需启用此日志,请在服务 cloudkms.googleapis.com 下启用 ADMIN_READ。 |
API 接口审核日志
如需了解如何针对每种方法评估权限以及评估哪些权限,请参阅 Cloud KMS Inventory Service 的 Identity and Access Management 文档。
google.cloud.kms.inventory.v1.KeyDashboardService
以下审核日志与属于 google.cloud.kms.inventory.v1.KeyDashboardService 的方法相关联。
ListCryptoKeys
- 方法:
google.cloud.kms.inventory.v1.KeyDashboardService.ListCryptoKeys - 审核日志类型:数据访问
- 权限:
cloudkms.cryptoKeys.list - ADMIN_READ
- 方法是长时间运行的操作或流式传输操作:否。
- 此方法的过滤条件:
protoPayload.methodName="google.cloud.kms.inventory.v1.KeyDashboardService.ListCryptoKeys"
google.cloud.kms.inventory.v1.KeyTrackingService
以下审核日志与属于 google.cloud.kms.inventory.v1.KeyTrackingService 的方法相关联。
GetProtectedResourcesSummary
- 方法:
google.cloud.kms.inventory.v1.KeyTrackingService.GetProtectedResourcesSummary - 审核日志类型:数据访问
- 权限:
cloudkms.cryptoKeys.get - ADMIN_READ
- 方法是长时间运行的操作或流式传输操作:否。
- 此方法的过滤条件:
protoPayload.methodName="google.cloud.kms.inventory.v1.KeyTrackingService.GetProtectedResourcesSummary"
SearchProtectedResources
- 方法:
google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources - 审核日志类型:数据访问
- 权限:
cloudkms.cryptoKeys.get - ADMIN_READcloudkms.protectedResources.search - ADMIN_READ
- 方法是长时间运行的操作或流式传输操作:否。
- 此方法的过滤条件:
protoPayload.methodName="google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources"