收集 Slack 稽核記錄

支援:

本文說明如何使用 Google Cloud Run functions 或 Amazon S3 搭配 AWS Lambda,將 Slack 稽核記錄擷取至 Google Security Operations。

Slack 稽核記錄會詳細記錄 Slack Enterprise Grid 組織中的安全性相關事件。您可以使用 Audit Logs API 監控使用者動作 (例如登入、下載檔案、安裝應用程式和管理員變更),以便監控法規遵循和安全性。

事前準備

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

  • Google SecOps 執行個體。
  • 具備機構擁有者存取權的 Slack Enterprise Grid 方案。

  • 具備下列任一項目的特殊存取權:

    • Google Cloud (適用於選項 1:Cloud Run functions 和 Cloud Scheduler),或
    • AWS (適用於選項 2:S3、IAM、Lambda、EventBridge)。

收集 Slack 憑證

建立 Slack 應用程式

Slack Audit Logs API 需要具備 auditlogs:read 範圍的使用者 OAuth 權杖。如要取得這個權杖,必須在 Enterprise Grid 組織層級安裝應用程式,而非工作區層級。

  1. 以 Enterprise Grid 組織擁有者的身分登入 Slack。
  2. 前往 Slack API 應用程式頁面。
  3. 按一下「Create New App」。
  4. 選取「從頭開始」。
  5. 請提供下列設定詳細資料:
    • 應用程式名稱:輸入描述性名稱 (例如 Google SecOps Audit Integration)。
    • Pick a workspace to develop your app in:選取開發 Slack 工作區 (組織中的任何工作區)。
  6. 點選「建立應用程式」。

設定 OAuth 範圍

  1. 在應用程式的設定頁面中,選取左側導覽列中的「OAuth & Permissions」。
  2. 前往「範圍」部分。
  3. 在「User Token Scopes」 (而非「Bot Token Scopes」) 下方,點選「Add an OAuth Scope」。
  4. 新增下列範圍:
    • auditlogs:read:這個範圍可存取 Enterprise Grid 機構的 Audit Logs API。
  5. 在「Bot Token Scopes」下方,按一下「Add an OAuth Scope」。
  6. 新增下列範圍:
    • users:read - Present,以便在機構層級安裝應用程式。

在企業組織中安裝應用程式

稽核記錄 API 會讀取整個 Enterprise 機構的事件,因此應用程式必須安裝在機構層級,而非單一工作區。Slack 提供兩種做法。兩者都會產生相同的組織層級使用者 OAuth 權杖。請擇一使用。

選項 A:從應用程式設定安裝 (機構層級應用程式)

這是 Slack「Developing apps for Enterprise orgs」頁面的路徑。不需要重新導向網址、公開發布和網路服務。

  1. 在應用程式的設定頁面,選取左側導覽列中的「Org Level Apps」。
  2. 按一下「選擇加入」。
  3. 在確認提示中,按一下「是,選擇加入」。

  4. 以企業機構擁有者身分登入。

  5. 在左側導覽列中選取「OAuth & Permissions」。

  6. 按一下「Install to Organization」。

  7. 在確認畫面上查看要求的權限,然後按一下「允許」。

方法 B:公開發布及可共用網址

這是 Slack Audit Logs API 頁面的路徑。啟用公開發布功能不會在 Slack Marketplace 列出應用程式,只允許在開發工作區以外安裝。

  1. 在應用程式的設定頁面中,選取左側導覽列中的「OAuth & Permissions」。
  2. 在「重新導向網址」部分,按一下「新增重新導向網址」,輸入網址,然後依序點選「新增」和「儲存網址」。

  3. 選取左側導覽中的「管理發布」。

  4. 在「與其他工作區共用應用程式」下方,確認四個檢查清單部分都顯示綠色勾號。如果某個部分顯示紅色 X,請展開該部分並完成必要動作。

  5. 選取「我已檢查並移除所有硬式編碼資訊」核取方塊。

  6. 按一下「啟用公開發布」。

  7. 以企業組織擁有者的身分登入。

  8. 在「Share Your App with Your Workspace」下方,複製「Sharable URL」並在瀏覽器中開啟。

  9. 在安裝畫面中,開啟右上角的下拉式選單,然後選取「企業組織」,而非個別工作區。

  10. 查看要求的權限,然後按一下「允許」。

