收集 Tenable 稽核記錄

支援的服務:

本文說明如何使用 Cloud Storage V2,將 Tenable 稽核記錄擷取至 Google Security Operations。

Tenable Vulnerability Management (原 Tenable.io) 是雲端式安全漏洞管理平台 (cloud.tenable.com),其活動記錄會記錄使用者驗證、API 存取、設定變更和管理動作。Tenable 安全漏洞管理 REST API 可讓您透過程式輔助方式存取這些活動記錄事件。

事前準備

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

  • Google SecOps 執行個體
  • 已啟用 Cloud Storage API 的 Google Cloud 專案
  • 建立及管理 Cloud Storage bucket 的權限
  • 管理 Cloud Storage bucket 的 Identity and Access Management (IAM) 政策權限
  • 建立 Cloud Run 服務、Pub/Sub 主題和 Cloud Scheduler 工作的權限
  • 具備 Tenable 安全漏洞管理 (cloud.tenable.com) 的特殊存取權,且擁有管理員角色
  • 在具備管理員角色的使用者帳戶上,產生的 Tenable Vulnerability Management API 金鑰 (存取金鑰和密鑰)

建立 Cloud Storage bucket

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

    設定 值
    為 bucket 命名 輸入全域不重複的名稱 (例如 tenable-audit-logs)
    位置類型 請根據需求選擇 (單一區域、雙區域、多區域)
    位置 選取位置 (例如 us-central1)
    儲存空間級別 標準 (建議用於經常存取的記錄)
    存取控管 統一 (建議)
    保護工具 選用:啟用物件版本管理或資料保留政策
  6. 點選「建立」。

收集 Tenable Vulnerability Management API 憑證

產生 API 金鑰

  1. 登入 Tenable 安全漏洞管理。
  2. 在任一頁面的右上角,依序點選藍色使用者圓圈和「我的個人資料」。「我的帳戶」頁面隨即顯示。
  3. 前往「API 金鑰」分頁。
  4. 按一下「生成」,「Generate API Keys」(產生 API 金鑰) 視窗隨即顯示,並附帶警告訊息。

    「注意:產生金鑰會取代這個使用者帳戶中的所有現有 API 金鑰,包括其他整合項目已使用的金鑰。請使用專用使用者帳戶進行這項整合,或更新所有使用舊金鑰的應用程式。

  5. 詳閱警告訊息,然後按一下「生成」。

  6. 複製下列詳細資料,並存放在安全的位置:

    • Access Key:API 存取金鑰
    • Secret Key:API 密鑰

驗證 API 存取權

  • 請先測試憑證,再繼續整合:

    # Replace with your actual credentials
    ACCESS_KEY="your-access-key"
    SECRET_KEY="your-secret-key"
    
    curl -s -H "X-ApiKeys: accessKey=${ACCESS_KEY};secretKey=${SECRET_KEY}" \
        "https://cloud.tenable.com/audit-log/v1/events?limit=1" | head -c 500
    

驗證權限

如要確認帳戶具備必要權限,請按照下列步驟操作:

  1. 登入 Tenable 安全漏洞管理。
  2. 按一下左側導覽面板中的「設定」。
  3. 按一下「存取控管」圖塊。
  4. 按一下「使用者」分頁標籤,然後點選用於這項整合功能的使用者帳戶。
  5. 確認帳戶具備管理員角色。活動記錄端點需要管理員使用者角色:自訂角色無法授予活動記錄存取權,其他角色則會收到 HTTP 403 回應。

  6. 如果您沒有必要權限,請與 Tenable 安全漏洞管理 管理員聯絡。

為 Cloud Run 函式建立服務帳戶

Cloud Run 函式需要服務帳戶,並具備將資料寫入 Cloud Storage bucket 的權限,且可由 Pub/Sub 叫用。

