Fastly 次世代 WAF(旧称 Signal Sciences)のログを収集する

以下でサポートされています。

このドキュメントでは、Cloud Storage V2 を使用して Fastly 次世代 WAF(旧称 Signal Sciences)ログを Google Security Operations に取り込む方法について説明します。

Fastly Next-Gen WAF(旧称 Signal Sciences)は、ウェブ アプリケーション、API、マイクロサービスに対してリアルタイムの脅威検出とブロックを提供する、クラウドベースの次世代ウェブ アプリケーション ファイアウォールです。シグナルベースのアプローチを使用して、SQL インジェクション、クロスサイト スクリプティング、アカウントの乗っ取り、アプリケーションの不正使用などの攻撃を特定して軽減します。Signal Sciences REST API を使用すると、リクエスト フィードデータにプログラムでアクセスできます。このデータには、フラグが付けられたリクエストとブロックされたリクエストに関する詳細情報が含まれています。

始める前に

次の前提条件を満たしていることを確認します。

  • Google SecOps インスタンス
  • Cloud Storage API が有効になっている Google Cloud プロジェクト
  • Cloud Storage バケットを作成、管理する権限
  • Cloud Storage バケットの Identity and Access Management(IAM)ポリシーを管理する権限
  • Cloud Run サービス、Pub/Sub トピック、Cloud Scheduler ジョブを作成する権限
  • API アクセス権限を持つ Fastly 次世代 WAF ダッシュボードへの特権アクセス
  • 会社名と少なくとも 1 つのサイトが構成されている Fastly 次世代 WAF アカウント

Cloud Storage バケットを作成する

  1. Google Cloud コンソールに移動します。
  2. プロジェクトを選択するか、新しいプロジェクトを作成します。
  3. ナビゲーション メニューで、[Cloud Storage] > [バケット] に移動します。
  4. [バケットを作成] をクリックします。
  5. 次の構成情報を提供してください。

    設定 値
    バケットに名前を付ける グローバルに一意の名前(sigsci-waf-logs など)を入力します。
    ロケーション タイプ ニーズに応じて選択します(リージョン、デュアルリージョン、マルチリージョン)。
    ロケーション ロケーションを選択します(例: us-central1)。
    ストレージ クラス Standard(頻繁にアクセスされるログに推奨)
    アクセス制御 均一(推奨)
    保護ツール 省略可: オブジェクトのバージョニングまたは保持ポリシーを有効にする
  6. [作成] をクリックします。

Fastly 次世代 WAF API 認証情報を収集する

API アクセス トークンを取得する

  1. Fastly 次世代 WAF ダッシュボードにログインします。
  2. 右上にあるユーザー名をクリックし、[プロフィール] を選択します。
  3. [API Access Tokens] に移動します。
  4. [API アクセス トークンを追加] をクリックします。
  5. トークンのわかりやすい名前を入力します(例: Google SecOps Integration)。
  6. [API アクセス トークンを作成] をクリックします。
  7. 次の詳細情報をコピーして安全な場所に保存します。

    • API トークン: 生成されたトークン値(1 回のみ表示)
    • メールアドレス: 認証に使用されるアカウントのメールアドレス

企業名とサイト名を取得する

  1. Fastly 次世代 WAF ダッシュボードにログインします。
  2. [Manage] > [Corp] > [Corp Overview] をクリックします。
  3. ページに表示されている会社の略称(例: my_corp)をメモします。
  4. [管理] > [サイト] に移動します。
  5. ログを収集するサイトのサイトの略称(例: my_site)をメモします。

権限を確認する

アカウントに必要な権限があることを確認するには:

  1. Fastly 次世代 WAF ダッシュボードにログインします。
  2. [Manage] > [Corp] > [Corp Users] に移動します。
  3. リストで目的のユーザー アカウントを探します。
  4. ロールが管理者、オーナー、オブザーバーのいずれかであることを確認します。これらのロールには、リクエスト フィード データを取得するために必要な API アクセス権があります。
  5. ロールに API アクセス権がない場合は、Fastly 次世代 WAF 管理者に連絡して、適切なロールを付与してもらってください。

