SLACK_AUDIT

支援的國家/地區:

本指南說明如何使用 Google Cloud Run Functions 或 Amazon S3 與 AWS Lambda,將 Slack 稽核記錄擷取至 Google Security Operations。

事前準備

請確認您已完成下列事前準備事項:

  • Google SecOps 執行個體。
  • Slack Enterprise Grid 方案,且具備「機構擁有者」或「管理員」存取權。
  • 下列任一項的特殊存取權:
    • Google Cloud (適用於選項 1:Cloud Run Functions 和 Cloud Scheduler),或
    • AWS (適用於選項 2:S3、IAM、Lambda、EventBridge)。

收集 Slack 稽核記錄的必要條件 (應用程式 ID、OAuth 權杖、機構 ID)

Slack 稽核記錄 API 需要具有 auditlogs:read 範圍的使用者 OAuth 權杖。您必須在企業網格組織層級安裝應用程式,才能取得這個權杖,工作區層級則不適用。

為稽核記錄建立 Slack 應用程式

  1. 使用 Enterprise Grid 機構擁有者管理員帳戶登入 Slack 管理控制台
  2. 前往 https://api.slack.com/apps,然後依序點選「Create New App」>「From scratch」
  3. 提供下列設定詳細資料:
    • 應用程式名稱:輸入描述性名稱 (例如 Google SecOps Audit Integration)。
    • 選擇要用來開發應用程式的工作區:選取「Development Slack Workspace」(開發 Slack 工作區) (機構中的任何工作區)。
  4. 點選「建立應用程式」

設定 OAuth 範圍

  1. 前往左側邊欄的「OAuth 和權限」
  2. 向下捲動至「範圍」部分。
  3. 在「使用者權杖範圍」(不是機器人權杖範圍) 下方,按一下「新增 OAuth 範圍」。
  4. 新增範圍:auditlogs:read

啟用公開發布功能

  1. 前往左側邊欄的「管理發布」
  2. 在「與其他 Workspace 分享應用程式」下方,確認所有四個部分都有綠色勾號:
    • 移除硬式編碼資訊
    • 啟用公開發布
    • 設定重新導向網址
    • 新增 OAuth 範圍
  3. 按一下「啟用公開發布」

將應用程式安裝到 Enterprise Grid 機構

  1. 前往左側邊欄的「OAuth 和權限」
  2. 按一下「Install to Organization」(安裝至機構) (請勿點選「Install to Workspace」(安裝至 Workspace))。

重要事項:請檢查安裝畫面右上方的下拉式選單,確認您是安裝至企業機構,而非個人工作區。

  1. 查看要求的權限,然後按一下「允許」
  2. 完成授權後,系統會將您重新導向回「OAuth 和權限」頁面。

擷取憑證

  1. 在「您的 Workspace 的 OAuth 權杖」下方,找出「使用者 OAuth 權杖」
  2. 複製並妥善儲存開頭為 xoxp- 的權杖 (例如 xoxp-1234567890-0987654321-1234567890-abc123def456)。

重要事項:這是 Lambda 函式或 Cloud Run 函式的 SLACK_ADMIN_TOKEN。請妥善儲存。

  1. 記下機構 ID
    • 前往 Slack 管理控制台
    • 依序前往「設定和權限」>「機構設定」
    • 複製機構 ID

選項 1:使用 Google Cloud Run 函式設定匯出 Slack 稽核記錄

這個選項會使用 Google Cloud Run Functions 和 Cloud Scheduler 收集 Slack 稽核記錄,並直接匯入 Google SecOps。

設定目錄

  1. 在本機電腦上建立新目錄,用於部署 Cloud Run 函式。
  2. Chronicle 擷取指令碼 GitHub 存放區下載下列檔案:
    • slack 資料夾下載:
      • .env.yml
      • main.py
      • requirements.txt
    • 從存放區的根目錄下載整個 common 目錄及其所有檔案:
      • common/__init__.py
      • common/auth.py
      • common/env_constants.py
      • common/ingest.py
      • common/status.py
      • common/utils.py
  3. 將所有下載的檔案放入部署目錄。