建立服務帳戶

  1. 在 GCP 控制台中,依序前往「IAM & Admin」(IAM 與管理) >「Service Accounts」(服務帳戶)。
  2. 按一下「Create Service Account」(建立服務帳戶)。
  3. 提供下列設定詳細資料:
    • 服務帳戶名稱:輸入 tenable-audit-collector-sa
    • 服務帳戶說明:輸入 Service account for Cloud Run function to collect Tenable Audit logs
  4. 按一下「建立並繼續」。
  5. 在「將專案存取權授予這個服務帳戶」部分,新增下列角色:
    1. 按一下「請選擇角色」。
    2. 搜尋並選取「Storage 物件管理員」。
    3. 點選「+ 新增其他角色」。
    4. 搜尋並選取「Cloud Run Invoker」。
    5. 點選「+ 新增其他角色」。
    6. 搜尋並選取「Cloud Functions 叫用者」。
  6. 按一下「繼續」。
  7. 按一下「完成」。

這些角色適用於:

  • Storage 物件管理員:將記錄寫入 Cloud Storage bucket 並管理狀態檔案
  • Cloud Run 叫用者:允許 Pub/Sub 叫用函式
  • Cloud Functions 叫用者:允許叫用函式

授予 Cloud Storage bucket 的 IAM 權限

授予服務帳戶 Cloud Storage bucket 的寫入權限:

  1. 依序前往「Cloud Storage」>「Bucket」。
  2. 按一下 bucket 名稱 (例如 tenable-audit-logs)。
  3. 前往「權限」分頁。
  4. 按一下「授予存取權」。
  5. 提供下列設定詳細資料:
    • 新增主體:輸入服務帳戶電子郵件地址 (例如 tenable-audit-collector-sa@PROJECT_ID.iam.gserviceaccount.com)
    • 指派角色:選取「Storage 物件管理員」
  6. 按一下「儲存」。

建立 Pub/Sub 主題

建立 Pub/Sub 主題,Cloud Scheduler 會發布至該主題,Cloud Run 函式則會訂閱該主題。

  1. 在 GCP 控制台中,依序前往「Pub/Sub」>「主題」。
  2. 按一下「建立主題」。
  3. 提供下列設定詳細資料:
    • 主題 ID:輸入 tenable-audit-trigger
    • 其他設定保留預設值
  4. 點選「建立」。

建立 Cloud Run 函式來收集記錄

Cloud Run 函式會由 Cloud Scheduler 的 Pub/Sub 訊息觸發,從 Tenable 安全漏洞管理 REST API 擷取記錄,並寫入 Cloud Storage。

  1. 在 GCP 控制台中,前往「Cloud Run」。
  2. 按一下「Create service」(建立服務)。
  3. 選取「函式」(使用直接修改建立函式)。
  4. 在「Configure」(設定) 部分,提供下列設定詳細資料:

    設定 值
    服務名稱 tenable-audit-collector
    區域 選取與 Cloud Storage bucket 相符的區域 (例如 us-central1)
    執行階段 選取「Python 3.12」或更新版本
  5. 在「Trigger (optional)」(觸發條件 (選用)) 部分:

    1. 按一下「+ 新增觸發條件」。
    2. 選取「Cloud Pub/Sub」。
    3. 在「Select a Cloud Pub/Sub topic」(選取 Cloud Pub/Sub 主題) 中,選擇主題 tenable-audit-trigger。
    4. 按一下「儲存」。
  6. 在「Authentication」(驗證) 部分:

    1. 選取「需要驗證」。
    2. Identity and Access Management (IAM)。
  7. 向下捲動並展開「容器、網路、安全性」。

  8. 前往「安全性」分頁:

    • 「Service account」(服務帳戶):選取服務帳戶 tenable-audit-collector-sa。
  9. 前往「容器」分頁:

    1. 按一下「Variables & Secrets」(變數與密鑰)。
    2. 針對每個環境變數,按一下「+ 新增變數」:
    變數名稱 範例值 說明
    GCS_BUCKET tenable-audit-logs Cloud Storage Bucket 名稱
    GCS_PREFIX tenable 記錄檔的前置字串
    STATE_KEY tenable-state.json 狀態路徑,位於記錄前置字元外
    TENABLE_ACCESS_KEY your-access-key Tenable 安全漏洞管理存取金鑰
    TENABLE_SECRET_KEY your-secret-key Tenable 安全漏洞管理密鑰
    MAX_RECORDS 5000 每次執行的記錄數上限
    PAGE_SIZE 1000 每頁記錄數
    LOOKBACK_HOURS 24 初始回溯期
    OVERLAP_MINUTES 2 在浮水印前重新讀取的分鐘數,以便擷取延遲建立索引的事件
  10. 在「Variables & Secrets」(變數與 Secret) 部分,前往「Requests」(要求):

    • 要求逾時:輸入 600 秒 (10 分鐘)
  11. 前往「設定」分頁:

    • 在「Resources」(資源) 部分:
      • 「記憶體」:選取「512 MiB」或以上
      • CPU:選取「1」
  12. 在「Revision scaling」(修訂版本資源調度) 部分:

    • 「執行個體數量下限」:輸入 0
    • 「Maximum number of instances」(執行個體數量上限):輸入 100 (或根據預期負載調整)
  13. 點選「建立」。

  14. 等待服務建立完成 (1 至 2 分鐘)。

  15. 服務建立後,內嵌程式碼編輯器會自動開啟。