テスト API へのアクセス

  • コレクタが使用するリクエスト フィード エンドポイントに対して認証情報をテストします。リクエスト フィードでは、from と until の値のみが受け入れられます。until は 5 分以上前、from は 24 時間以内です。このテストでは、5 分前に終了した 10 分間のデータをリクエストします。

    SIGSCI_EMAIL="your-email@example.com"
    SIGSCI_TOKEN="your-api-token"
    SIGSCI_CORP="your-corp-name"
    SIGSCI_SITE="your-site-name"
    
    UNTIL=$(( ($(date +%s) - 300) / 60 * 60 ))
    FROM=$(( UNTIL - 600 ))
    curl -sS -o feed-test.json -w "HTTP %{http_code}\n" \
        -H "x-api-user: ${SIGSCI_EMAIL}" \
        -H "x-api-token: ${SIGSCI_TOKEN}" \
        "https://dashboard.signalsciences.net/api/v0/corps/${SIGSCI_CORP}/sites/${SIGSCI_SITE}/feed/requests?from=${FROM}&until=${UNTIL}"
    head -c 500 feed-test.json; echo
    

認証情報が機能する場合、出力は HTTP 200 で始まり、feed-test.json には data 配列が含まれます。この配列は、サイトに 10 分間にフラグが設定されたリクエストがない場合は空になります。HTTP 401 は、メールアドレスまたはトークンが間違っていることを意味します。HTTP 400 と Invalid timestamp param は、from または until の値が上記の制限に違反していることを意味します。

Cloud Run functions のサービス アカウントを作成する

Cloud Run functions の関数には、Cloud Storage バケットへの書き込み権限と、Pub/Sub による呼び出し権限を持つサービス アカウントが必要です。

サービス アカウントの作成

  1. Google Cloud コンソールで、[IAM と管理] > [サービス アカウント] に移動します。
  2. [サービス アカウントを作成] をクリックします。
  3. 次の構成情報を指定します。
    • サービス アカウント名: 「sigsci-waf-collector-sa」と入力します。
    • サービス アカウントの説明: 「Service account for Cloud Run function to collect Fastly Next-Gen WAF logs」と入力します。
  4. [作成して続行] をクリックします。
  5. [このサービス アカウントにプロジェクトへのアクセスを許可する] セクションで、次のロールを追加します。
    1. [ロールを選択] をクリックします。
    2. [Storage オブジェクト管理者] を検索して選択します。
    3. [+ 別のロールを追加] をクリックします。
    4. [Cloud Run 起動元] を検索して選択します。
    5. [+ 別のロールを追加] をクリックします。
    6. [Cloud Functions 起動元] を検索して選択します。
  6. [続行] をクリックします。
  7. [完了] をクリックします。

これらのロールは、次の操作に必要です。

  • Storage オブジェクト管理者: Cloud Storage バケットにログを書き込み、状態ファイルを管理します。
  • Cloud Run 起動元: Pub/Sub が関数を呼び出せるようにします。
  • Cloud Functions 起動元: 関数の呼び出しを許可します。

Cloud Storage バケットに対する IAM 権限を付与する

Cloud Storage バケットに対する書き込み権限をサービス アカウントに付与します。

  1. [Cloud Storage] > [バケット] に移動します。
  2. バケット名(例: sigsci-waf-logs)をクリックします。
  3. [権限] タブに移動します。
  4. [アクセス権を付与] をクリックします。
  5. 次の構成情報を指定します。
    • プリンシパルを追加: サービス アカウントのメールアドレス(例: sigsci-waf-collector-sa@PROJECT_ID.iam.gserviceaccount.com)を入力します。
    • ロールを割り当てる: [Storage オブジェクト管理者] を選択します。
  6. [保存] をクリックします。

Pub/Sub トピックの作成