目錄結構應如下所示:

deployment_directory/
├─common/
 ├─__init__.py
 ├─auth.py
 ├─env_constants.py
 ├─ingest.py
 ├─status.py
 └─utils.py
├─.env.yml
├─main.py
└─requirements.txt

在 Google Secret Manager 中建立密鑰

  1. Google Cloud 控制台中,依序前往「安全性」>「Secret Manager」
  2. 按一下「建立密鑰」
  3. 提供 Chronicle 服務帳戶的下列設定詳細資料:
    • 「Name」(名稱):輸入 chronicle-service-account
    • 密鑰值:貼上 Google SecOps 擷取驗證 JSON 檔案的內容。
  4. 按一下「建立密鑰」
  5. 複製密鑰資源名稱,格式為:projects/<PROJECT_ID>/secrets/chronicle-service-account/versions/latest
  6. 再次按一下「建立密鑰」,建立第二個密鑰。
  7. 提供 Slack 權杖的下列設定詳細資料:
    • 「Name」(名稱):輸入 slack-admin-token
    • 密碼值:貼上 Slack 使用者 OAuth 權杖 (開頭為 xoxp-)。
  8. 按一下「建立密鑰」
  9. 複製密鑰資源名稱,格式為:projects/<PROJECT_ID>/secrets/slack-admin-token/versions/latest

設定必要的執行階段環境變數

  1. 開啟部署目錄中的 .env.yml 檔案。
  2. 使用您的值設定環境變數:
CHRONICLE_CUSTOMER_ID: "<your-chronicle-customer-id>"
CHRONICLE_REGION: us
CHRONICLE_SERVICE_ACCOUNT: "projects/<PROJECT_ID>/secrets/chronicle-service-account/versions/latest"
CHRONICLE_NAMESPACE: ""
POLL_INTERVAL: "5"
SLACK_ADMIN_TOKEN: "projects/<PROJECT_ID>/secrets/slack-admin-token/versions/latest"

更改下列內容:

  • <your-chronicle-customer-id>:您的 Google SecOps 客戶 ID。
  • <PROJECT_ID>:您的 Google Cloud 專案 ID。
  • CHRONICLE_REGION:設為 Google SecOps 區域。有效值:usasia-northeast1asia-south1asia-southeast1australia-southeast1europeeurope-west2europe-west3europe-west6europe-west9europe-west12me-central1me-central2me-west1northamerica-northeast2southamerica-east1
  • POLL_INTERVAL:函式的執行頻率間隔 (以分鐘為單位)。這個時間長度必須與 Cloud Scheduler 工作間隔相同。
  1. 儲存 .env.yml 檔案。

部署 Cloud Run 函式

  1. 在 Google Cloud 控制台中開啟終端機或 Cloud Shell
  2. 前往部署目錄:
cd /path/to/deployment_directory
  1. 執行下列指令,部署 Cloud Run 函式:
gcloud functions deploy slack-audit-to-chronicle \
  --entry-point main \
  --trigger-http \
  --runtime python39 \
  --env-vars-file .env.yml \
  --timeout 300s \
  --memory 512MB \
  --service-account <SERVICE_ACCOUNT_EMAIL>

<SERVICE_ACCOUNT_EMAIL> 替換為要讓 Cloud Run 函式使用的服務帳戶電子郵件地址。

  1. 等待部署作業完成。
  2. 部署完成後,請記下輸出內容中的函式網址