新增函式程式碼

  1. 在「進入點」欄位中輸入 main。
  2. 在內嵌程式碼編輯器中,建立兩個檔案:

    • 第一個檔案 - main.py:
    import functions_framework
    from google.cloud import storage
    from google.cloud.exceptions import NotFound
    import json
    import os
    import re
    import urllib3
    from datetime import datetime, timezone, timedelta
    import time
    
    # Initialize HTTP client with timeouts
    http = urllib3.PoolManager(
      timeout=urllib3.Timeout(connect=5.0, read=30.0),
      retries=False,
    )
    
    # Initialize Storage client
    storage_client = storage.Client()
    
    # Environment variables
    GCS_BUCKET = os.environ.get('GCS_BUCKET')
    GCS_PREFIX = os.environ.get('GCS_PREFIX', 'tenable')
    # STATE_KEY must stay OUTSIDE GCS_PREFIX. The feed ingests every object under
    # its bucket URI and, with a deletion option selected, deletes what it
    # transferred. A state file inside the prefix would be ingested as log data and
    # then deleted, resetting collection and re-ingesting duplicates.
    STATE_KEY = os.environ.get('STATE_KEY', 'tenable-state.json')
    TENABLE_ACCESS_KEY = os.environ.get('TENABLE_ACCESS_KEY')
    TENABLE_SECRET_KEY = os.environ.get('TENABLE_SECRET_KEY')
    MAX_RECORDS = int(os.environ.get('MAX_RECORDS', '5000'))
    # The audit-log API accepts a limit up to 10000.
    PAGE_SIZE = int(os.environ.get('PAGE_SIZE', '1000'))
    LOOKBACK_HOURS = int(os.environ.get('LOOKBACK_HOURS', '24'))
    # The query re-reads this many minutes before the watermark so that events
    # Tenable indexes late are still collected. Re-read events are dropped by id.
    OVERLAP_MINUTES = int(os.environ.get('OVERLAP_MINUTES', '2'))
    
    TENABLE_API_BASE = 'https://cloud.tenable.com'
    
    class FetchError(Exception):
      """Raised when the Tenable API call fails.
    
      The watermark must never advance on a failed fetch, otherwise every event in
      the failed window is skipped permanently.
      """
    
    def parse_datetime(value: str) -> datetime:
      """Parse a Tenable `received` timestamp into an aware datetime.
    
      Tenable returns ISO 8601 with either whole seconds (2018-12-31T23:09:40Z) or
      fractional seconds (2024-01-16T15:12:47.334Z). Fractional digits are trimmed
      to microseconds because fromisoformat accepts at most six.
      """
      text = str(value).strip()
      if text.endswith('Z'):
        text = text[:-1] + '+00:00'
      text = re.sub(r'\.(\d{6})\d+', r'.\1', text)
      dt = datetime.fromisoformat(text)
      if dt.tzinfo is None:
        dt = dt.replace(tzinfo=timezone.utc)
      return dt.astimezone(timezone.utc)
    
    @functions_framework.cloud_event
    def main(cloud_event):
      """Fetch Tenable Vulnerability Management activity log events and write them to Cloud Storage.
    
      Args:
        cloud_event: CloudEvent object containing the Pub/Sub message.
      """
      if not all([GCS_BUCKET, TENABLE_ACCESS_KEY, TENABLE_SECRET_KEY]):
        # Raise rather than return: a bare return acks the Pub/Sub message and
        # reports the run as successful, silently discarding the schedule tick.
        raise RuntimeError('Missing required environment variables')
    
      bucket = storage_client.bucket(GCS_BUCKET)
      state = load_state(bucket, STATE_KEY)
    
      now = datetime.now(timezone.utc)
      watermark = None
      if state.get('last_event_time'):
        watermark = parse_datetime(state['last_event_time'])
      seen_ids = set(state.get('seen_ids', []))
    
      if watermark is None:
        start_time = now - timedelta(hours=LOOKBACK_HOURS)
      else:
        start_time = watermark - timedelta(minutes=OVERLAP_MINUTES)
    
      print(f"Fetching logs from {start_time.isoformat()} to {now.isoformat()}")
    
      # A FetchError propagates: the run fails, the watermark is untouched, and the
      # next invocation retries the same window.
      records, newest_event_time = fetch_logs(
        start_time=start_time,
        page_size=PAGE_SIZE,
        max_records=MAX_RECORDS,
      )
    
      # Drop events already written by an earlier run. Without this the overlap
      # window re-emits its events on every invocation, and an idle tenant has its
      # newest events rewritten to a new object every hour.
      fresh = [r for r in records if str(r.get('id', '')) not in seen_ids]
      print(f"Fetched {len(records)} records, {len(fresh)} new after deduplication")
    
      if not fresh:
        print("No new log records found. Watermark left unchanged.")
        return
    
      if not newest_event_time:
        raise FetchError('Records were returned but no `received` timestamp could be parsed')
    
      timestamp = now.strftime('%Y%m%dT%H%M%SZ')
      object_key = f"{GCS_PREFIX}/logs_{timestamp}.ndjson"
      blob = bucket.blob(object_key)
    
      ndjson = '\n'.join(json.dumps(record, ensure_ascii=False) for record in fresh) + '\n'
      blob.upload_from_string(ndjson, content_type='application/x-ndjson')
    
      print(f"Wrote {len(fresh)} records to gs://{GCS_BUCKET}/{object_key}")
    
      # Advance the watermark only after the data is durably written.
      new_watermark = parse_datetime(newest_event_time)
      if watermark and new_watermark < watermark:
        new_watermark = watermark
    
      # Retain only the ids still inside the overlap window, so the state file
      # stays small while covering every event the next query can re-read.
      cutoff = new_watermark - timedelta(minutes=OVERLAP_MINUTES)
      retained = []
      for record in records:
        received = record.get('received')
        if not received:
          continue
        try:
          if parse_datetime(received) >= cutoff:
            retained.append(str(record.get('id', '')))
        except ValueError:
          continue
    
      save_state(bucket, STATE_KEY, {
        'last_event_time': new_watermark.isoformat(),
        'seen_ids': sorted(i for i in set(retained) if i),
      })
    
      print(f"Successfully processed {len(fresh)} records")
    
    def load_state(bucket, key):
      """Read the collector state from Cloud Storage.
    
      Only a missing object is treated as a cold start. Any other error is raised:
      swallowing it would silently reset collection to the full lookback window and
      re-ingest that entire period.
      """
      blob = bucket.blob(key)
      try:
        return json.loads(blob.download_as_text())
      except NotFound:
        print('No state file found. Starting from the lookback window.')
        return {}
    
    def save_state(bucket, key, state: dict):
      """Write the collector state to Cloud Storage.
    
      Failures are raised, not logged. If the state write fails after the data was
      uploaded, the next run repeats the same window and duplicates it.
      """
      blob = bucket.blob(key)
      blob.upload_from_string(
        json.dumps(state, indent=2),
        content_type='application/json',
      )
      print(f"Saved state: last_event_time={state.get('last_event_time')}")
    
    def fetch_logs(start_time: datetime, page_size: int, max_records: int):
      """Fetch audit events from the Tenable Vulnerability Management API.
    
      Uses offset pagination, which is what the endpoint documents: the request
      accepts `limit` (maximum 10000) and `offset`, and the response `pagination`
      object returns `offset`, `limit`, `count` and `total`.
    
      Args:
        start_time: Exclusive lower bound for the `received` timestamp
        page_size: Records per page (the API accepts up to 10000)
        max_records: Maximum total records to fetch in one run
    
      Returns:
        Tuple of (records list, newest `received` value as an ISO 8601 string).
    
      Raises:
        FetchError: on any API or transport failure, so the caller cannot mistake
          a failed fetch for an empty result and advance the watermark.
      """
      endpoint = f"{TENABLE_API_BASE}/audit-log/v1/events"
    
      headers = {
        'X-ApiKeys': f'accessKey={TENABLE_ACCESS_KEY};secretKey={TENABLE_SECRET_KEY}',
        'Accept': 'application/json',
        'User-Agent': 'GoogleSecOps-TenableAuditCollector/1.0'
      }
    
      records = []
      newest_time = None
      page_num = 0
      backoff = 1.0
      rate_limit_retries = 0
      MAX_RATE_LIMIT_RETRIES = 5
      offset = 0
    
      while True:
        page_num += 1
    
        if len(records) >= max_records:
          # Stop cleanly. The remaining events stay ahead of the watermark and
          # are collected by the next run.
          print(f"Reached max_records limit ({max_records})")
          break
    
        # Every parameter is rebuilt per page. `sort=received:asc` is required:
        # a time watermark is only correct over an ascending scan, otherwise a
        # truncated run advances the watermark past events it never read.
        params = {
          'f': f'date.gt:{start_time.strftime("%Y-%m-%dT%H:%M:%SZ")}',
          'sort': 'received:asc',
          'limit': min(page_size, max_records - len(records)),
          'offset': offset,
        }
        url = f"{endpoint}?" + '&'.join(f"{k}={v}" for k, v in params.items())
    
        try:
          response = http.request('GET', url, headers=headers)
        except Exception as e:
          raise FetchError(f'Request to {endpoint} failed: {e}') from e
    
        if response.status == 429:
          rate_limit_retries += 1
          if rate_limit_retries > MAX_RATE_LIMIT_RETRIES:
            raise FetchError('Rate limited repeatedly; giving up without advancing the watermark')
          raw_retry_after = response.headers.get('Retry-After')
          try:
            # Retry-After may also be an HTTP date, which int() cannot parse.
            retry_after = int(raw_retry_after) if raw_retry_after else int(backoff)
          except (TypeError, ValueError):
            retry_after = int(backoff)
          print(f"Rate limited (429). Retrying after {retry_after}s...")
          time.sleep(retry_after)
          backoff = min(backoff * 2, 30.0)
          continue
    
        backoff = 1.0
        rate_limit_retries = 0
    
        if response.status != 200:
          body = response.data.decode('utf-8')
          raise FetchError(f'HTTP {response.status} from the Tenable audit log API: {body}')
    
        try:
          data = json.loads(response.data.decode('utf-8'))
        except json.JSONDecodeError as e:
          raise FetchError(f'Malformed JSON response from the Tenable audit log API: {e}') from e
    
        page_results = data.get('events', [])
    
        if not page_results:
          print("No more results (empty page)")
          break
    
        print(f"Page {page_num}: Retrieved {len(page_results)} events")
        records.extend(page_results)
    
        for event in page_results:
          received = event.get('received')
          if not received:
            continue
          try:
            if newest_time is None or parse_datetime(received) > parse_datetime(newest_time):
              newest_time = received
          except ValueError as e:
            print(f"Warning: Could not parse event time {received!r}: {e}")
    
        offset += len(page_results)
        total = data.get('pagination', {}).get('total')
        if total is not None and offset >= total:
          print("No more pages (all matching events retrieved)")
          break
    
      print(f"Retrieved {len(records)} total records from {page_num} pages")
      return records, newest_time
    

    • 第二個檔案 - requirements.txt:
    functions-framework==3.*
    google-cloud-storage==2.*
    urllib3>=2.0.0
    
  3. 按一下「部署」,即可儲存並部署函式。

  4. 等待部署作業完成 (2 至 3 分鐘)。