Cloud Scheduler がパブリッシュし、Cloud Run functions の関数がサブスクライブする Pub/Sub トピックを作成します。

  1. Google Cloud コンソールで、[Pub/Sub] > [トピック] に移動します。
  2. [トピックを作成] をクリックします。
  3. 次の構成情報を指定します。
    • トピック ID: 「sigsci-waf-logs-trigger」と入力します。
    • その他の設定はデフォルトのままにします。
  4. [作成] をクリックします。

ログを収集する Cloud Run 関数を作成する

Cloud Run 関数は、Cloud Scheduler からの Pub/Sub メッセージによってトリガーされ、Fastly 次世代 WAF API からリクエスト フィード データを取得して、ログを Cloud Storage に書き込みます。

  1. Google Cloud コンソールで Cloud Run に移動します。
  2. [サービスを作成] をクリックします。
  3. [関数](インライン編集で関数を作成する)を選択します。
  4. [構成] セクションで、次の構成の詳細を入力します。

    設定 値
    サービス名 sigsci-waf-collector
    リージョン Cloud Storage バケットに一致するリージョンを選択します(例: us-central1)。
    ランタイム [Python 3.12] 以降を選択します。
  5. [トリガー] セクションで [トリガーを追加] をクリックし、[Pub/Sub トリガー] を選択します。

  6. [Eventarc トリガー] ペインで、次の構成の詳細を指定します。

    • トリガー名: 生成された名前をそのまま使用するか、トリガーの名前を入力します。
    • トリガーのタイプ: [Google のソース] を選択します。
    • イベント プロバイダ: [Pub/Sub] を選択します。
    • イベントタイプ: [google.cloud.pubsub.topic.v1.messagePublished] を選択します。
    • Cloud Pub/Sub トピックを選択してください: トピック sigsci-waf-logs-trigger を選択します。
    • リージョン: 関数と同じリージョンを選択します。
    • サービス アカウント: サービス アカウント sigsci-waf-collector-sa を選択します。
  7. [トリガーを保存] をクリックします。

  8. [認証] セクションで、次の操作を行います。

    1. [認証が必要] を選択します。
    2. [Identity and Access Management(IAM)] を選択します。
  9. [コンテナ、ネットワーキング、セキュリティ] までスクロールして開きます。

  10. [セキュリティ] タブに移動します。

    • サービス アカウント: サービス アカウント sigsci-waf-collector-sa を選択します。
  11. [コンテナ] タブに移動します。

    1. [変数とシークレット] をクリックします。
    2. 環境変数ごとに [+ 変数を追加] をクリックします。
    変数名 値の例 説明
    GCS_BUCKET sigsci-waf-logs Cloud Storage バケットの名前
    GCS_PREFIX sigsci-waf ログファイルの接頭辞
    STATE_KEY sigsci-waf/state.json 状態ファイルのパス
    SIGSCI_EMAIL your-email@example.com Signal Sciences API のメールアドレス
    SIGSCI_TOKEN your-api-token Signal Sciences API トークン
    SIGSCI_CORP your-corp-name Signal Sciences の略称
    SIGSCI_SITE your-site-name Signal Sciences サイトの略称
    MAX_RECORDS 10000 1 回の実行あたりの最大レコード数
    PAGE_SIZE 1000 1 ページあたりのレコード数(最大 1,000)
    LOOKBACK_HOURS 24 最初のルックバック期間
  12. [変数とシークレット] セクションで、[リクエスト] まで下にスクロールします。

    • リクエストのタイムアウト: 「600」秒(10 分)と入力します。
  13. [設定] タブに移動します。

    • [リソース] セクションで、次の操作を行います。
      • メモリ: 1 GiB 以上を選択します。
      • CPU: [1] を選択します。
  14. [リビジョン スケーリング] セクションで、次の操作を行います。

    • [インスタンスの最小数]: 「0」と入力します。
    • [インスタンスの最大数]: 「1」と入力します。
  15. [作成] をクリックします。

  16. サービスが作成されるまで待ちます(1 ~ 2 分)。

  17. サービスが作成されると、インライン コードエディタが自動的に開きます。

