收集 Google Cloud Identity Context 日志

解析器版本:1.0

支持的平台:

本文档介绍了如何使用 Google Cloud Storage V2 将 Google Cloud Identity Context 日志注入到 Google Security Operations。

Cloud Identity Context 提供用户和设备信息,用于做出身份感知访问权限决策,包括设备姿态、用户属性和用于安全情境丰富化的群组成员身份。

准备工作

请确保满足以下前提条件:

  • Google SecOps 实例
  • 已启用 Cloud Storage API 的 GCP 项目
  • 创建和管理 GCS 存储分区的权限
  • 管理 GCS 存储分区的 IAM 政策的权限
  • 包含用户和设备的 Google Workspace 或 Cloud Identity 环境
  • 在 GCP 项目中创建日志记录接收器的 IAM 权限
  • 日志记录管理员角色 (roles/logging.admin) 或同等权限

创建 Google Cloud Storage 存储桶

使用 Google Cloud 控制台

  1. 前往 Google Cloud 控制台
  2. 选择您的项目或创建新项目。
  3. 在导航菜单中,依次前往 Cloud Storage > 存储分区
  4. 点击创建存储分区
  5. 提供以下配置详细信息:

    设置
    为存储桶命名 输入一个全局唯一的名称(例如 cloud-identity-context-logs
    位置类型 根据您的需求进行选择(区域级、双区域、多区域)
    位置 选择营业地点(例如 us-central1
    存储类别 标准(建议用于经常访问的日志)
    访问权限控制 均匀(推荐)
    保护工具 可选:启用对象版本控制或保留政策
  6. 点击创建

使用 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-central1europe-west1)。

将 Cloud Identity Context 日志导出到 GCS

Cloud Identity Context 日志会收集到 Cloud Logging 中。如需将这些日志导出到 GCS,请创建 Cloud Logging 接收器:

  1. 前往 Google Cloud 控制台
  2. 选择您的项目。
  3. 前往日志记录 > 日志路由器
  4. 点击创建接收器
  5. 输入以下详细信息:

    • 接收器名称cloud-identity-context-sink
    • 接收器说明:可选说明
    • 点击下一步
  6. 选择接收器服务部分中:

    • 选择 Cloud Storage 存储桶作为接收器服务
    • 选择您之前创建的存储桶
    • 点击下一步
  7. 选择要包含在接收器中的日志部分,使用以下过滤条件:

        resource.type="audited_resource"
        protoPayload.serviceName="cloudidentity.googleapis.com"
    
  8. 点击下一步

  9. 检查接收器配置,然后点击创建接收器

  10. 复制确认消息中显示的服务账号(例如 service-PROJECT_NUMBER@gcp-sa-logging.iam.gserviceaccount.com)。

  11. 前往 Cloud Storage > 存储分区

  12. 选择您的存储桶。

  13. 前往权限标签页。

  14. 点击授予访问权限

  15. 粘贴第 9 步中的服务账号电子邮件地址。

  16. 分配 Storage Object Creator 角色。

  17. 点击保存

检索 Google SecOps 服务账号

  1. 依次前往 SIEM 设置 > Feed
  2. 点击添加新 Feed
  3. 选择 Google Cloud Storage V2 作为来源类型
  4. 点击获取服务账号
  5. 系统会显示一个唯一的服务账号电子邮件地址,例如:

        chronicle-12345678@chronicle-gcp-prod.iam.gserviceaccount.com
    
  6. 复制此电子邮件地址。您将在下一步骤中用到它。

向 Google SecOps 服务账号授予 IAM 权限

使用 Google Cloud 控制台

  1. 前往 Cloud Storage > 存储分区
  2. 点击您的存储桶名称。
  3. 前往权限标签页。
  4. 点击授予访问权限
  5. 提供以下配置详细信息:
    • 添加主账号:粘贴 Google SecOps 服务账号电子邮件地址。
    • 分配角色:选择 Storage Object Viewer
  6. 点击保存

使用 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 Context 日志

  1. 依次前往 SIEM 设置 > Feed
  2. 点击添加新 Feed
  3. 在下一页上,点击配置单个 Feed
  4. Feed 名称字段中,输入 Feed 的名称(例如 Cloud Identity Context Logs)。
  5. 选择 Google Cloud Storage V2 作为来源类型
  6. 选择 Google Cloud Identity Context 作为日志类型
  7. 点击下一步
  8. 为以下输入参数指定值:

    • 存储桶 URI:输入 GCS 存储桶 URI:

        gs://cloud-identity-context-logs/
      
    • 来源删除选项:根据您的偏好选择删除选项:

      • 永不删除文件:转移后永不删除任何文件。
      • 删除已转移的文件和空目录:成功转移后删除文件和空目录。
    • 文件存在时间上限(天):包含在过去指定天数内修改的文件。默认值为 180。

    • 资产命名空间资产命名空间

    • 提取标签:应用于相应 Feed 中所有事件的标签。

  9. 点击下一步

  10. 最终确定界面中查看新的 Feed 配置,然后点击提交

如需详细了解 Google Security Operations Feed,请参阅 Google Security Operations Feed 文档。如需了解每种 Feed 类型的要求,请参阅按类型划分的 Feed 配置

如果您在创建 Feed 时遇到问题,请与 Google 安全运营支持团队联系

字段映射参考

Cloud Identity Context 解析器从 Google 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 专业人士的解答。