建立 Cloud Scheduler 工作

Cloud Scheduler 會定期將訊息發布至 Pub/Sub 主題,觸發 Cloud Run 函式。

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

    設定 值
    名稱 tenable-audit-collector-hourly
    區域 選取與 Cloud Run 函式相同的區域
    頻率 0 * * * * (每小時整點)
    時區 選取時區 (建議選取世界標準時間)
    目標類型 Pub/Sub
    主題 選取主題「tenable-audit-trigger」
    郵件內文 {} (空白 JSON 物件)
  4. 點選「建立」。

排程頻率選項

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

頻率 Cron 運算式 用途
每 5 分鐘 */5 * * * * 高流量、低延遲
每 15 分鐘 */15 * * * * 中等音量
每小時 0 * * * * 標準 (建議)
每 6 小時 0 */6 * * * 低量、批次處理
每天 0 0 * * * 歷來資料集合

測試整合

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

    Fetching logs from YYYY-MM-DDTHH:MM:SS+00:00 to YYYY-MM-DDTHH:MM:SS+00:00
    Page 1: Retrieved X events
    Fetched X records, Y new after deduplication
    Wrote Y records to gs://tenable-audit-logs/tenable/logs_YYYYMMDDTHHMMSSZ.ndjson
    Saved state: last_event_time=YYYY-MM-DDTHH:MM:SS+00:00
    Successfully processed Y records
    
  8. 依序前往「Cloud Storage」>「Bucket」。

  9. 按一下 bucket 名稱 (tenable-audit-logs)。

  10. 前往 tenable/ 資料夾。

  11. 確認系統已建立新的 .ndjson 檔案,並加上目前的時間戳記。