設定 Cloud Scheduler

  1. Google Cloud 控制台中,依序前往「Cloud Scheduler」>「建立工作」
  2. 提供下列設定詳細資料:
    • 「Name」(名稱):輸入 slack-audit-scheduler
    • 區域:選取您部署 Cloud Run 函式的區域。
    • 頻率:輸入 */5 * * * * (每 5 分鐘執行一次,與 POLL_INTERVAL 值相符)。
    • 時區:選取「UTC」
    • 目標類型:選取「HTTP」
    • 網址:輸入部署輸出內容中的 Cloud Run 函式網址。
    • HTTP 方法:選取「POST」
    • Auth 標頭:選取「新增 OIDC 權杖」
    • 服務帳戶:選取用於 Cloud Run 函式的服務帳戶。
  3. 點選「建立」

方法 2:使用 AWS S3 設定 Slack 稽核記錄匯出功能

這個選項會使用 AWS Lambda 收集 Slack 稽核記錄並儲存在 S3 中,然後設定 Google SecOps 資訊提供,以便擷取記錄。

為 Google SecOps 設定 AWS S3 值區和 IAM

  1. 按照這份使用者指南建立 Amazon S3 bucket建立 bucket
  2. 儲存 bucket 的「名稱」和「地區」,以供日後參考 (例如 slack-audit-logs)。
  3. 請按照這份使用者指南建立使用者建立 IAM 使用者
  4. 選取建立的「使用者」
  5. 選取「安全憑證」分頁標籤。
  6. 在「Access Keys」部分中,按一下「Create Access Key」
  7. 選取「第三方服務」做為「用途」
  8. 點選「下一步」
  9. 選用:新增說明標記。
  10. 按一下「建立存取金鑰」
  11. 按一下「Download .csv file」(下載 .csv 檔案),儲存「Access Key」(存取金鑰) 和「Secret Access Key」(私密存取金鑰),以供日後參考。
  12. 按一下 [完成]
  13. 選取「權限」分頁標籤。
  14. 在「權限政策」部分中,按一下「新增權限」
  15. 選取「新增權限」
  16. 選取「直接附加政策」
  17. 搜尋「AmazonS3FullAccess」AmazonS3FullAccess政策。
  18. 選取政策。
  19. 點選「下一步」
  20. 按一下「Add permissions」。

設定 S3 上傳的身分與存取權管理政策和角色

  1. 在 AWS 控制台中,依序前往「IAM」>「Policies」>「Create policy」>「JSON」分頁標籤
  2. 複製並貼上下列政策。
  3. 政策 JSON (如果您輸入的 bucket 名稱不同,請替換 slack-audit-logs):
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "AllowPutObjects",
      "Effect": "Allow",
      "Action": "s3:PutObject",
      "Resource": "arn:aws:s3:::slack-audit-logs/*"
    },
    {
      "Sid": "AllowGetStateObject",
      "Effect": "Allow",
      "Action": "s3:GetObject",
      "Resource": "arn:aws:s3:::slack-audit-logs/slack/audit/state.json"
    }
  ]
}
  1. 點選「下一步」
  2. 輸入政策名稱 SlackAuditS3Policy
  3. 點選「建立政策」
  4. 依序前往「IAM」>「Roles」>「Create role」>「AWS service」>「Lambda」。
  5. 附加新建立的政策 SlackAuditS3Policy
  6. 為角色命名 SlackAuditToS3Role,然後按一下「建立角色」

建立 Lambda 函式

  1. AWS 控制台中,依序前往「Lambda」>「Functions」>「Create function」
  2. 按一下「從頭開始撰寫」
  3. 請提供下列設定詳細資料:
設定
名稱 slack_audit_to_s3
執行階段 Python 3.13
架構 x86_64
執行角色 SlackAuditToS3Role
  1. 按一下「建立函式」
  2. 建立函式後,開啟「程式碼」分頁,刪除存根並貼上下列程式碼 (slack_audit_to_s3.py)。
#!/usr/bin/env python3
# Lambda: Pull Slack Audit Logs (Enterprise Grid) to S3 (JSONL format)