擷取憑證

  1. 安裝完成後,系統會將您導回「OAuth & Permissions」頁面。
  2. 在「OAuth Tokens」部分,找出「User OAuth Token」。
  3. 權杖開頭為 xoxp-。
  4. 按一下「複製」,並妥善儲存這個權杖。

    重要事項:這是 Cloud Run 函式或 Lambda 函式的 SLACK_ADMIN_TOKEN。請妥善儲存。可讀取 Enterprise Grid 組織中的所有稽核記錄。

  5. 記下組織 ID:

    1. 使用貴機構網址 (例如 acmeinc.enterprise.slack.com) 在網頁瀏覽器中開啟 Slack。
    2. 網頁載入後,請查看網址。格式為 https://app.slack.com/client/EXXXXXXX/CXXXXXXX。
    3. 複製開頭為 E 的字串。這就是您的組織 ID。

驗證權限

如要確認應用程式具備必要權限,請按照下列步驟操作:

  1. 前往 Slack API 應用程式頁面。
  2. 選取應用程式。
  3. 選取左側導覽中的「OAuth 和權限」。
  4. 在「OAuth Tokens」下方,確認顯示「User OAuth Token」 (開頭為 xoxp-)。
  5. 在「範圍」下方,確認「使用者權杖範圍」下方顯示 auditlogs:read。

測試 API 存取權

  • 請先測試權杖,再繼續整合:

    SLACK_TOKEN="xoxp-your-token-here"
    
    curl -H "Authorization: Bearer $SLACK_TOKEN" \
      "https://api.slack.com/audit/v1/logs?limit=1"
    

成功的回應會包含含有稽核記錄事件的 entries 陣列。如果收到 invalid_auth 或 missing_scope 錯誤,請驗證權杖和範圍。

選項 1:使用 Google Cloud Run functions 設定 Slack 稽核記錄匯出作業

這個選項會使用 Google Cloud Run functions 和 Cloud Scheduler 收集 Slack 稽核記錄,並透過 Google SecOps 擷取指令碼,直接將記錄擷取至 Google SecOps。

事前準備 (方法 1)

請確認您符合下列其他必要條件:

  • 已啟用下列 API 的 Google Cloud 專案:
    • Cloud Run Admin API
    • Eventarc API
    • Pub/Sub API
    • Cloud Scheduler API
    • Secret Manager API
  • 具備建立 Cloud Run 函式、Pub/Sub 主題、Eventarc 觸發條件、Cloud Scheduler 工作,以及 Secret Manager 密鑰的權限。
  • Google SecOps 服務帳戶 JSON 檔案。

取得 Google SecOps 服務帳戶

  1. 登入 Google SecOps 控制台。
  2. 依序前往「SIEM 設定」>「收集代理程式」。
  3. 按一下「下載」,下載擷取驗證檔案。
  4. 妥善保存 JSON 檔案。您會將這個檔案上傳為 Google Secret Manager 中的密鑰。

準備函式程式碼

