收集 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 bucket 的權限
  • 管理 Google Cloud Storage 值區 IAM 政策的權限
  • 含有使用者和裝置的 Google Workspace 或 Cloud Identity 環境
  • 在 GCP 專案中建立記錄接收器的 IAM 權限
  • Logging 管理員角色 (roles/logging.admin) 或同等權限

建立 Google Cloud Storage bucket

使用 Google Cloud 控制台

  1. 前往 Google Cloud 控制台
  2. 選取專案或建立新專案。
  3. 在導覽選單中,依序前往「Cloud Storage」>「Bucket」
  4. 按一下「建立值區」
  5. 請提供下列設定詳細資料:

    設定
    為 bucket 命名 輸入全域不重複的名稱 (例如 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 替換為您的 bucket 名稱 (全域不重複)。
    • us-central1 替換為偏好的區域 (例如 us-central1europe-west1)。

將 Cloud Identity Context 記錄匯出至 GCS

Cloud Logging 會收集 Cloud Identity Context 記錄。如要將這些記錄匯出至 GCS,請建立 Cloud Logging 接收器:

  1. 前往 Google Cloud 控制台
  2. 選取專案。
  3. 依序前往「Logging」>「Log Router」
  4. 按一下「Create Sink」(建立接收器)
  5. 輸入下列詳細資訊:

    • 接收器名稱cloud-identity-context-sink
    • 接收器說明:選填說明
    • 點選 [下一步]。
  6. 在「選取接收器服務」部分中:

    • 選擇 Cloud Storage bucket 做為接收端服務
    • 選取您先前建立的值區
    • 點選 [下一步]。
  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」>「Buckets」

  12. 選取 bucket。

  13. 前往「權限」分頁標籤。

  14. 按一下「授予存取權」

  15. 貼上步驟 9 中的服務帳戶電子郵件地址。

  16. 指派「Storage 物件建立者」角色。

  17. 按一下 [儲存]

擷取 Google SecOps 服務帳戶

  1. 依序前往「SIEM 設定」>「動態饋給」
  2. 按一下「新增動態消息」
  3. 選取「Google Cloud Storage V2」做為「來源類型」
  4. 按一下「取得服務帳戶」
  5. 系統會顯示專屬服務帳戶電子郵件地址,例如:

        chronicle-12345678@chronicle-gcp-prod.iam.gserviceaccount.com
    
  6. 複製這個電子郵件地址,後續步驟會用到。

將 IAM 權限授予 Google SecOps 服務帳戶

使用 Google Cloud 控制台

  1. 依序前往「Cloud Storage」>「Buckets」
  2. 點按 bucket 名稱。
  3. 前往「權限」分頁標籤。
  4. 按一下「授予存取權」
  5. 請提供下列設定詳細資料:
    • 新增主體:貼上 Google SecOps 服務帳戶電子郵件地址。
    • 指派角色:選取「Storage 物件檢視者」
  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 中設定資訊提供,以便擷取 Cloud Identity 結構定義記錄

  1. 依序前往「SIEM 設定」>「動態饋給」
  2. 按一下「新增動態消息」
  3. 在下一個頁面中,按一下「設定單一動態饋給」
  4. 在「動態饋給名稱」欄位中輸入動態饋給名稱 (例如 Cloud Identity Context Logs)。
  5. 選取「Google Cloud Storage V2」做為「來源類型」
  6. 選取「Google Cloud Identity Context」做為「記錄類型」
  7. 點選「下一步」
  8. 指定下列輸入參數的值:

    • 儲存空間 bucket URI:輸入 GCS bucket URI:

        gs://cloud-identity-context-logs/
      
    • 來源刪除選項:根據偏好設定選取刪除選項:

      • 一律不刪除檔案:轉移後一律不刪除任何檔案。
      • 刪除已轉移的檔案和空白目錄:成功轉移後刪除檔案和空白目錄。
    • 檔案存在時間上限 (天):只納入在過去天數內修改的檔案。預設值為 180。

    • 資產命名空間資產命名空間

    • 擷取標籤:套用至這個動態饋給中所有事件的標籤。

  9. 點選「下一步」

  10. 在「Finalize」(完成) 畫面中檢查新的動態饋給設定,然後按一下「Submit」(提交)

如要進一步瞭解 Google Security Operations 動態消息,請參閱 Google Security Operations 動態消息說明文件。如要瞭解各類動態饋給的規定,請參閱「依類型設定動態饋給」。

如果在建立動態饋給時遇到問題,請與 Google Security Operations 支援團隊聯絡

欄位對應參考資料

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 專業人員尋求答案。