import os, json, time, urllib.parse
from urllib.request import Request, urlopen
from urllib.error import HTTPError, URLError
import boto3

BASE_URL = "https://api.slack.com/audit/v1/logs"

TOKEN        = os.environ["SLACK_AUDIT_TOKEN"]  # org-level user token with auditlogs:read
BUCKET       = os.environ["S3_BUCKET"]
PREFIX       = os.environ.get("S3_PREFIX", "slack/audit/")
STATE_KEY    = os.environ.get("STATE_KEY", "slack/audit/state.json")
LIMIT        = int(os.environ.get("LIMIT", "200"))             # Slack recommends <= 200
MAX_PAGES    = int(os.environ.get("MAX_PAGES", "20"))
LOOKBACK_SEC = int(os.environ.get("LOOKBACK_SECONDS", "3600")) # First-run window
HTTP_TIMEOUT = int(os.environ.get("HTTP_TIMEOUT", "60"))
HTTP_RETRIES = int(os.environ.get("HTTP_RETRIES", "3"))
RETRY_AFTER_DEFAULT = int(os.environ.get("RETRY_AFTER_DEFAULT", "2"))
# Optional server-side filters (comma-separated 'action' values), empty means no filter
ACTIONS      = os.environ.get("ACTIONS", "").strip()

s3 = boto3.client("s3")


def _get_state() -> dict:
    try:
        obj = s3.get_object(Bucket=BUCKET, Key=STATE_KEY)
        st = json.loads(obj["Body"].read() or b"{}")
        return {"cursor": st.get("cursor")}
    except Exception:
        return {"cursor": None}


def _put_state(state: dict) -> None:
    body = json.dumps(state, separators=(",", ":")).encode("utf-8")
    s3.put_object(Bucket=BUCKET, Key=STATE_KEY, Body=body, ContentType="application/json")


def _http_get(params: dict) -> dict:
    qs  = urllib.parse.urlencode(params, doseq=True)
    url = f"{BASE_URL}?{qs}" if qs else BASE_URL
    req = Request(url, method="GET")
    req.add_header("Authorization", f"Bearer {TOKEN}")
    req.add_header("Accept", "application/json")

    attempt = 0
    while True:
        try:
            with urlopen(req, timeout=HTTP_TIMEOUT) as r:
                return json.loads(r.read().decode("utf-8"))
        except HTTPError as e:
            # Respect Retry-After on 429/5xx
            if e.code in (429, 500, 502, 503, 504) and attempt < HTTP_RETRIES:
                retry_after = 0
                try:
                    retry_after = int(e.headers.get("Retry-After", RETRY_AFTER_DEFAULT))
                except Exception:
                    retry_after = RETRY_AFTER_DEFAULT
                time.sleep(max(1, retry_after))
                attempt += 1
                continue
            # Re-raise other HTTP errors
            raise
        except URLError:
            if attempt < HTTP_RETRIES:
                time.sleep(RETRY_AFTER_DEFAULT)
                attempt += 1
                continue
            raise


def _write_page(data: dict, page_idx: int) -> str:
    """
    Extract entries from Slack API response and write as JSONL (one event per line).
    Chronicle requires newline-delimited JSON, not a JSON array.
    """
    entries = data.get("entries") or []
    
    if not entries:
        # No entries to write, skip file creation
        return None
    
    # Convert each entry to a single-line JSON string
    lines = [json.dumps(entry, separators=(",", ":")) for entry in entries]
    
    # Join with newlines to create JSONL format
    body = "\n".join(lines).encode("utf-8")
    
    # Write to S3
    ts  = time.strftime("%Y/%m/%d/%H%M%S", time.gmtime())
    key = f"{PREFIX}{ts}-slack-audit-p{page_idx:05d}.json"
    s3.put_object(Bucket=BUCKET, Key=key, Body=body, ContentType="application/json")
    
    return key