從 Google SecOps ingestion-scripts GitHub 存放區下載部署檔案:

  1. 從 slack 資料夾下載:
    • .env.yml
    • main.py
    • requirements.txt
  2. 從存放區的根目錄,下載整個 common 目錄及其所有檔案。

    部署目錄應具有下列結構:

        ```
        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 中設定密鑰

將機密憑證儲存在 Secret Manager 中,供 Cloud Run 函式安全存取。

為 Google SecOps 服務帳戶建立密碼

  1. 在 Google Cloud 控制台中,依序前往「安全性」>「Secret Manager」。
  2. 點選「建立密鑰」。
  3. 提供下列設定詳細資料:
    • 「Name」(名稱):輸入 chronicle-service-account。
    • 密鑰值:貼上 Google SecOps 服務帳戶 JSON 檔案的完整內容。
  4. 點選「建立密鑰」。
  5. 複製密鑰的資源名稱。格式為:

    projects/PROJECT_ID/secrets/chronicle-service-account/versions/latest
    

為 Slack 權杖建立密鑰

  1. 在「Secret Manager」頁面,點選「建立密鑰」。
  2. 提供下列設定詳細資料:
    • 「Name」(名稱):輸入 slack-admin-token。
    • 密鑰值:貼上 Slack 使用者 OAuth 權杖 (開頭為 xoxp-)。
  3. 點選「建立密鑰」。
  4. 複製密鑰的資源名稱。格式為:

    projects/PROJECT_ID/secrets/slack-admin-token/versions/latest
    

設定環境變數

  1. 開啟部署目錄中的 .env.yml 檔案,並設定環境變數:

    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 區域。有效值:us、asia-northeast1、asia-south1、asia-southeast1、australia-southeast1、europe、europe-west2、europe-west3、europe-west6、europe-west9、europe-west12、me-central1、me-central2、me-west1、northamerica-northeast2、southamerica-east1。
      • POLL_INTERVAL:函式執行的頻率間隔 (以分鐘為單位)。這個時間長度必須與 Cloud Scheduler 工作間隔相同。
  2. 儲存 .env.yml 檔案。

建立 Pub/Sub 主題

Cloud Scheduler 透過 Pub/Sub 主題觸發 Cloud Run 函式。

  1. 在 GCP 控制台中,依序前往「Pub/Sub」>「Topics」(主題)。
  2. 按一下「建立主題」。
  3. 在「Topic ID」(主題 ID) 欄位中輸入 slack-audit-trigger。
  4. 點選「建立」。

部署 Cloud Run 函式

  1. 在 Google Cloud 控制台開啟終端機或 Cloud Shell。前往部署目錄,然後執行下列指令:

    gcloud run deploy slack-audit-to-chronicle \
      --source . \
      --function main \
      --base-image google-22/python312 \
      --region <REGION> \
      --service-account <SERVICE_ACCOUNT_EMAIL> \
      --env-vars-file .env.yml \
      --memory 512Mi \
      --timeout 540 \
      --max-instances 1 \
      --no-allow-unauthenticated
    
    • 將 <REGION> 替換為區域 (例如 us-central1),並將 <SERVICE_ACCOUNT_EMAIL> 替換為要讓 Cloud Run 函式使用的服務帳戶電子郵件地址。
  2. 為函式建立 Pub/Sub 觸發條件,步驟如下:

    gcloud eventarc triggers create slack-audit-trigger \
      --location <REGION> \
      --destination-run-service slack-audit-to-chronicle \
      --destination-run-region <REGION> \
      --event-filters "type=google.cloud.pubsub.topic.v1.messagePublished" \
      --transport-topic projects/<PROJECT_ID>/topics/slack-audit-trigger \
      --service-account <SERVICE_ACCOUNT_EMAIL>
    
    • 將 <PROJECT_ID> 替換為 Google Cloud 專案 ID。
  3. 等待部署作業完成。

設定 Cloud Scheduler

  1. 在 GCP 控制台中,依序前往「Cloud Scheduler」>「建立工作」。
  2. 提供下列設定詳細資料:

    設定 值
    名稱 slack-audit-scheduler
    區域 選取部署 Cloud Run 函式的相同區域
    頻率 */5 * * * * (每 5 分鐘,與 POLL_INTERVAL 值相符)
    時區 選取時區 (建議選取世界標準時間)
  3. 按一下「繼續」。

  4. 在「Configure the execution」(設定執行作業) 部分:

    • 目標類型:選取「Pub/Sub」。
    • 主題:選取 slack-audit-trigger。
    • 郵件內文:輸入 run。
  5. 點選「建立」。

排程頻率選項

根據記錄檔量和延遲時間需求選擇頻率:

頻率 Cron 運算式 用途
每 5 分鐘 */5 * * * * 標準 (建議)
每 15 分鐘 */15 * * * * 普通量
每小時 0 * * * * 音量過低

測試整合 (選項 1)

  1. 在 Cloud Scheduler 控制台中,找到您的工作 (slack-audit-scheduler)。
  2. 按一下「強制執行」,手動觸發工作。
  3. 稍等幾秒鐘。
  4. 前往「Cloud Run」。
  5. 按一下服務名稱 (slack-audit-to-chronicle)。
  6. 點選「記錄」分頁標籤。
  7. 確認函式是否執行成功。尋找:

    Retrieving the Slack Audit logs since: YYYY-MM-DDTHH:MM:SSZ
    Processing logs...
    Retrieved X audit logs from the API call
    Logs processed successfully.
    

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

這個選項會使用 AWS Lambda 收集 Slack 稽核記錄並儲存在 Amazon S3,然後設定 Google SecOps 動態饋給來擷取記錄。

事前準備 (方法 2)

請確認您符合下列其他必要條件:

  • 具備建立 S3 bucket、IAM 使用者/角色/政策、Lambda 函式和 EventBridge 規則權限的 AWS 帳戶。

建立 Amazon S3 儲存貯體

  1. 按照「建立 bucket」使用手冊建立 Amazon S3 bucket。
  2. 儲存 bucket 的「名稱」和「區域」,以供日後參考 (例如 slack-audit-logs)。

設定 S3 上傳作業的 IAM 政策和角色

  1. 在 AWS 控制台中,依序前往「IAM」>「Policies」>「Create policy」>「JSON」分頁。
  2. 複製並貼上下列政策。如果您使用其他 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"
        }
      ]
    }
    
  3. 點選「下一步」。

  4. 輸入政策名稱 SlackAuditS3Policy。

  5. 點選「建立政策」。

  6. 依序前往「IAM」 >「Roles」 >「Create role」 >「AWS service」 >「Lambda」。

  7. 附加新建立的政策 SlackAuditS3Policy。

  8. 將角色命名為 SlackAuditToS3Role,然後按一下「建立角色」。

建立 Lambda 函式

  1. 在 AWS 控制台中,依序前往「Lambda」>「Functions」>「Create function」。
  2. 按一下「從頭開始撰寫」。
  3. 提供下列設定詳細資料:

    設定 值
    名稱 slack_audit_to_s3
    執行階段 Python 3.13
    架構 x86_64
    執行角色 SlackAuditToS3Role
  4. 按一下「Create function」(建立函式)。

  5. 建立函式後,開啟「程式碼」分頁,刪除存根並貼上以下程式碼 (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"]
    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"))
    MAX_PAGES = int(os.environ.get("MAX_PAGES", "20"))
    LOOKBACK_SEC = int(os.environ.get("LOOKBACK_SECONDS", "3600"))
    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)
    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
                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."""
        entries = data.get("entries") or []
        if not entries:
            return None
        lines = [json.dumps(entry, separators=(",", ":")) for entry in entries]
        body = "\n".join(lines).encode("utf-8")
        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_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())
    

設定 Lambda 環境變數

  1. 依序前往「設定」>「環境變數」>「編輯」>「新增環境變數」。
  2. 輸入下列環境變數,並替換成您的值:

    鍵 範例值
    SLACK_AUDIT_TOKEN xoxp-... (機構層級使用者權杖,附有 auditlogs:read)
    S3_BUCKET slack-audit-logs
    S3_PREFIX slack/audit/
    STATE_KEY slack-audit-state.json
    LIMIT 200
    MAX_PAGES 20
    LOOKBACK_SECONDS 3600
    HTTP_TIMEOUT 60
    HTTP_RETRIES 3
    RETRY_AFTER_DEFAULT 2
    ACTIONS (選用,以半形逗號分隔的動作篩選器)
  3. 按一下 [儲存]。

  4. 選取「設定」分頁標籤。在「一般設定」面板中,按一下「編輯」。

  5. 將「逾時」變更為 5 minutes (300 秒),然後按一下「儲存」。

建立 EventBridge 排程

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

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

  1. 依序前往 AWS 控制台 > IAM > 使用者 > 建立使用者。
  2. 請提供下列設定詳細資料:
    • 使用者名稱:輸入 secops-reader。
    • 存取權類型:選取「程式輔助存取權」。
  3. 點選「下一步」。
  4. 選取「直接附加政策」。
  5. 點選「建立政策」。在「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"
        }
      ]
    }
    
  6. 點選「下一步」。

  7. 輸入政策名稱 secops-reader-policy。

  8. 點選「建立政策」。

  9. 返回使用者建立頁面,重新整理政策清單,然後選取 secops-reader-policy。

  10. 點選「下一步」。

  11. 點選「Create user」。

  12. 選取建立的使用者 secops-reader。

  13. 依序前往「安全憑證」>「存取金鑰」>「建立存取金鑰」。

  14. 選取「第三方服務」。

  15. 點選「下一步」。

  16. 按一下「Create access key」。

  17. 按一下「下載 .csv 檔案」即可儲存憑證。

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

  1. 依序前往 「SIEM 設定」 > 「動態饋給」。
  2. 按一下「新增動態饋給」。
  3. 按一下「設定單一動態饋給」。
  4. 在「Feed name」(動態饋給名稱) 欄位中,輸入動態饋給名稱 (例如 Slack Audit Logs)。
  5. 在「來源類型」部分,選取「Amazon S3 V2」。
  6. 在「Log type」(記錄類型) 中選取「Slack Audit」(Slack 稽核)。
  7. 點選「下一步」。
  8. 指定下列輸入參數的值:

    • S3 URI:輸入 S3 bucket URI,並加上前置字串路徑:

      ```
      s3://slack-audit-logs/slack/audit/
      ```
      
      Replace `slack-audit-logs` with your actual S3 bucket name.
      
    • 來源刪除選項:根據偏好選取刪除選項。

    • 檔案存在時間上限:納入在過去天數內修改的檔案。預設值為 180 天。

    • 存取金鑰 ID:可存取 S3 bucket 的使用者存取金鑰 (來自 secops-reader Identity and Access Management (IAM) 使用者)。

    • 私密存取金鑰:有權存取 S3 bucket 的使用者私密金鑰 (來自 secops-reader IAM 使用者)。

    • Asset namespace:資產命名空間。

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

  9. 點選「下一步」。

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

UDM 對應表

記錄欄位 UDM 對應 邏輯
action metadata.product_event_type 直接從「action」欄位對應
actor.type principal.labels 直接對應至鍵 actor.type
actor.user.email principal.user.email_addresses 直接對應
actor.user.id principal.user.product_object_id 直接對應
actor.user.id principal.user.userid 直接對應
actor.user.name principal.user.user_display_name 直接對應
actor.user.team principal.user.group_identifiers 直接對應
context.ip_address principal.ip 直接對應
context.location.domain about.resource.attribute.labels 直接對應至鍵 context.location.domain
context.location.id about.resource.id 直接對應
context.location.name about.resource.name 直接對應
context.location.name about.resource.attribute.labels 直接對應至鍵 context.location.name
context.location.type about.resource.resource_subtype 直接對應
context.session_id network.session_id 直接對應
context.ua network.http.user_agent 直接對應
context.ua network.http.parsed_user_agent 從 context.ua 欄位衍生的剖析使用者代理程式
country principal.location.country_or_region 直接對應
date_create metadata.event_timestamp.seconds Epoch 時間戳記轉換為時間戳記物件
details.inviter.email target.user.email_addresses 直接對應
details.inviter.id target.user.product_object_id 直接對應
details.inviter.name target.user.user_display_name 直接對應
details.inviter.team target.user.group_identifiers 直接對應
details.reason security_result.description 直接對應;如果是陣列,則以半形逗號串連
details.type about.resource.attribute.labels 直接對應至鍵 details.type
details.type security_result.summary 直接對應
entity.app.id target.resource.id 直接對應
entity.app.name target.resource.name 直接對應
entity.channel.id target.resource.id 直接對應
entity.channel.name target.resource.name 直接對應
entity.channel.privacy target.resource.attribute.labels 直接對應至鍵 entity.channel.privacy
entity.file.filetype target.resource.attribute.labels 直接對應至鍵 entity.file.filetype
entity.file.id target.resource.id 直接對應
entity.file.name target.resource.name 直接對應
entity.file.title target.resource.attribute.labels 直接對應至鍵 entity.file.title
entity.huddle.date_end about.resource.attribute.labels 直接對應至鍵 entity.huddle.date_end
entity.huddle.date_start about.resource.attribute.labels 直接對應至鍵 entity.huddle.date_start
entity.huddle.id about.resource.attribute.labels 直接對應至鍵 entity.huddle.id
entity.huddle.participants.0 about.resource.attribute.labels 直接對應至鍵 entity.huddle.participants.0
entity.huddle.participants.1 about.resource.attribute.labels 直接對應至鍵 entity.huddle.participants.1
entity.type target.resource.resource_subtype 直接對應
entity.user.email target.user.email_addresses 直接對應
entity.user.id target.user.product_object_id 直接對應
entity.user.name target.user.user_display_name 直接對應
entity.user.team target.user.group_identifiers 直接對應
entity.workflow.id target.resource.id 直接對應
entity.workflow.name target.resource.name 直接對應
id metadata.product_log_id 直接對應
ip principal.ip 直接對應
user_agent network.http.user_agent 直接對應
user_id principal.user.product_object_id 直接對應
username principal.user.product_object_id 直接對應
metadata.event_type 預設值為 USER_COMMUNICATION;如果動作為 user_created,則設為 USER_CREATION;如果動作為 user_login 或 user_login_failed,則設為 USER_LOGIN;如果動作為 user_logout,則設為 USER_LOGOUT;如果動作符合 file_,則設為 USER_RESOURCE_ACCESS;如果動作符合 app_、private_、public_ 或 auth_policy_,則設為 USER_RESOURCE_UPDATE_PERMISSIONS;如果動作符合 pref、legal_hold_、workflow_、channel_、user_deactivated、user_reactivated、role_change_ 或 user_channel_,則設為 USER_CHANGE_PERMISSIONS
metadata.log_type 硬式編碼為 SLACK_AUDIT
metadata.product_name 如果 date_create 存在,請設為 Enterprise Grid;否則,如果 user_id 存在,請設為 Audit Logs
metadata.vendor_name 硬式編碼為 Slack
extensions.auth.mechanism 硬式編碼為 REMOTE
extensions.auth.type 如果動作包含 user_login 或 user_logout,請設為 SSO,否則請設為 MACHINE
security_result.action 預設為 ALLOW;如果動作為 user_login_failed,則設為 BLOCK
target.application 如果 date_create 存在,請設為 Slack;否則,如果 user_id 存在,請設為 SLACK

變更記錄

查看這個剖析器的變更記錄

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