如果執行時沒有新資料,函式會記錄 No new log records found. Watermark left unchanged.,且不會寫入任何物件。這是預期行為,因為重新寫入相同事件會導致 Google SecOps 中出現重複事件。

如果記錄中顯示錯誤:

  • HTTP 401:檢查環境變數中的 API 金鑰
  • HTTP 403:帳戶不是管理員。必須具備管理員 [64] 使用者角色,才能使用活動記錄端點。
  • HTTP 429:頻率限制。函式會重試並退避,然後失敗,不會推進基準時間,因此不會略過任何事件。
  • 缺少環境變數:確認已設定所有必要變數

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

  1. 依序前往「設定」>「資料管理」>「動態饋給」。如果使用的是 SIEM 專用平台,請依序前往「設定」>「動態饋給」。
  2. 按一下「新增動態饋給」。
  3. 按一下「設定單一動態饋給」。
  4. 在「Feed name」(動態饋給名稱) 欄位中,輸入動態饋給名稱 (例如 Tenable Audit Logs)。
  5. 選取「Google Cloud Storage V2」做為「來源類型」。
  6. 選取「Tenable Audit」做為「Log type」(記錄類型)。
  7. 按一下「Get Service Account」。系統會顯示專屬服務帳戶電子郵件地址,例如:

    chronicle-12345678@chronicle-gcp-prod.iam.gserviceaccount.com
    
  8. 複製這個電子郵件地址。

  9. 點選「下一步」。

  10. 指定下列輸入參數的值:

    • Storage bucket URL:輸入 Cloud Storage bucket URI,並加上前置字元路徑:

      gs://tenable-audit-logs/tenable/
      
      • 更改項目:
        • tenable-audit-logs:Cloud Storage bucket 名稱。
        • tenable:儲存記錄檔的選用前置字元/資料夾路徑 (留空則為根目錄)。
    • 來源刪除選項:根據偏好選取刪除選項:

      • 一律不刪除檔案:一律不刪除來源中的檔案 (建議用於測試)。
      • 刪除已轉移的檔案和空目錄:成功擷取後,從來源刪除檔案和空目錄。

    • 檔案存在時間上限:納入過去幾天內修改過的檔案 (預設為 180 天)

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

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

  11. 點選「下一步」。

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

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

