收集 Google Cloud Identity Context 日志
解析器版本:1.0
本文档介绍了如何使用 Cloud Storage V2 将 Google Cloud Identity 上下文日志注入到 Google Security Operations。
Cloud Identity 情境提供用户和设备信息,用于做出身份感知访问决策,包括设备状态、用户属性和用于丰富安全情境的群组成员资格。
准备工作
请确保满足以下前提条件:
- Google SecOps 实例
- 启用了 Cloud Storage API 的 Google Cloud 项目
- 创建和管理 Cloud Storage 存储桶的权限
- 管理 Cloud Storage 存储桶上的 Identity and Access Management (IAM) 政策的权限
- 包含用户和设备的 Google Workspace 或 Cloud Identity 环境
- 在 Google Cloud 项目中创建日志接收器的 IAM 权限
- Logging Admin 角色 (
roles/logging.admin) 或等效权限
创建 Cloud Storage 存储桶
使用 Google Cloud 控制台
- 前往 Google Cloud 控制台。
- 选择您的项目或创建一个新项目。
- 在导航菜单中,前往 Cloud Storage > 存储桶。
- 点击创建存储分区。
提供以下配置详细信息:
设置 值 指定存储桶的名称 输入一个全局唯一的名称(例如 cloud-identity-context-logs)位置类型 根据您的需求进行选择(单区域、双区域、多区域) 位置 选择位置(例如 us-central1)存储类别 标准(推荐用于频繁访问的日志) 访问权限控制 统一(推荐) 保护工具 可选:启用对象版本控制或保留政策 点击创建。
使用 gcloud 命令行工具
或者,使用
gcloud命令创建存储桶:gcloud storage buckets create gs://cloud-identity-context-logs \ --location=us-central1 \ --default-storage-class=STANDARD- 将
cloud-identity-context-logs替换为您的存储桶名称(全局唯一)。 - 将
us-central1替换为您偏好的区域(例如us-central1、europe-west1)。
- 将
将 Cloud Identity Context 日志导出到 Cloud Storage
Cloud Identity 上下文日志会收集到 Cloud Logging 中。如需将这些日志导出到 Cloud Storage,请创建一个 Logging 接收器:
- 前往 Google Cloud 控制台。
- 选择您的项目。
- 前往日志记录 > 日志路由器。
- 点击创建接收器。
输入以下详细信息:
- 接收器名称:
cloud-identity-context-sink - 接收器说明:可选说明
- 点击下一步。
- 接收器名称:
在选择接收器服务部分中:
- 选择 Cloud Storage 存储桶作为接收器服务
- 选择您之前创建的存储桶
- 点击下一步。
在选择要包含在接收器中的日志部分,使用以下过滤条件:
resource.type="audited_resource" protoPayload.serviceName="cloudidentity.googleapis.com"点击下一步。
检查接收器配置,然后点击创建接收器。
复制确认消息中显示的服务账号(例如
service-PROJECT_NUMBER@gcp-sa-logging.iam.gserviceaccount.com)。前往 Cloud Storage > 存储桶。
选择您的存储桶。
前往权限标签页。
点击授予访问权限。
粘贴第 9 步中的服务账号邮箱。
分配 Storage Object Creator 角色。
点击保存。
检索 Google SecOps 服务账号
- 依次前往设置 > 数据管理 > Feed。如果您使用的是 SIEM-only 平台,请依次前往设置 > Feed。
- 点击添加新新闻信息流。
- 选择 Google Cloud Storage V2 作为来源类型。
- 点击获取服务账号。
系统会显示一个专属的服务账号邮箱,例如:
chronicle-12345678@chronicle-gcp-prod.iam.gserviceaccount.com复制此邮箱。您将在下一步骤中用到它。
向 Google SecOps 服务账号授予 IAM 权限
使用 Google Cloud 控制台
- 前往 Cloud Storage > 存储桶。
- 点击您的存储桶名称。
- 前往权限标签页。
- 点击授予访问权限。
- 提供以下配置详细信息:
- 添加主账号:粘贴 Google SecOps 服务账号邮箱。
- 分配角色:选择 Storage Object Viewer。
- 点击保存。
使用 gcloud 命令行工具
使用以下命令:
gcloud storage buckets add-iam-policy-binding gs://cloud-identity-context-logs \ --member="serviceAccount:<SECOPS_SERVICE_ACCOUNT_EMAIL>" \ --role="roles/storage.objectViewer"将
cloud-identity-context-logs:替换为您的存储桶名称。<SECOPS_SERVICE_ACCOUNT_EMAIL>:替换为 Google SecOps 服务账号电子邮件地址。
在 Google SecOps 中配置 Feed 以注入 Cloud Identity 上下文日志
- 依次前往设置 > 数据管理 > Feed。如果您使用的是 SIEM-only 平台,请依次前往设置 > Feed。
- 点击添加新新闻信息流。
- 在下一页上,点击配置单个 Feed。
- 在 Feed 名称字段中,输入 Feed 的名称(例如
Cloud Identity Context Logs)。 - 选择 Google Cloud Storage V2 作为来源类型。
- 选择 Google Cloud Identity Context 作为日志类型。
- 点击下一步。
为以下输入参数指定值:
存储桶 URI:输入 Cloud Storage 存储桶 URI:
gs://cloud-identity-context-logs/来源删除选项:根据您的偏好选择删除选项:
- 永不删除文件:转移后永不删除任何文件。
- 删除已转移的文件和空目录:在成功转移后删除文件和空目录。
文件存在时间上限(天):包含在过去指定天数内修改过的文件。默认值为 180。
资产命名空间:资产命名空间。
注入标签:应用于此 Feed 中所有事件的标签。
点击下一步。
在最终确定界面中查看新的新闻信息流配置,然后点击提交。
如需详细了解 Google SecOps Feed,请参阅 Google SecOps Feed 文档。如需了解每种 Feed 类型的要求,请参阅按类型配置 Feed。
如果您在创建 Feed 时遇到问题,请与 Google SecOps 支持团队联系。
字段映射参考
Cloud Identity 上下文解析器会从 Cloud Identity 中提取用户和设备标识信息,包括用户属性、邮箱、群组成员资格、组织部门路径和设备安全状况数据。它会将这些字段映射到实体类型为 USER 的 UDM entity 模型。
UDM 映射表
| 日志字段 | UDM 映射 | 逻辑 |
|---|---|---|
product_object_id |
entity.asset.product_object_id |
直接映射 |
data.protoPayload.requestMetadata.callerIp |
entity.ip |
已合并 |
authorizationInfodata_granted_label |
entity.labels |
已合并 |
authorizationInfodata_permission_label |
entity.labels |
已合并 |
authorizationInfodata_resource_label |
entity.labels |
已合并 |
data_logname_label |
entity.labels |
已合并 |
field_ |
entity.labels |
已合并 |
referencedTables_datasetId_label |
entity.labels |
已合并 |
referencedTables_projectId_label |
entity.labels |
已合并 |
referencedTables_tableId_label |
entity.labels |
已合并 |
referencedViews_datasetId_label |
entity.labels |
已合并 |
referencedViews_projectId_label |
entity.labels |
已合并 |
referencedViews_tableId_label |
entity.labels |
已合并 |
value |
entity.location.country_or_region |
直接映射 |
data.protoPayload.resourceName |
entity.resource.name |
直接映射 |
company_name |
entity.user.company_name |
已重命名/映射 |
depart |
entity.user.department |
已合并 |
organisation |
entity.user.department |
已合并 |
alias |
entity.user.email_addresses |
已合并 |
data.protoPayload.authenticationInfo.principalEmail |
entity.user.email_addresses |
已合并 |
email |
entity.user.email_addresses |
已合并 |
emails |
entity.user.email_addresses |
已合并 |
primaryEmail |
entity.user.email_addresses |
已合并 |
employeeId |
entity.user.employee_id |
直接映射 |
employee_id |
entity.user.employee_id |
直接映射 |
ext.value |
entity.user.employee_id |
直接映射 |
first_name |
entity.user.first_name |
直接映射 |
givenName |
entity.user.first_name |
直接映射 |
name.givenName |
entity.user.first_name |
直接映射 |
orgUnitPath |
entity.user.group_identifiers |
已合并 |
familyName |
entity.user.last_name |
直接映射 |
last_name |
entity.user.last_name |
直接映射 |
name.familyName |
entity.user.last_name |
直接映射 |
office_address.country_or_region |
entity.user.office_address.country_or_region |
直接映射 |
office_address.state |
entity.user.office_address.state |
直接映射 |
number |
entity.user.phone_numbers |
已合并 |
data.insertId |
entity.user.product_object_id |
直接映射 |
id |
entity.user.product_object_id |
直接映射 |
title |
entity.user.title |
直接映射 |
familyName |
entity.user.user_display_name |
直接映射 |
givenName |
entity.user.user_display_name |
直接映射 |
name.fullName |
entity.user.user_display_name |
直接映射 |
user_display_name |
entity.user.user_display_name |
直接映射 |
data.insertId |
entity.user.userid |
直接映射 |
userid |
entity.user.userid |
直接映射 |
windows_sid |
entity.user.windows_sid |
直接映射 |
value |
metadata.event_timestamp |
已解析为 ISO8601 |
| 不适用 | metadata.description |
常量:From BigQuery |
| 不适用 | metadata.entity_type |
常量:USER |
| 不适用 | metadata.product_entity_id |
常量:unknown |
| 不适用 | metadata.product_name |
常量:Cloud Identity |
| 不适用 | metadata.vendor_name |
常量:Google |
更新日志
需要更多帮助?获得社区成员和 Google SecOps 专业人士的解答。