Symantec Web Security Service(WSS)のログを収集する

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

このドキュメントでは、Cloud Storage を使用して Symantec Web Security Service(WSS)ログを Google Security Operations に取り込む方法について説明します。パーサーは、まずログ メッセージを JSON として解析しようとします。失敗した場合は、一連のより具体的な grok パターンを使用して未加工テキストからフィールドを抽出し、最終的に抽出されたデータを統合データモデル(UDM)にマッピングします。Symantec Web Security Service(WSS)は、マルウェア、フィッシング、データ損失などのウェブベースの脅威からリアルタイムで保護する、クラウドベースのウェブ セキュリティ ソリューションです。

始める前に

次の前提条件を満たしていることを確認してください。

  • Google SecOps インスタンス
  • Cloud Storage API が有効になっている Google Cloud プロジェクト
  • Cloud Storage バケットを作成、管理する権限
  • Cloud Storage バケットの Identity and Access Management(IAM)ポリシーを管理する権限
  • Cloud Run サービス、Pub/Sub トピック、Cloud Scheduler ジョブを作成する権限
  • Symantec Web Security Service ポータルへの特権アクセス

Symantec WSS API 認証情報を収集する

Symantec WSS サイトの URL を取得する

  1. Symantec Web Security Service ポータルにログインします。
  2. ブラウザのアドレスバーからポータルの URL をメモします。
    • 形式: https://portal.threatpulse.com または組織固有の URL
    • 例: https://portal.threatpulse.com/reportpod で WSS にアクセスする場合、サイトの URL は https://portal.threatpulse.com です。

API 認証情報を作成する

  1. 管理者として Symantec Web Security Service Portal にログインします。
  2. [アカウント] > [API 認証情報] に移動します。
  3. [Add API Credentials] をクリックします。ポータルに [Add API Credential] ダイアログが表示され、自動生成された [Username] と [Password] が表示されます。
  4. ユーザー名とパスワードをコピーして安全に保存します。

  5. [API Expiry] オプションを選択します。

    • 時間ベース: このトークンの有効期限が切れる日時を定義します。
    • 期限なし: トークンは無期限に有効です(本番環境に推奨)。
  6. [アクセス] オプションで、[アクセスログのレポート] を選択します。

  7. [保存] をクリックします。

権限を確認する

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

  1. Symantec Web Security Service ポータルにログインします。
  2. [アカウント] > [API 認証情報] に移動します。
  3. [アクセス] が [レポート アクセスログ] に設定された状態で作成した API 認証情報が表示される場合は、必要な権限が付与されています。
  4. このオプションが表示されない場合は、管理者に連絡してレポート アクセスログの権限を付与してもらってください。

テスト API へのアクセス

  • 統合に進む前に、認証情報をテストします。

    # Replace with your actual credentials
    WSS_USERNAME="your-api-username"
    WSS_PASSWORD="your-api-password"
    WSS_SYNC_URL="https://portal.threatpulse.com/reportpod/logs/sync"
    
    # startDate must be within the last 7 days. This requests logs from the start of the current hour.
    START_MS=$(( $(date +%s) / 3600 * 3600 * 1000 ))
    
    curl -sS -o wss-test.zip -w "HTTP %{http_code}\n" \
      -H "X-APIUsername: ${WSS_USERNAME}" \
      -H "X-APIPassword: ${WSS_PASSWORD}" \
      "${WSS_SYNC_URL}?token=none&startDate=${START_MS}&maxmb=10"
    
    # The sync status is appended to the end of the response, after the ZIP data
    tail -c 300 wss-test.zip | strings | grep -i "X-sync"
    
    # List the log files in the archive
    unzip -l wss-test.zip
    

Expected result:

  • HTTP 200。
  • 2 本の線 X-sync-token: ... と X-sync-status: done(または more)。
  • .log.gz ファイルのリスト(例: cloud_<tenant_ID>_<timestamp>.log.gz)。現在の時間のログがまだない場合、リストは空です。

Cloud Storage バケットを作成する

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

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

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

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