関数コードを追加する

  1. [エントリ ポイント] フィールドに「main」と入力します。
  2. インライン コードエディタで、次の 2 つのファイルを作成します。

    • main.py:
    import functions_framework
    from google.api_core import exceptions as gcs_exceptions
    from google.cloud import storage
    import json
    import os
    import time
    from datetime import datetime, timedelta, timezone
    from urllib.parse import parse_qs, urlencode, urlsplit
    import urllib3
    
    http = urllib3.PoolManager(retries=False)
    storage_client = storage.Client()
    
    API_HOST = 'https://dashboard.signalsciences.net'
    # The request feed only serves full minutes that ended at least 5 minutes ago
    # and are no older than 24 hours and 5 minutes.
    FEED_DELAY = timedelta(minutes=5)
    FEED_MAX_AGE = timedelta(hours=24)
    RETRY_STATUSES = (429, 500, 502, 503, 504)
    
    class FeedApiError(Exception):
      """The request feed API returned an error that must stop the run."""
    
    class WindowTooLarge(Exception):
      """The records of one window do not fit in MAX_WINDOW_MB."""
    
    @functions_framework.cloud_event
    def main(cloud_event):
      """Fetch the Fastly Next-Gen WAF request feed and write it to GCS, one object per time window."""
      bucket_name = os.environ['GCS_BUCKET']
      prefix = os.environ.get('GCS_PREFIX', 'sigsci-waf').strip('/')
      state_key = os.environ.get('STATE_KEY', 'sigsci-waf-state.json')
      corp = os.environ['SIGSCI_CORP']
      site = os.environ['SIGSCI_SITE']
      headers = {
        'x-api-user': os.environ['SIGSCI_EMAIL'],
        'x-api-token': os.environ['SIGSCI_TOKEN'],
        'Accept': 'application/json',
        'User-Agent': 'GoogleSecOps-SignalSciencesWAFCollector/2.0',
      }
      lookback_hours = int(os.environ.get('LOOKBACK_HOURS', '1'))
      window = timedelta(minutes=int(os.environ.get('WINDOW_MINUTES', '10')))
      max_window_bytes = int(float(os.environ.get('MAX_WINDOW_MB', '200')) * 1024 * 1024)
      http_timeout = int(os.environ.get('HTTP_TIMEOUT', '60'))
      max_retries = int(os.environ.get('MAX_RETRIES', '5'))
      run_budget = int(os.environ.get('RUN_BUDGET_SECONDS', '480'))
    
      feed_path = f'/api/v0/corps/{corp}/sites/{site}/feed/requests'
      bucket = storage_client.bucket(bucket_name)
      state, generation = load_state(bucket, state_key)
      deadline = time.monotonic() + run_budget
    
      now = datetime.now(timezone.utc)
      latest_until = minute_floor(now - FEED_DELAY)
      oldest_from = minute_floor(now) - FEED_MAX_AGE
      start = resume_point(state) or minute_floor(now - timedelta(hours=lookback_hours))
      if start < oldest_from:
        print(f'WARNING: Records from {start.isoformat()} to {oldest_from.isoformat()} are older than '
            f'24 hours and can no longer be read from the request feed. Continuing from {oldest_from.isoformat()}.')
        start = oldest_from
    
      windows_done = 0
      while start < latest_until and time.monotonic() < deadline:
        end = min(start + window, latest_until)
        while True:
          try:
            written = write_window(bucket, prefix, feed_path, headers, start, end,
                        max_window_bytes, http_timeout, max_retries)
            break
          except WindowTooLarge:
            if end - start <= timedelta(minutes=1):
              raise RuntimeError(
                f'The records from {start.isoformat()} to {end.isoformat()} exceed MAX_WINDOW_MB. '
                'Increase MAX_WINDOW_MB and the function memory.')
            end = start + max(timedelta(minutes=1), minute_floor_delta((end - start) / 2))
            print(f'Window too large, retrying with {start.isoformat()} to {end.isoformat()}')
    
        # The window is stored, so the next run starts where this one ended.
        state = {'next_from': int(end.timestamp())}
        generation = save_state(bucket, state_key, state, generation)
        print(f'{start.isoformat()} to {end.isoformat()}: {written}')
        start = end
        windows_done += 1
    
      if start < latest_until:
        print(f'Run time budget reached after {windows_done} windows. The next run continues from {start.isoformat()}.')
      else:
        print(f'Request feed is up to date until {latest_until.isoformat()} ({windows_done} windows).')
    
    def minute_floor(dt):
      return dt.replace(second=0, microsecond=0)
    
    def minute_floor_delta(delta):
      return timedelta(minutes=int(delta.total_seconds() // 60))
    
    def resume_point(state):
      """Where the previous run stopped, or None for the first run."""
      if 'next_from' in state:
        return datetime.fromtimestamp(state['next_from'], tz=timezone.utc)
      if 'last_event_time' in state:
        # State written by the previous version of this function. It recorded the
        # run time, so start 5 minutes earlier to read records it could not see yet.
        return minute_floor(datetime.fromisoformat(state['last_event_time']) - FEED_DELAY)
      return None
    
    def write_window(bucket, prefix, feed_path, headers, start, end, max_window_bytes, timeout, max_retries):
      """Write all records from [start, end) to one GCS object and return a summary."""
      blob_name = (f'{prefix}/{start:%Y/%m/%d}/'
            f'{start:%Y%m%dT%H%M%SZ}_{end:%Y%m%dT%H%M%SZ}.ndjson')
      if bucket.get_blob(blob_name) is not None:
        # A previous run stored this window but did not save the state.
        return f'already stored in {blob_name}'
    
      lines = []
      size = 0
      for record in fetch_feed(feed_path, headers, start, end, timeout, max_retries):
        line = json.dumps(record, ensure_ascii=False).encode('utf-8') + b'\n'
        size += len(line)
        if size > max_window_bytes:
          raise WindowTooLarge()
        lines.append(line)
    
      if not lines:
        return 'no records'
      try:
        # if_generation_match=0 creates the object only if it does not exist.
        bucket.blob(blob_name).upload_from_string(
          b''.join(lines), content_type='application/x-ndjson', if_generation_match=0)
      except gcs_exceptions.PreconditionFailed:
        return f'already stored in {blob_name}'
      return f'wrote {len(lines)} records to gs://{bucket.name}/{blob_name}'
    
    def fetch_feed(feed_path, headers, start, end, timeout, max_retries):
      """Yield every record of the request feed between start and end."""
      query = urlencode({'from': int(start.timestamp()), 'until': int(end.timestamp())})
      page = call_api('GET', f'{API_HOST}{feed_path}?{query}', headers, None, timeout, max_retries)
      while True:
        yield from page.get('data') or []
        next_uri = (page.get('next') or {}).get('uri') or ''
        if not next_uri:
          return
    
        parsed = urlsplit(next_uri)
        cursors = parse_qs(parsed.query).get('next')
        if parsed.scheme or parsed.netloc or parsed.path != feed_path or not cursors:
          raise FeedApiError(f'Unexpected next.uri: {next_uri}')
    
        # Later pages are requested with POST and the decoded next cursor as a form field.
        # The cursor is valid for one minute.
        page = call_api('POST', f'{API_HOST}{parsed.path}', headers,
                {'next': cursors[0]}, timeout, max_retries)
    
    def call_api(method, url, headers, form, timeout, max_retries):
      """Return the decoded JSON response, retrying throttling and server errors."""
      failures = 0
      while True:
        try:
          if form is None:
            response = http.request(method, url, headers=headers,
                        timeout=urllib3.Timeout(connect=10.0, read=timeout))
          else:
            response = http.request(method, url, headers=headers, fields=form, encode_multipart=False,
                        timeout=urllib3.Timeout(connect=10.0, read=timeout))
        except urllib3.exceptions.HTTPError as e:
          response, error = None, str(e)
    
        if response is not None and response.status == 200:
          return json.loads(response.data)
        if response is not None:
          error = f'HTTP {response.status}: {response.data[:500].decode("utf-8", errors="replace")}'
          if response.status not in RETRY_STATUSES:
            raise FeedApiError(error)
    
        failures += 1
        if failures > max_retries:
          raise FeedApiError(f'{error} (after {max_retries} retries)')
        wait = min(30, 2 ** failures)
        retry_after = response.headers.get('Retry-After', '') if response is not None else ''
        if retry_after.isdigit():
          wait = int(retry_after)
        print(f'{error}. Retry {failures}/{max_retries} in {wait}s')
        time.sleep(wait)
    
    def load_state(bucket, key):
      """Return the saved state and its object generation (0 if there is no state yet)."""
      blob = bucket.get_blob(key)
      if blob is None:
        return {}, 0
      return json.loads(blob.download_as_text()), blob.generation
    
    def save_state(bucket, key, state, generation):
      """Save the state only if no other run changed it since it was loaded."""
      blob = bucket.blob(key)
      try:
        blob.upload_from_string(json.dumps(state), content_type='application/json',
                    if_generation_match=generation)
      except gcs_exceptions.PreconditionFailed:
        raise RuntimeError(f'{key} was changed by another run; stopping to avoid duplicate collection.')
      return blob.generation
    
    • 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. Google Cloud コンソールで、[Cloud Scheduler] に移動します。
  2. [ジョブを作成] をクリックします。
  3. 次の構成情報を提供してください。

    設定 値
    名前 sigsci-waf-collector-hourly
    リージョン Cloud Run functions の関数と同じリージョンを選択します。
    周波数 0 * * * *(1 時間ごと、毎正時)
    タイムゾーン タイムゾーンを選択(UTC を推奨)
    ターゲット タイプ Pub/Sub
    トピック トピック sigsci-waf-logs-trigger を選択します。
    メッセージ本文 {}(空の JSON オブジェクト)
  4. [作成] をクリックします。

スケジュール頻度のオプション

リクエスト フィードは、終了から 5 分後から 24 時間後まで 1 分ごとに配信されます。各実行では、前回の実行が停止した時点から 5 分前までのすべてのデータが収集されるため、間隔を短くするとレイテンシが短縮されます。少なくとも 1 時間ごとにジョブを実行します。関数が 24 時間以上停止すると、24 時間より古いレコードは収集できなくなります。

頻度 CRON 式 ユースケース
5 分おき */5 * * * * 大容量、低レイテンシ
15 分ごと */15 * * * * 検索量が普通
1 時間ごと 5 * * * * 標準(推奨)

統合をテストする

  1. Cloud Scheduler コンソールで、ジョブを見つけます。
  2. [強制実行] をクリックして、ジョブを手動でトリガーします。
  3. 数秒待ちます。
  4. [Cloud Run] > [サービス] に移動します。
  5. [sigsci-waf-collector] をクリックします。
  6. [ログ] タブをクリックします。
  7. 関数が正常に実行されたことを確認します。次のような行を探します。10 分のウィンドウごとに 1 行あります。

    2026-01-15T09:00:00+00:00 to 2026-01-15T09:10:00+00:00: wrote 42 records to gs://sigsci-waf-logs/sigsci-waf/2026/01/15/20260115T090000Z_20260115T091000Z.ndjson
    2026-01-15T09:10:00+00:00 to 2026-01-15T09:20:00+00:00: no records
    Request feed is up to date until 2026-01-15T10:00:00+00:00 (6 windows).
    
  8. [Cloud Storage] > [バケット] に移動します。

  9. バケット名(sigsci-waf-logs)をクリックします。

  10. sigsci-waf/ フォルダに移動します。

  11. .ndjson ファイルが YYYY/MM/DD/ フォルダに作成されていることを確認します。各ファイル名には、ウィンドウの開始と終了が保持されます。

関数が失敗すると、状態を保存せずに実行が停止し、次の実行で同じウィンドウが再度収集されます。ログで、次の項目を探します。

  • HTTP 401: 環境変数で API のメールアドレスとトークンを確認します。
  • HTTP 403: Fastly 次世代 WAF ダッシュボードで、アカウントに管理者、オーナー、またはオブザーバーのロールがあることを確認します。
  • HTTP 400 Invalid timestamp param: from または until の値がリクエスト フィードの制限に違反しています。関数のコードがこのページと一致していることを確認します。
  • HTTP 429、500、502、503、504: 関数は最大 MAX_RETRIES 回再試行してから停止します。次の実行でウィンドウが再試行されます。
  • can no longer be read from the request feed: 関数が 24 時間以上実行されませんでした。24 時間以上経過したレコードは、リクエスト フィードから取得できなくなります。
  • exceed MAX_WINDOW_MB: 1 分間のレコードが MAX_WINDOW_MB を超えています。MAX_WINDOW_MB と関数のメモリを増やします。
  • was changed by another run: 2 つの実行が重複しています。[インスタンスの最大数] が 1 であることを確認します。
  • KeyError: 必要な環境変数がありません。

Fastly 次世代 WAF のログを取り込むように Google SecOps でフィードを構成する

  1. [設定] > [データ マネジメント] > [フィード] に移動します。SIEM のみのプラットフォームを使用している場合は、[設定] > [フィード] に移動します。
  2. [Add New Feed] をクリックします。
  3. [単一フィードを設定] をクリックします。
  4. [フィード名] フィールドに、フィードの名前を入力します(例: Signal Sciences WAF Logs)。
  5. [ソースタイプ] として [Google Cloud Storage V2] を選択します。
  6. [ログタイプ] として [Signal Sciences WAF] を選択します。
  7. [サービス アカウントを取得する] をクリックします。一意のサービス アカウントのメールアドレスが表示されます。例:

    chronicle-12345678@chronicle-gcp-prod.iam.gserviceaccount.com
    
  8. このメールアドレスをコピーします。

  9. [次へ] をクリックします。

  10. 次の入力パラメータの値を指定します。

    • ストレージ バケットの URL: 接頭辞パスを含む Cloud Storage バケット URI を入力します。

      gs://sigsci-waf-logs/sigsci-waf/
      
      • 次のように置き換えます。
        • sigsci-waf-logs: Cloud Storage バケット名。
        • sigsci-waf: ログが保存されるオプションの接頭辞 / フォルダパス(ルートの場合は空のままにします)。
    • Source deletion option: 必要に応じて削除オプションを選択します。

      • なし: 転送後にファイルを削除しません(テストにおすすめ)。
      • 転送されたファイルを削除する: 転送が完了した後にファイルを削除します。
      • 転送されたファイルと空のディレクトリを削除する: 転送が成功した後にファイルと空のディレクトリを削除します。

    • ファイルの最長存続期間: 過去数日間に変更されたファイルを含めます(デフォルトは 180 日)。

    • Asset namespace: アセットの名前空間。

    • Ingestion labels: このフィードのイベントに適用されるラベル。

  11. [次へ] をクリックします。

  12. [Finalize] 画面で新しいフィードの設定を確認し、[送信] をクリックします。

Google SecOps サービス アカウントに IAM 権限を付与する

Google SecOps サービス アカウントには、Cloud Storage バケットに対する 2 つのロールが必要です。ログ オブジェクトを読み取るためのストレージ オブジェクト閲覧者ロールと、バケット メタデータを読み取るためのバケットレベルのロールです。

  1. [Cloud Storage] > [バケット] に移動します。
  2. バケット名をクリックします。
  3. [権限] タブに移動します。
  4. [アクセス権を付与] をクリックします。
  5. 次の構成情報を指定します。
    • プリンシパルを追加: Google SecOps サービス アカウントのメールアドレスを貼り付けます。
    • ロールを割り当てる: 次の両方を選択します。
      • Storage オブジェクト閲覧者: ログ オブジェクトを読み取ります。
      • Storage レガシー バケット読み取り: バケット メタデータを読み取ります。[転送されたファイルと空のディレクトリを削除する] 削除オプションを選択した場合は、代わりに [Storage Legacy Bucket Writer] を選択します。これにより、削除権限も付与されます。
  6. [保存] をクリックします。

UDM マッピング テーブル

ログフィールド UDM マッピング 論理
message_data metadata.description 直接マッピングされます。
created metadata.event_timestamp ISO8601 として解析
timestamp metadata.event_timestamp RFC 3339 として解析
event_type metadata.event_type 直接マッピングされます。
has_target metadata.event_type マッピング済み: true → NETWORK_HTTP、false → STATUS_UPDATE
label metadata.ingestion_labels 統合済み
eventType metadata.product_event_type 直接マッピングされます。
proto network.application_protocol マッピング済み: HTTP/1.1 → HTTP
protocol network.application_protocol マッピング済み: HTTP/1.1 → HTTP
details.method network.http.method 直接マッピングされます。
method network.http.method 直接マッピングされます。
details.uri network.http.referral_url 直接マッピングされます。
msgData.detailLink network.http.referral_url 直接マッピングされます。
uri network.http.referral_url 直接マッピングされます。
respcode network.http.response_code 名前変更 / マッピング
responseCode network.http.response_code 名前変更 / マッピング
details.userAgent network.http.user_agent 直接マッピングされます。
msgData.sites network.http.user_agent 直接マッピングされます。
userAgent network.http.user_agent 直接マッピングされます。
resSize network.received_bytes 名前変更 / マッピング
responseSize network.received_bytes 名前変更 / マッピング
details.tlsCipher network.tls.cipher 直接マッピングされます。
tlsCipher network.tls.cipher 直接マッピングされます。
O network.tls.client.certificate.issuer 名前変更 / マッピング
details.tlsProtocol network.tls.version 直接マッピングされます。
tlsProtocol network.tls.version 直接マッピングされます。
details.serverHostname principal.asset.hostname 直接マッピングされます。
serverHostname principal.asset.hostname 直接マッピングされます。
details.serverName principal.asset.network_domain 直接マッピングされます。
serverName principal.asset.network_domain 直接マッピングされます。
details.serverHostname principal.hostname 直接マッピングされます。
serverHostname principal.hostname 直接マッピングされます。
details.id principal.process.pid 直接マッピングされます。
id principal.process.pid 直接マッピングされます。
security_result_headin security_result 統合済み
security_result_headout security_result 統合済み
security_result_tag security_result 統合済み
sec_res_headOut security_result.about.resource.attribute.labels 統合済み
sec_res_headin security_result.about.resource.attribute.labels 統合済み
security_result_action security_result.action 統合済み
msgData.conditions security_result.description 直接マッピングされます。
detector_field security_result.detection_fields 統合済み
link_field security_result.detection_fields 統合済み
location_field security_result.detection_fields 統合済み
redaction_field security_result.detection_fields 統合済み
type_field security_result.detection_fields 統合済み
value_field security_result.detection_fields 統合済み
msgData.reason security_result.summary 直接マッピングされます。
details.remoteHostname target.asset.hostname 直接マッピングされます。
remoteHostname target.asset.hostname 直接マッピングされます。
remoteIP target.asset.ip 統合済み
target_ip target.asset.ip 統合済み
details.remoteHostname target.hostname 直接マッピングされます。
remoteHostname target.hostname 直接マッピングされます。
remoteIP target.ip 統合済み
target_ip target.ip 統合済み
client_port target.port 直接マッピングされます。
changes_label target.resource.attribute.labels 統合済み
msgData.name target.resource.name 直接マッピングされます。
URI target.url 直接マッピングされます。
username target.user.user_display_name 直接マッピングされます。
userid target.user.userid 直接マッピングされます。
なし metadata.event_type 定数: NETWORK_HTTP
なし metadata.product_name 定数: Signal Sciences WAF
なし metadata.vendor_name 定数: Signal Sciences
なし network.application_protocol 定数: HTTP

さらにサポートが必要な場合 コミュニティ メンバーや Google SecOps のプロフェッショナルから回答を得ることができます。