def lambda_handler(event=None, context=None):
    state  = _get_state()
    cursor = state.get("cursor")

    params = {"limit": LIMIT}
    if ACTIONS:
        params["action"] = [a.strip() for a in ACTIONS.split(",") if a.strip()]
    if cursor:
        params["cursor"] = cursor
    else:
        # First run (or reset): fetch a recent window by time
        params["oldest"] = int(time.time()) - LOOKBACK_SEC

    pages = 0
    total = 0
    last_cursor = None

    while pages < MAX_PAGES:
        data = _http_get(params)
        
        # Write entries in JSONL format
        written_key = _write_page(data, pages)

        entries = data.get("entries") or []
        total += len(entries)

        # Cursor for next page
        meta = data.get("response_metadata") or {}
        next_cursor = meta.get("next_cursor") or data.get("next_cursor")
        if next_cursor:
            params = {"limit": LIMIT, "cursor": next_cursor}
            if ACTIONS:
                params["action"] = [a.strip() for a in ACTIONS.split(",") if a.strip()]
            last_cursor = next_cursor
            pages += 1
            continue
        break

    if last_cursor:
        _put_state({"cursor": last_cursor})

    return {"ok": True, "pages": pages + (1 if total or last_cursor else 0), "entries": total, "cursor": last_cursor}


if __name__ == "__main__":
    print(lambda_handler())
  1. 依序前往「Configuration」>「Environment variables」>「Edit」>「Add environment variable」
  2. 輸入下列環境變數,並將 換成您的值。

環境變數

範例值
S3_BUCKET slack-audit-logs
S3_PREFIX slack/audit/
STATE_KEY slack/audit/state.json
SLACK_AUDIT_TOKEN xoxp-*** (機構層級使用者權杖,附有 auditlogs:read)
LIMIT 200
MAX_PAGES 20
LOOKBACK_SECONDS 3600
HTTP_TIMEOUT 60
HTTP_RETRIES 3
RETRY_AFTER_DEFAULT 2
ACTIONS (選填,CSV) user_login,app_installed
  1. 按一下 [儲存]
  2. 選取「設定」分頁標籤。
  3. 在「一般設定」面板中,按一下「編輯」
  4. 將「Timeout」(逾時間隔) 變更為「5 minutes (300 seconds)」(5 分鐘 (300 秒)),然後按一下「Save」(儲存)

建立 EventBridge 排程

  1. 依序前往「Amazon EventBridge」>「Scheduler」>「Create schedule」
  2. 提供下列設定詳細資料:
    • 「Name」(名稱):輸入 slack-audit-1h
    • 週期性時間表:選取「以費率為準的時間表」
    • 費率運算式:輸入 1 小時。
    • 彈性時間範圍:選取「關閉」
  3. 點選「下一步」
  4. 選取「目標」
    • 目標 API:選取「AWS Lambda Invoke」
    • Lambda 函式:選取 slack_audit_to_s3
  5. 點選「下一步」
  6. 按一下「下一步」 (略過選用設定)。
  7. 檢查並按一下「建立排程」

(選用) 為 Google SecOps 建立唯讀 IAM 使用者和金鑰

  1. 前往 AWS 控制台 > IAM > 使用者 > 建立使用者
  2. 提供下列設定詳細資料:
    • 使用者名稱:輸入 secops-reader
    • 存取類型:選取「程式輔助存取」
  3. 點選「下一步」
  4. 選取「直接附加政策」
  5. 點選「建立政策」
  6. 在「JSON」分頁中,貼上:
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": ["s3:GetObject"],
      "Resource": "arn:aws:s3:::slack-audit-logs/*"
    },
    {
      "Effect": "Allow",
      "Action": ["s3:ListBucket"],
      "Resource": "arn:aws:s3:::slack-audit-logs"
    }
  ]
}
  1. 點選「下一步」
  2. 輸入政策名稱 secops-reader-policy
  3. 點選「建立政策」
  4. 返回使用者建立頁面,重新整理政策清單,然後選取 secops-reader-policy
  5. 點選「下一步」
  6. 按一下「建立使用者」
  7. 選取建立的使用者 secops-reader
  8. 依序前往「安全憑證」>「存取金鑰」>「建立存取金鑰」
  9. 選取「第三方服務」
  10. 點選「下一步」
  11. 按一下「建立存取金鑰」
  12. 按一下「下載 .csv 檔案」即可儲存憑證。