Google SecOps 服務帳戶需要 Cloud Storage bucket 的兩項角色:Storage 物件檢視者 (用於讀取記錄物件),以及 bucket 層級角色 (用於讀取 bucket 中繼資料)。

  1. 依序前往「Cloud Storage」>「Bucket」。
  2. 按一下 bucket 名稱。
  3. 前往「權限」分頁。
  4. 按一下「授予存取權」。
  5. 提供下列設定詳細資料:
    • 新增主體:貼上 Google SecOps 服務帳戶電子郵件地址
    • 「指派角色」:選取下列兩項:
      • Storage 物件檢視者:讀取記錄物件。
      • Storage 舊版 bucket 讀取者:讀取 bucket 中繼資料。如果您選取「刪除已轉移的檔案和空白目錄」刪除選項,請改選「Storage 舊版值區寫入者」,這項角色也會授予刪除權限。
  6. 按一下「儲存」。

UDM 對應表

記錄欄位 UDM 對應 邏輯
crud_label additional.fields 已合併
fields_label additional.fields 已合併
field_name extensions.auth.mechanism 對應:X-Access-Type → mech_label
mech_label extensions.auth.mechanism 已合併
extension_value extensions.auth.type 直接對應
description metadata.description 直接對應
received metadata.event_timestamp 剖析為 ISO8601
has_principal metadata.event_type 對應值 (共 5 個,例如 true → USER_LOGIN、true → USER_CREATION、true → `USER...
has_user metadata.event_type 對應:true → USER_UNCATEGORIZED
action metadata.product_event_type 直接對應
id metadata.product_log_id 直接對應
field_name principal.asset.ip 對應:X-Forwarded-For → ip
ip principal.asset.ip 已合併
field_name principal.ip 對應:X-Forwarded-For → ip
ip principal.ip 已合併
actor.name principal.user.email_addresses 已合併
actor.id principal.user.userid 直接對應
AUTH_VIOLOATION security_result.category 已合併
is_failure security_result.category 對應:true → AUTH_VIOLOATION
is_anonymous_label security_result.detection_fields 已合併
is_failure_label security_result.detection_fields 已合併
target1.name target.user.email_addresses 已合併
target1.type target.user.role_name 直接對應
target1.id target.user.userid 直接對應
不適用 extensions.auth.type 常數:AUTHTYPE_UNSPECIFIED
不適用 metadata.event_type 常數:USER_LOGIN
不適用 metadata.product_name 常數:TENABLE AUDIT
不適用 metadata.vendor_name 常數:TENABLE

變更記錄

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

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