サービス アカウントを作成する

  1. Google Cloud コンソールで、[IAM と管理] > [サービス アカウント] に移動します。
  2. [サービス アカウントを作成] をクリックします。
  3. 次の構成情報を指定します。
    • サービス アカウント名: 「symantec-wss-collector-sa」と入力します。
    • サービス アカウントの説明: 「Service account for Cloud Run function to collect Symantec WSS 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. バケット名をクリックします。
  3. [権限] タブに移動します。
  4. [アクセス権を付与] をクリックします。
  5. 次の構成情報を指定します。
    • プリンシパルを追加: サービス アカウントのメールアドレス(例: symantec-wss-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: 「symantec-wss-trigger」と入力します。
    • その他の設定はデフォルトのままにします。
  4. [作成] をクリックします。

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

Cloud Run 関数は、Cloud Scheduler からの Pub/Sub メッセージによってトリガーされ、Symantec WSS Sync API からログを取得して Cloud Storage に書き込みます。

Sync API は、gzip 圧縮されたログファイルの ZIP アーカイブを返します。この関数は、アーカイブを抽出して、各 .log.gz ファイルを個別のオブジェクトとしてバケットに書き込みます。これは、フィードが ZIP アーカイブ内のログファイルを読み取ることができないためです。この関数は、API から返された同期トークンを状態ファイルに保存するため、各実行は、前の実行が停止した場所から正確に続行されます。

  1. Google Cloud コンソールで、[Cloud Run] に移動します。
  2. [関数を作成] をクリックします。
  3. [構成] セクションで、次の構成の詳細を指定します。

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

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

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

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

    1. [認証が必要] を選択します。
    2. Identity and Access Management(IAM)を確認します。
  8. [コンテナ、ネットワーキング、セキュリティ] に移動して開きます。

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

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

    1. [変数とシークレット] をクリックします。
    2. 環境変数ごとに [+ 変数を追加] をクリックします。
    変数名 値の例 説明
    GCS_BUCKET symantec-wss-logs GCS バケット名
    GCS_PREFIX symantec/wss/ ログファイルの接頭辞
    STATE_KEY symantec-wss-state.json 状態パス(ログ プレフィックスの外側)
    WSS_SYNC_URL https://portal.threatpulse.com/reportpod/logs/sync WSS Sync API エンドポイント
    WSS_API_USERNAME your-api-username(API 認証情報から) WSS API ユーザー名
    WSS_API_PASSWORD your-api-password(API 認証情報から) WSS API パスワード
    INITIAL_LOOKBACK_HOURS 1 最初の実行で収集するログの時間(最大 167。Sync API は最大で過去 7 日間のログを返すため)
    WSS_MAX_MB 100 1 つの Sync API レスポンスのおおよその最大サイズ(MB 単位、1 ~ 2,560)
    HTTP_TIMEOUT 120 HTTP 読み取りタイムアウト(秒)
    MAX_RETRIES 3 ネットワーク エラーと HTTP 5xx レスポンスの再試行の最大回数
    RUN_BUDGET_SECONDS 480 関数が新しいページの要求を停止するまでの時間。リクエスト タイムアウトよりも短くしてください
    USER_AGENT symantec-wss-to-gcs/2.0 ユーザー エージェント文字列
  11. [変数とシークレット] セクションで、[リクエスト] に移動します。

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

    • [リソース] セクションで、次の操作を行います。
      • メモリ: 1 GiB 以上を選択します。この関数は、1 つの Sync API レスポンス(最大 WSS_MAX_MB)をメモリに保持しながら抽出します。
      • CPU: [1] を選択します。
  13. [リビジョン スケーリング] セクションで、次の操作を行います。

    • [インスタンスの最小数] に「0」と入力します。
    • [インスタンスの最大数]: 「1」と入力します。Sync API では、同期トークンごとに 1 つのクライアントが許可されるため、実行が重複しないようにする必要があります。
  14. [作成] をクリックします。

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

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

関数のコードを追加する

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

    • 最初のファイル: main.py:
    import functions_framework
    from google.api_core import exceptions as gcs_exceptions
    from google.cloud import storage
    import io
    import json
    import os
    import re
    import time
    import uuid
    import zipfile
    from datetime import datetime, timedelta, timezone
    from urllib.parse import urlencode
    import urllib3
    
    http = urllib3.PoolManager(retries=False)
    storage_client = storage.Client()
    
    # The Sync API returns a ZIP archive of gzipped ELFF files followed by a
    # plain-text footer with the X-sync-token and X-sync-status lines.
    ZIP_SIGNATURES = (b'PK\x03\x04', b'PK\x05\x06')  # archive with files, empty archive
    FOOTER_SCAN_BYTES = 4096
    TOKEN_RE = re.compile(rb'X-sync-token:\s*(\S+)', re.IGNORECASE)
    STATUS_RE = re.compile(rb'X-sync-status:\s*(\S+)', re.IGNORECASE)
    MAX_LOOKBACK = timedelta(days=7)
    THROTTLE_WAIT_SECONDS = 60
    MIN_SECONDS_PER_REQUEST = 120
    
    class SyncApiError(Exception):
        """The Sync API returned a response that must not be processed."""
    
    class TokenExpired(Exception):
        """The Sync API rejected the saved token (HTTP 410)."""
    
    @functions_framework.cloud_event
    def main(cloud_event):
        """Fetch Symantec WSS access logs from the Sync API and write them to GCS."""
        bucket_name = os.environ['GCS_BUCKET']
        prefix = os.environ.get('GCS_PREFIX', 'symantec/wss/')
        state_key = os.environ.get('STATE_KEY', 'symantec-wss-state.json')
        sync_url = os.environ.get('WSS_SYNC_URL', 'https://portal.threatpulse.com/reportpod/logs/sync')
        username = os.environ['WSS_API_USERNAME']
        password = os.environ['WSS_API_PASSWORD']
        lookback_hours = int(os.environ.get('INITIAL_LOOKBACK_HOURS', '1'))
        max_mb = int(os.environ.get('WSS_MAX_MB', '100'))
        http_timeout = int(os.environ.get('HTTP_TIMEOUT', '120'))
        max_retries = int(os.environ.get('MAX_RETRIES', '3'))
        run_budget = int(os.environ.get('RUN_BUDGET_SECONDS', '480'))
        user_agent = os.environ.get('USER_AGENT', 'symantec-wss-to-gcs/2.0')
    
        bucket = storage_client.bucket(bucket_name)
        state, generation = load_state(bucket, state_key)
        deadline = time.monotonic() + run_budget
    
        while time.monotonic() + MIN_SECONDS_PER_REQUEST <= deadline:
            token = state.get('token') or 'none'
            params = {'token': token, 'maxmb': max_mb}
            if token == 'none':
                params['startDate'] = initial_start_ms(state, lookback_hours)
            requested_at = datetime.now(timezone.utc)
    
            try:
                body = fetch_page(sync_url, params, username, password, user_agent,
                                  http_timeout, max_retries, deadline)
            except TokenExpired:
                # Restart the sync from the hour of the last successful page.
                # Events from that hour can be ingested again.
                print('Sync token expired (HTTP 410). Restarting with token=none.')
                state['token'] = None
                generation = save_state(bucket, state_key, state, generation)
                continue
            if body is None:
                print('Sync API is throttling requests. The next run continues from the saved token.')
                return
    
            archive, next_token, status = split_footer(body)
            if status not in ('more', 'done'):
                raise SyncApiError(
                    f'X-sync-status is {status!r}. The data was discarded; the next run retries token {token!r}.')
    
            written = write_archive(bucket, prefix, archive)
            state.update({
                'token': next_token,
                'last_status': status,
                'last_success': requested_at.isoformat(),
            })
            # resume_ms is where a restart after an expired token begins: the
            # startDate of a new sync, then the hour of the last fully synced point.
            if token == 'none':
                state['resume_ms'] = params['startDate']
            if status == 'done':
                state['resume_ms'] = hour_floor_ms(requested_at)
            generation = save_state(bucket, state_key, state, generation)
            print(f'Wrote {len(written)} log files ({len(archive)} bytes), X-sync-status: {status}')
    
            if status == 'done':
                # The API expects at least 60 seconds before the next request.
                print('Sync is up to date.')
                return
            time.sleep(1)
    
        print('Run time budget reached. The next run continues from the saved token.')
    
    def initial_start_ms(state, lookback_hours):
        """startDate for a token=none request: within the last 7 days, at an hour boundary."""
        now = datetime.now(timezone.utc)
        oldest_ms = hour_floor_ms(now - MAX_LOOKBACK) + 3600 * 1000
        start_ms = state.get('resume_ms') or hour_floor_ms(now - timedelta(hours=lookback_hours))
        return max(start_ms, oldest_ms)
    
    def hour_floor_ms(dt):
        return int(dt.replace(minute=0, second=0, microsecond=0).timestamp() * 1000)
    
    def fetch_page(sync_url, params, username, password, user_agent, timeout, max_retries, deadline):
        """Return the response body, None when throttled past the deadline, or raise."""
        url = f'{sync_url}?{urlencode(params)}'
        headers = {
            'User-Agent': user_agent,
            'X-APIUsername': username,
            'X-APIPassword': password,
        }
        failures = 0
        while True:
            try:
                response = http.request('GET', url, headers=headers,
                                        timeout=urllib3.Timeout(connect=10.0, read=timeout))
            except urllib3.exceptions.HTTPError as e:
                failures += 1
                if failures > max_retries:
                    raise
                print(f'Request failed ({e}), retry {failures}/{max_retries}')
                time.sleep(min(30, 2 ** failures))
                continue
    
            if response.status == 200:
                return response.data
            if response.status == 410:
                raise TokenExpired()
            if response.status in (423, 429):
                # 423: another request with this token is in progress. 429: throttled.
                wait = retry_after_seconds(response)
                if time.monotonic() + wait + MIN_SECONDS_PER_REQUEST > deadline:
                    return None
                print(f'HTTP {response.status}, waiting {wait}s')
                time.sleep(wait)
                continue
            if response.status >= 500:
                failures += 1
                if failures <= max_retries:
                    print(f'HTTP {response.status}, retry {failures}/{max_retries} with the same token')
                    time.sleep(min(30, 2 ** failures))
                    continue
            detail = response.data[:500].decode('utf-8', errors='replace')
            raise SyncApiError(f'HTTP {response.status}: {detail}')
    
    def retry_after_seconds(response):
        value = response.headers.get('Retry-After', '')
        return int(value) if value.isdigit() else THROTTLE_WAIT_SECONDS
    
    def split_footer(body):
        """Split the response into the ZIP archive bytes, X-sync-token and X-sync-status."""
        tail_start = max(0, len(body) - FOOTER_SCAN_BYTES)
        tail = body[tail_start:]
        token_match = TOKEN_RE.search(tail)
        status_match = STATUS_RE.search(tail)
        if not token_match or not status_match:
            raise SyncApiError(
                f'Response of {len(body)} bytes has no X-sync-token/X-sync-status footer (incomplete download).')
        footer_start = tail_start + min(token_match.start(), status_match.start())
        token = token_match.group(1).decode('ascii')
        status = status_match.group(1).decode('ascii').lower()
        return body[:footer_start], token, status
    
    def write_archive(bucket, prefix, archive):
        """Upload every file in the ZIP archive to GCS as a separate object."""
        if not archive:
            return []
        if not archive.startswith(ZIP_SIGNATURES):
            raise SyncApiError(f'Expected a ZIP archive, got bytes starting with {archive[:8]!r}')
    
        date_path = datetime.now(timezone.utc).strftime('%Y/%m/%d')
        batch_id = f'{int(time.time())}_{uuid.uuid4().hex[:8]}'
        written = []
        with zipfile.ZipFile(io.BytesIO(archive)) as zf:
            for member in zf.infolist():
                if member.is_dir():
                    continue
                file_name = os.path.basename(member.filename)
                blob_name = f'{prefix}{date_path}/{batch_id}_{file_name}'
                content_type = 'application/gzip' if file_name.endswith('.gz') else 'text/plain'
                # if_generation_match=0 creates the object only if it does not exist,
                # which also makes the upload safe to retry.
                bucket.blob(blob_name).upload_from_string(
                    zf.read(member), content_type=content_type, if_generation_match=0)
                written.append(blob_name)
        return written
    
    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 a token conflict.')
        return blob.generation
    

    • 2 つ目のファイル: 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. 次の構成情報を提供してください。

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

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

ログの量とレイテンシの要件に基づいて頻度を選択します。

頻度 CRON 式 ユースケース
5 分おき */5 * * * * 大容量、低レイテンシ
15 分ごと */15 * * * * 検索量が普通
1 時間ごと 0 * * * * 標準(推奨)
6 時間ごと 0 */6 * * * 少量のバッチ処理
毎日 0 0 * * * 過去のデータの収集

統合をテストする

  1. Cloud Scheduler コンソールで、ジョブを見つけます。
  2. [強制実行] をクリックして、ジョブを手動でトリガーします。
  3. 数秒待ちます。
  4. [Cloud Run] > [サービス] に移動します。
  5. 関数名(symantec-wss-collector)をクリックします。
  6. [ログ] タブをクリックします。
  7. 関数が正常に実行されたことを確認します。以下のものを探します。

    Wrote N log files (X bytes), X-sync-status: done
    Sync is up to date.
    

    Sync API に 1 つのレスポンスに収まらない量のデータがある場合、ログには、最後の done の前に X-sync-status: more を含む複数の Wrote N log files 行が表示されます。

  8. [Cloud Storage] > [バケット] に移動します。

  9. バケット名をクリックします。

  10. 接頭辞フォルダ(symantec/wss/)に移動します。

  11. 新しい .log.gz ファイル(symantec/wss/YYYY/MM/DD/<run_ID>_cloud_<tenant_ID>_<timestamp>.log.gz など)が作成されたことを確認します。Symantec WSS に新しいログがない場合、実行によってファイルは作成されません。

ログにエラーが表示される場合:

  • HTTP 401: 環境変数の API 認証情報を確認します。ユーザー名とパスワードが正しいことを確認します。
  • HTTP 403: API 認証情報で、WSS ポータルの「Reporting Access Logs」権限が有効になっていることを確認します。
  • HTTP 400: 同期の最初のリクエストで、7 日より前の開始日が使用されました。INITIAL_LOOKBACK_HOURS を下げます。
  • HTTP 409: token=none との新しい同期を開始したリクエストが多すぎます。次の実行まで 90 分待ちます。
  • HTTP 423 または 429: 別のリクエストが進行中であるか、Sync API がリクエストをスロットリングしています。関数は待機して再試行します。待機が実行時間に収まらない場合、次の実行は保存されたトークンから続行されます。
  • 同期トークンの有効期限切れ(HTTP 410): 関数は、最後に完了した同期の時刻から同期を再開します。その時間の一部のイベントが再度取り込まれることがあります。
  • X-sync-status が「abort」または X-sync-token/X-sync-status フッターがない: レスポンスが不完全で、破棄されました。次の実行では、同じトークンを使用して再試行されます。
  • Expected a ZIP archive: Sync API がログ アーカイブ以外のものを返しました。API アクセスをテストするのテストでレスポンスを確認します。
  • 別の実行によって変更された: 2 つの実行が重複しました。[インスタンスの最大数] を 1 に設定します。
  • 変数名の KeyError: 必要なすべての環境変数が Cloud Run 関数の構成に設定されていることを確認します。

Symantec WSS のログを取り込むように Google SecOps でフィードを構成する

  1. [SIEM 設定] > [フィード] に移動します。
  2. [Add New Feed] をクリックします。
  3. [単一フィードを設定] をクリックします。
  4. [フィード名] フィールドに、フィードの名前を入力します(例: Symantec WSS logs)。
  5. [Source type] として [Google Cloud Storage V2] を選択します。
  6. [ログタイプ] として [Symantec WSS] を選択します。
  7. [サービス アカウントを取得する] をクリックします。一意のサービス アカウントのメールアドレスが表示されます。例:

    chronicle-12345678@chronicle-gcp-prod.iam.gserviceaccount.com
    
  8. このメールアドレスをコピーします。次のステップでこれを使用します。

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

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

    • ストレージ バケットの URL: 接頭辞パスを含む Cloud Storage バケット URI を入力します。
    gs://symantec-wss-logs/symantec/wss/
    
    • 次のように置き換えます。

    • symantec-wss-logs: Cloud Storage バケット名。

    • symantec/wss/: ログが保存されるオプションの接頭辞またはフォルダパス(ルートの場合は空のままにします)。

    例: - ルートバケット: gs://company-logs/ - 接頭辞付き: gs://company-logs/symantec-wss/ - サブフォルダ付き: gs://company-logs/symantec/wss/

    • 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 レガシー バケット読み取り: バケット メタデータを読み取ります。削除オプションとして [転送されたファイルと空のディレクトリを削除する] を選択した場合は、代わりに [ストレージ レガシー バケット書き込み] を選択します。これにより、削除権限も付与されます。
  6. [保存] をクリックします。

UDM マッピング テーブル

ログフィールド UDM マッピング ロジック
content_type_label additional.fields 統合済み
cs_uri_extension_label additional.fields 統合済み
cs_uri_path_label additional.fields 統合済み
hostname_categories_label additional.fields 統合済み
_intermediary intermediary 統合済み
msg_desc metadata.description 直接マッピングされます。
s_action metadata.description 直接マッピングされます。
device_time metadata.event_timestamp ISO8601 として解析
log_time metadata.event_timestamp UNIX_MS として解析
timestamp metadata.event_timestamp UNIX として解析
when metadata.event_timestamp MMM dd HH:mm:ss として解析
has_principal metadata.event_type マッピング済み: true → NETWORK_CONNECTION、true → STATUS_UPDATE
s-action metadata.product_event_type 直接マッピングされます。
product_data.x-bluecoat-transaction-uuid metadata.product_log_id 直接マッピングされます。
ref_uid metadata.product_log_id 直接マッピングされます。
uuid metadata.product_log_id 直接マッピングされます。
x-bluecoat-transaction-uuid metadata.product_log_id 直接マッピングされます。
product_name metadata.product_name 直接マッピングされます。
product_ver metadata.product_version 直接マッピングされます。
connection.url.scheme network.application_protocol 直接マッピングされます。
cs-uri-scheme network.application_protocol マッピング済み: (?i)https → HTTPS
uri_scheme network.application_protocol 直接マッピングされます。
cs-version network.application_protocol_version 直接マッピングされます。
connection.url.method network.http.method 直接マッピングされます。
cs-method network.http.method 直接マッピングされます。
method network.http.method 直接マッピングされます。
cs_referer network.http.referral_url 直接マッピングされます。
connection.http_status network.http.response_code 名前変更 / マッピング
status network.http.response_code 直接マッピングされます。
connection.http_user_agent network.http.user_agent 直接マッピングされます。
cs(user-agent) network.http.user_agent 直接マッピングされます。
http_user_agent network.http.user_agent 直接マッピングされます。
connection.url.scheme network.ip_protocol 直接マッピングされます。
uri_scheme network.ip_protocol 直接マッピングされます。
connection.bytes_download network.received_bytes 名前変更 / マッピング
received_bytes network.received_bytes 名前変更 / マッピング
connection.bytes_upload network.sent_bytes 名前変更 / マッピング
sent_bytes network.sent_bytes 名前変更 / マッピング
time_taken network.session_duration.seconds 直接マッピングされます。
session_id network.session_id 直接マッピングされます。
cs_connection_negotiated_cipher network.tls.cipher 直接マッピングされます。
product_data.x-cs-connection-negotiated-cipher network.tls.cipher 直接マッピングされます。
x-cs-connection-negotiated-cipher network.tls.cipher 直接マッピングされます。
certificate_hostname network.tls.client.server_name 直接マッピングされます。
product_data.x-rs-certificate-hostname network.tls.client.server_name 直接マッピングされます。
x-rs-certificate-hostname network.tls.client.server_name 直接マッピングされます。
product_data.x-rs-certificate-observed-errors network.tls.server.certificate.issuer 直接マッピングされます。
x-rs-certificate-observed-errors network.tls.server.certificate.issuer 直接マッピングされます。
certificate_validate network.tls.server.certificate.subject 直接マッピングされます。
product_data.x-rs-certificate-validate-status network.tls.server.certificate.subject 直接マッピングされます。
x-rs-certificate-validate-status network.tls.server.certificate.subject 直接マッピングされます。
connection.tls.version network.tls.version_protocol 直接マッピングされます。
cs_ssl_version network.tls.version_protocol 直接マッピングされます。
product_data.x-cs-connection-negotiated-ssl-version network.tls.version_protocol 直接マッピングされます。
x-cs-connection-negotiated-ssl-version network.tls.version_protocol 直接マッピングされます。
agent_type observer.application 直接マッピングされます。
product_data.x-client-agent-type observer.application 直接マッピングされます。
x-client-agent-type observer.application 直接マッピングされます。
os_version observer.platform_version 直接マッピングされます。
product_data.x-client-agent-sw observer.platform_version 直接マッピングされます。
x-client-agent-sw observer.platform_version 直接マッピングされます。
user_domain principal.administrative_domain 直接マッピングされます。
hostname principal.asset.hostname 直接マッピングされます。
c-ip principal.asset.ip 統合済み
c_ip principal.asset.ip 統合済み
collector_device_ip principal.asset.ip 統合済み
connection.src_ip principal.asset.ip 統合済み
src_ip principal.asset.ip 統合済み
x-sr-vpop-ip principal.asset.ip 統合済み
x-client-os principal.asset.platform_software.platform マッピング済み: Windows → WINDOWS
hostname principal.hostname 直接マッピングされます。
c-ip principal.ip 統合済み
c_ip principal.ip 統合済み
collector_device_ip principal.ip 統合済み
connection.src_ip principal.ip 統合済み
src_ip principal.ip 統合済み
x-sr-vpop-ip principal.ip 統合済み
product_data.r-supplier-country principal.location.country_or_region 直接マッピングされます。
r-supplier-country principal.location.country_or_region 直接マッピングされます。
supplier_country principal.location.country_or_region 直接マッピングされます。
src_port principal.port 名前変更 / マッピング
x-client-device-id principal.resource.product_object_id 直接マッピングされます。
user.name principal.user.user_display_name 直接マッピングされます。
user_name principal.user.user_display_name 直接マッピングされます。
cs-userdn principal.user.userid 直接マッピングされます。
security_result_action security_result.action 統合済み
filter_result security_result.action_details 直接マッピングされます。
result security_result.action_details 直接マッピングされます。
rs_icap_status security_result.action_details 直接マッピングされます。
category_details security_result.category_details 統合済み
cs-categories security_result.category_details 統合済み
cs-icap-status security_result.description 直接マッピングされます。
cs_icap_status security_result.description 直接マッピングされます。
product_data.cs-icap-status security_result.description 直接マッピングされます。
additional_x_tenant_id security_result.detection_fields 統合済み
architecture_label security_result.detection_fields 統合済み
content_type_label security_result.detection_fields 統合済み
risk_groups_label security_result.detection_fields 統合済み
rs_negotiated_cipher_size_label security_result.detection_fields 統合済み
verdict_label security_result.detection_fields 統合済み
x_bluecoat_access_type_label security_result.detection_fields 統合済み
x_bluecoat_application_operation_label security_result.detection_fields 統合済み
x_cs_connection_negotiated_cipher_size_label security_result.detection_fields 統合済み
x_data_leak_detected security_result.detection_fields 統合済み
x_rs_certificate_hostname_threat_risk_label security_result.detection_fields 統合済み
x_rs_connection_negotiated_cipher_label security_result.detection_fields 統合済み
x_rs_connection_negotiated_cipher_size_label security_result.detection_fields 統合済み
x_rs_connection_negotiated_ssl_version_label security_result.detection_fields 統合済み
x_rs_ocsp_error_label security_result.detection_fields 統合済み
x_x_virus_id_label security_result.detection_fields 統合済み
rule_name1 security_result.rule_name 直接マッピングされます。
severity_id security_result.severity マッピング済み: 1 , 2 → LOW、3 , 4 → MEDIUM、5 , 6 → HIGH
product_data.x-exception-id security_result.summary 直接マッピングされます。
device_name src.asset.hostname 直接マッピングされます。
product_data.x-client-device-name src.asset.hostname 直接マッピングされます。
x-client-device-name src.asset.hostname 直接マッピングされます。
connection.src_ip src.asset.ip 統合済み
device_name src.hostname 直接マッピングされます。
product_data.x-client-device-name src.hostname 直接マッピングされます。
x-client-device-name src.hostname 直接マッピングされます。
connection.src_ip src.ip 統合済み
product_data.x_bluecoat_application_name target.application 直接マッピングされます。
target_application target.application 直接マッピングされます。
x_bluecoat_application_name target.application 直接マッピングされます。
connection.dst_name target.asset.hostname 直接マッピングされます。
connection.url.host target.asset.hostname 直接マッピングされます。
cs-host target.asset.hostname 直接マッピングされます。
device_name target.asset.hostname 直接マッピングされます。
connection.dst_ip target.asset.ip 統合済み
s-ip target.asset.ip 統合済み
target_ip target.asset.ip 統合済み
os_name target.asset.platform_software.platform マッピング済み: Windows → WINDOWS、macOS → MAC
os_ver target.asset.platform_software.platform_version 直接マッピングされます。
connection.dst_name target.hostname 直接マッピングされます。
connection.url.host target.hostname 直接マッピングされます。
cs-host target.hostname 直接マッピングされます。
device_name target.hostname 直接マッピングされます。
connection.dst_ip target.ip 統合済み
s-ip target.ip 統合済み
target_ip target.ip 統合済み
ip_geo_artifact_entry target.ip_geo_artifact 統合済み
client_country target.location.country_or_region 直接マッピングされます。
connection.dst_location.country target.location.country_or_region 直接マッピングされます。
product_data.x-cs-client-ip-country target.location.country_or_region 直接マッピングされます。
x-cs-client-ip-country target.location.country_or_region 直接マッピングされます。
connection.dst_port target.port 名前変更 / マッピング
cs-uri-port target.port 名前変更 / マッピング
device_id target.resource.id 直接マッピングされます。
product_data.x-client-device-id target.resource.id 直接マッピングされます。
device_id target.resource.product_object_id 直接マッピングされます。
product_data.x-client-device-id target.resource.product_object_id 直接マッピングされます。
x_bluecoat_location_id target.resource.product_object_id 直接マッピングされます。
connection.url.path target.url 直接マッピングされます。
connection.url.text target.url 直接マッピングされます。
target_url target.url 直接マッピングされます。
uri_query target.url 直接マッピングされます。
なし metadata.event_type 定数: NETWORK_UNCATEGORIZED
なし metadata.product_event_type 定数: Security
なし metadata.vendor_name 定数: SYMANTEC
なし network.http.parsed_user_agent 定数: cs(user-agent)}
なし principal.asset.platform_software.platform 定数: WINDOWS
なし security_result.severity 定数: LOW
なし target.asset.platform_software.platform 定数: WINDOWS
なし target.resource.type 定数: DEVICE

変更ログ

このパーサーの変更ログを表示する

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