在 Google SecOps 中設定動態饋給,擷取 Slack 稽核記錄

  1. 依序前往「SIEM 設定」>「動態饋給」
  2. 按一下「新增」
  3. 在「動態饋給名稱」欄位中輸入動態饋給名稱 (例如 Slack Audit Logs)。
  4. 選取「Amazon S3 V2」做為「來源類型」
  5. 選取「Slack Audit」做為「記錄類型」
  6. 點選「下一步」
  7. 指定下列輸入參數的值:
    • S3 URIs3://slack-audit-logs/slack/audit/
    • 來源刪除選項:根據偏好設定選取刪除選項。
    • 檔案存在時間上限:包含在過去天數內修改的檔案。預設值為 180 天。
    • 存取金鑰 ID:具有 S3 值區存取權的使用者存取金鑰 (來自 secops-reader)。
    • 存取密鑰:具有 S3 bucket 存取權的使用者私密金鑰 (來自 secops-reader)。
    • 資產命名空間資產命名空間
    • 擷取標籤:套用至這個動態饋給事件的標籤。
  8. 點選「下一步」
  9. 在「Finalize」(完成) 畫面中檢查新的動態饋給設定,然後按一下「Submit」(提交)

UDM 對應表

記錄欄位 UDM 對應 邏輯
action metadata.product_event_type 直接從原始記錄中的 action 欄位對應。
actor.type principal.labels.value 直接從 actor.type 欄位對應,並新增 actor.type 鍵。
actor.user.email principal.user.email_addresses 直接從「actor.user.email」欄位對應。
actor.user.id principal.user.product_object_id 直接從「actor.user.id」欄位對應。
actor.user.id principal.user.userid 直接從「actor.user.id」欄位對應。
actor.user.name principal.user.user_display_name 直接從「actor.user.name」欄位對應。
actor.user.team principal.user.group_identifiers 直接從「actor.user.team」欄位對應。
context.ip_address principal.ip 直接從「context.ip_address」欄位對應。
context.location.domain about.resource.attribute.labels.value 直接從 context.location.domain 欄位對應,並新增 context.location.domain 鍵。
context.location.id about.resource.id 直接從「context.location.id」欄位對應。
context.location.name about.resource.name 直接從「context.location.name」欄位對應。
context.location.name about.resource.attribute.labels.value 直接從 context.location.name 欄位對應,並新增 context.location.name 鍵。
context.location.type about.resource.resource_subtype 直接從「context.location.type」欄位對應。
context.session_id network.session_id 直接從「context.session_id」欄位對應。
context.ua network.http.user_agent 直接從「context.ua」欄位對應。
context.ua network.http.parsed_user_agent 使用 parseduseragent 篩選器從 context.ua 欄位衍生而來的已剖析使用者代理程式資訊。
country principal.location.country_or_region 直接從「country」欄位對應。
date_create metadata.event_timestamp.seconds 系統會將 date_create 欄位的紀元時間戳記轉換為時間戳記物件。
details.inviter.email target.user.email_addresses 直接從「details.inviter.email」欄位對應。
details.inviter.id target.user.product_object_id 直接從「details.inviter.id」欄位對應。
details.inviter.name target.user.user_display_name 直接從「details.inviter.name」欄位對應。
details.inviter.team target.user.group_identifiers 直接從「details.inviter.team」欄位對應。
details.reason security_result.description 直接從 details.reason 欄位對應,如果是陣列,則以半形逗號串連。
details.type about.resource.attribute.labels.value 直接從 details.type 欄位對應,並新增 details.type 鍵。
details.type security_result.summary 直接從「details.type」欄位對應。
entity.app.id target.resource.id 直接從「entity.app.id」欄位對應。
entity.app.name target.resource.name 直接從「entity.app.name」欄位對應。
entity.channel.id target.resource.id 直接從「entity.channel.id」欄位對應。
entity.channel.name target.resource.name 直接從「entity.channel.name」欄位對應。
entity.channel.privacy target.resource.attribute.labels.value 直接從 entity.channel.privacy 欄位對應,並新增 entity.channel.privacy 鍵。
entity.file.filetype target.resource.attribute.labels.value 直接從 entity.file.filetype 欄位對應,並新增 entity.file.filetype 鍵。
entity.file.id target.resource.id 直接從「entity.file.id」欄位對應。
entity.file.name target.resource.name 直接從「entity.file.name」欄位對應。
entity.file.title target.resource.attribute.labels.value 直接從 entity.file.title 欄位對應,並新增 entity.file.title 鍵。
entity.huddle.date_end about.resource.attribute.labels.value 直接從 entity.huddle.date_end 欄位對應,並新增 entity.huddle.date_end 鍵。
entity.huddle.date_start about.resource.attribute.labels.value 直接從 entity.huddle.date_start 欄位對應,並新增 entity.huddle.date_start 鍵。
entity.huddle.id about.resource.attribute.labels.value 直接從 entity.huddle.id 欄位對應,並新增 entity.huddle.id 鍵。
entity.huddle.participants.0 about.resource.attribute.labels.value 直接從 entity.huddle.participants.0 欄位對應,並新增 entity.huddle.participants.0 鍵。
entity.huddle.participants.1 about.resource.attribute.labels.value 直接從 entity.huddle.participants.1 欄位對應,並新增 entity.huddle.participants.1 鍵。
entity.type target.resource.resource_subtype 直接從「entity.type」欄位對應。
entity.user.email target.user.email_addresses 直接從「entity.user.email」欄位對應。
entity.user.id target.user.product_object_id 直接從「entity.user.id」欄位對應。
entity.user.name target.user.user_display_name 直接從「entity.user.name」欄位對應。
entity.user.team target.user.group_identifiers 直接從「entity.user.team」欄位對應。
entity.workflow.id target.resource.id 直接從「entity.workflow.id」欄位對應。
entity.workflow.name target.resource.name 直接從「entity.workflow.name」欄位對應。
id metadata.product_log_id 直接從「id」欄位對應。
ip principal.ip 直接對應至「ip」欄位。根據 action 欄位的邏輯判斷。預設為 USER_COMMUNICATION,但會根據 action 的值變更為其他值,例如 USER_CREATIONUSER_LOGINUSER_LOGOUTUSER_RESOURCE_ACCESSUSER_RESOURCE_UPDATE_PERMISSIONSUSER_CHANGE_PERMISSIONS。已硬式編碼為「SLACK_AUDIT」。如果存在 date_create,請設為「Enterprise Grid」,否則如果存在 user_id,請設為「稽核記錄」。已硬式編碼為「Slack」。已硬式編碼為「REMOTE」。如果 action 包含「user_login」或「user_logout」,請設為「SSO」。否則請設為「MACHINE」。提供的範例中未對應。預設值為「ALLOW」,但如果 action 為「user_login_failed」,則會設為「BLOCK」。如果 date_create 存在,請設為「Slack」,否則如果 user_id 存在,請設為「SLACK」。
user_agent network.http.user_agent 直接從「user_agent」欄位對應。
user_id principal.user.product_object_id 直接從「user_id」欄位對應。
username principal.user.product_object_id 直接從「username」欄位對應。

還有其他問題嗎?向社群成員和 Google SecOps 專業人員尋求答案。