Mengumpulkan log Symantec Web Security Service (WSS)
Dokumen ini menjelaskan cara menyerap log Symantec Web Security Service (WSS) ke Google Security Operations menggunakan Cloud Storage. Parser terlebih dahulu mencoba mengurai pesan log sebagai JSON. Jika gagal, parser akan menggunakan serangkaian pola grok yang makin spesifik untuk mengekstrak kolom dari teks mentah, yang pada akhirnya memetakan data yang diekstrak ke Model Data Terpadu (UDM). Symantec Web Security Service (WSS) adalah solusi keamanan web berbasis cloud yang memberikan perlindungan real-time terhadap ancaman berbasis web, termasuk malware, phishing, dan kebocoran data.
Sebelum memulai
Pastikan Anda memiliki prasyarat berikut:
- Instance Google SecOps
- Project Google Cloud dengan Cloud Storage API diaktifkan
- Izin untuk membuat dan mengelola bucket Cloud Storage
- Izin untuk mengelola kebijakan Identity and Access Management (IAM) di bucket Cloud Storage
- Izin untuk membuat layanan Cloud Run, topik Pub/Sub, dan tugas Cloud Scheduler
- Akses istimewa ke Portal Symantec Web Security Service
Mengumpulkan kredensial Symantec WSS API
Mendapatkan URL situs Symantec WSS
- Login ke portal Symantec Web Security Service Anda.
- Catat URL portal Anda dari kolom URL browser.
- Format:
https://portal.threatpulse.comatau URL khusus organisasi Anda - Contoh: Jika Anda mengakses WSS di
https://portal.threatpulse.com/reportpod, URL situs Anda adalahhttps://portal.threatpulse.com
- Format:
Membuat kredensial API
- Login ke Symantec Web Security Service Portal sebagai administrator.
- Buka Akun > Kredensial API.
- Klik Add API Credentials. Portal akan menampilkan dialog Add API Credential dengan Username dan Password yang dibuat otomatis.
Salin dan simpan Username dan Password dengan aman.
Pilih opsi API Expiry:
- Berbasis waktu: Tentukan tanggal dan waktu masa berlaku token ini berakhir.
- Tidak pernah habis masa berlakunya: Token tetap valid tanpa batas waktu (direkomendasikan untuk produksi).
Untuk opsi Access, pilih Reporting Access Logs.
Klik Simpan.
Memverifikasi izin
Untuk memverifikasi bahwa akun memiliki izin yang diperlukan:
- Login ke Symantec Web Security Service Portal.
- Buka Akun > Kredensial API.
- Jika Anda dapat melihat kredensial API yang Anda buat dengan Akses yang ditetapkan ke Log Akses Pelaporan, berarti Anda memiliki izin yang diperlukan.
- Jika Anda tidak dapat melihat opsi ini, hubungi administrator Anda untuk memberikan izin Log Akses Pelaporan.
Menguji akses API
Uji kredensial Anda sebelum melanjutkan integrasi:
# 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
Hasil yang diharapkan:
HTTP 200.- Dua baris
X-sync-token: ...danX-sync-status: done(ataumore). - Daftar file
.log.gz, misalnyacloud_<tenant_ID>_<timestamp>.log.gz. Daftar ini kosong jika belum ada log untuk jam saat ini.
Membuat bucket Cloud Storage
- Buka Google Cloud console.
- Pilih project Anda atau buat project baru.
- Di menu navigasi, buka Cloud Storage > Buckets.
- Klik Create bucket.
Berikan detail konfigurasi berikut:
Setelan Nilai Memberi nama bucket Anda Masukkan nama yang unik secara global (misalnya, symantec-wss-logs)Location type Pilih sesuai kebutuhan Anda (Region, Dual-region, Multi-region) Location Pilih lokasi (misalnya, us-central1)Storage class Standard (direkomendasikan untuk log yang sering diakses) Kontrol akses Seragam (direkomendasikan) Alat perlindungan Opsional: Mengaktifkan pembuatan versi objek atau kebijakan retensi Klik Create.
Membuat akun layanan untuk fungsi Cloud Run
Fungsi Cloud Run memerlukan akun layanan dengan izin untuk menulis ke bucket Cloud Storage dan dipanggil oleh Pub/Sub.
Membuat akun layanan
- Di Google Cloud konsol, buka IAM & Admin > Service Accounts.
- Klik Create Service Account.
- Berikan detail konfigurasi berikut:
- Service account name: Masukkan
symantec-wss-collector-sa. - Service account description: Masukkan
Service account for Cloud Run function to collect Symantec WSS logs.
- Service account name: Masukkan
- Klik Create and Continue.
- Di bagian Grant this service account access to project, tambahkan peran berikut:
- Klik Pilih peran.
- Telusuri dan pilih Storage Object Admin.
- Klik + Add another role.
- Telusuri dan pilih Cloud Run Invoker.
- Klik + Add another role.
- Telusuri dan pilih Cloud Functions Invoker.
- Klik Lanjutkan.
- Klik Done.
Peran ini diperlukan untuk:
- Storage Object Admin: Menulis log ke bucket Cloud Storage dan mengelola file status
- Cloud Run Invoker: Memungkinkan Pub/Sub memanggil fungsi
- Cloud Functions Invoker: Mengizinkan pemanggilan fungsi
Memberikan izin IAM pada bucket Cloud Storage
Beri akun layanan izin tulis di bucket Cloud Storage:
- Buka Cloud Storage > Buckets.
- Klik nama bucket Anda.
- Buka tab Izin.
- Klik Grant access.
- Berikan detail konfigurasi berikut:
- Tambahkan entitas: Masukkan email akun layanan (misalnya,
symantec-wss-collector-sa@PROJECT_ID.iam.gserviceaccount.com). - Assign roles: Pilih Storage Object Admin.
- Tambahkan entitas: Masukkan email akun layanan (misalnya,
- Klik Simpan.
Membuat topik Pub/Sub
Buat topik Pub/Sub yang akan dipublikasikan oleh Cloud Scheduler dan di-subscribe oleh fungsi Cloud Run.
- Di Google Cloud konsol, buka Pub/Sub > Topics.
- Klik Create topic.
- Berikan detail konfigurasi berikut:
- ID Topik: Masukkan
symantec-wss-trigger. - Biarkan setelan lainnya sesuai default.
- ID Topik: Masukkan
- Klik Create.
Membuat fungsi Cloud Run untuk mengumpulkan log
Fungsi Cloud Run akan dipicu oleh pesan Pub/Sub dari Cloud Scheduler untuk mengambil log dari Symantec WSS Sync API dan menulisnya ke Cloud Storage.
Sync API menampilkan arsip ZIP file log yang dikompresi dengan gzip. Fungsi ini mengekstrak arsip dan menulis setiap file .log.gz ke bucket sebagai objek terpisah, karena feed tidak dapat membaca file log di dalam file ZIP. Fungsi ini menyimpan token sinkronisasi yang ditampilkan oleh API dalam state file, sehingga setiap eksekusi akan melanjutkan tepat dari posisi eksekusi sebelumnya berhenti.
- Di konsolGoogle Cloud , buka Cloud Run.
- Klik Write a function.
Di bagian Configure, berikan detail konfigurasi berikut:
Setelan Nilai Nama layanan symantec-wss-collectorRegion Pilih region yang cocok dengan bucket Cloud Storage Anda (misalnya, us-central1)Runtime Pilih Python 3.12 atau yang lebih baru Di bagian Trigger, klik Add trigger, lalu pilih Pub/Sub trigger.
Di panel Eventarc trigger, berikan detail konfigurasi berikut:
- Trigger name: Tetap gunakan nama yang dihasilkan atau masukkan nama untuk pemicu.
- Jenis pemicu: Pilih Sumber Google.
- Event provider: Pilih Pub/Sub.
- Jenis peristiwa: Pilih google.cloud.pubsub.topic.v1.messagePublished.
- Select a Cloud Pub/Sub topic: Pilih topik
symantec-wss-trigger. - Region: Pilih region yang sama dengan fungsi.
- Service account: Pilih akun layanan
symantec-wss-collector-sa.
Klik Save trigger.
Di bagian Authentication:
- Pilih Wajibkan autentikasi.
- Centang Identity and Access Management (IAM).
Buka dan luaskan Containers, Networking, Security.
Buka tab Keamanan:
- Service account: Pilih akun layanan (
symantec-wss-collector-sa).
- Service account: Pilih akun layanan (
Buka tab Penampung:
- Klik Variables & Secrets.
- Klik + Add variable untuk setiap variabel lingkungan:
Nama Variabel Nilai Contoh Deskripsi GCS_BUCKETsymantec-wss-logsNama bucket GCS GCS_PREFIXsymantec/wss/Awalan untuk file log STATE_KEYsymantec-wss-state.jsonJalur status, di luar awalan log WSS_SYNC_URLhttps://portal.threatpulse.com/reportpod/logs/syncEndpoint API WSS Sync WSS_API_USERNAMEyour-api-username(dari kredensial API)Nama pengguna API WSS WSS_API_PASSWORDyour-api-password(dari kredensial API)Sandi WSS API INITIAL_LOOKBACK_HOURS1Jam log yang akan dikumpulkan pada operasi pertama (maksimum 167, karena Sync API menampilkan maksimal 7 hari terakhir) WSS_MAX_MB100Perkiraan ukuran maksimum satu respons Sync API dalam MB (1 hingga 2.560) HTTP_TIMEOUT120Waktu tunggu pembacaan HTTP dalam detik MAX_RETRIES3Upaya percobaan ulang maksimum untuk error jaringan dan respons HTTP 5xx RUN_BUDGET_SECONDS480Waktu setelah fungsi berhenti meminta halaman baru; pastikan waktunya lebih singkat daripada waktu tunggu permintaan USER_AGENTsymantec-wss-to-gcs/2.0String agen pengguna Di bagian Variables & Secrets, buka Requests:
- Request timeout: Masukkan
600detik (10 menit).
- Request timeout: Masukkan
Buka tab Setelan:
- Di bagian Resources:
- Memory: Pilih 1 GiB atau lebih tinggi. Fungsi ini menyimpan satu respons Sync API (hingga
WSS_MAX_MB) dalam memori saat mengekstraknya. - CPU: Pilih 1.
- Memory: Pilih 1 GiB atau lebih tinggi. Fungsi ini menyimpan satu respons Sync API (hingga
- Di bagian Resources:
Di bagian Revision scaling:
- Minimum number of instances: Masukkan
0. - Maximum number of instances: Masukkan
1. Sync API mengizinkan satu klien per token sinkronisasi, sehingga eksekusi tidak boleh tumpang-tindih.
- Minimum number of instances: Masukkan
Klik Create.
Tunggu hingga layanan dibuat (1-2 menit).
Setelah layanan dibuat, editor kode inline akan terbuka secara otomatis.
Menambahkan kode fungsi
- Masukkan main di Function entry point
Di editor kode inline, buat dua file:
- File pertama: 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- File kedua: requirements.txt:
functions-framework==3.* google-cloud-storage==2.* urllib3>=2.0.0Klik Deploy untuk menyimpan dan men-deploy fungsi.
Tunggu hingga deployment selesai (2-3 menit).
Buat tugas Cloud Scheduler
Cloud Scheduler akan memublikasikan pesan ke topik Pub/Sub secara berkala, sehingga memicu fungsi Cloud Run.
- Di konsolGoogle Cloud , buka Cloud Scheduler.
- Klik Create Job.
Berikan detail konfigurasi berikut:
Setelan Nilai Nama symantec-wss-collector-hourlyRegion Pilih region yang sama dengan fungsi Cloud Run Frekuensi 0 * * * *(setiap jam, tepat pada jamnya)Zona Waktu Pilih zona waktu (UTC direkomendasikan) Jenis target Pub/Sub Topik Pilih topik Pub/Sub ( symantec-wss-trigger)Isi pesan {}(objek JSON kosong)Klik Create.
Opsi frekuensi jadwal
Pilih frekuensi berdasarkan volume log dan persyaratan latensi:
| Frekuensi | Ekspresi Cron | Kasus Penggunaan |
|---|---|---|
| Setiap 5 menit | */5 * * * * |
Volume tinggi, latensi rendah |
| Setiap 15 menit | */15 * * * * |
Volume sedang |
| Setiap jam | 0 * * * * |
Standar (direkomendasikan) |
| Setiap 6 jam | 0 */6 * * * |
Volume rendah, pemrosesan batch |
| Harian | 0 0 * * * |
Pengumpulan data historis |
Menguji integrasi
- Di konsol Cloud Scheduler, temukan tugas Anda.
- Klik Force run untuk memicu tugas secara manual.
- Tunggu beberapa detik.
- Buka Cloud Run > Services.
- Klik nama fungsi Anda (
symantec-wss-collector). - Klik tab Logs.
Pastikan fungsi berhasil dieksekusi. Cari:
Wrote N log files (X bytes), X-sync-status: done Sync is up to date.Jika Sync API memiliki lebih banyak data daripada yang dapat dimuat dalam satu respons, log akan menampilkan beberapa baris
Wrote N log filesdenganX-sync-status: moresebelumdoneakhir.Buka Cloud Storage > Buckets.
Klik nama bucket Anda.
Buka folder awalan (
symantec/wss/).Pastikan file
.log.gzbaru telah dibuat, misalnyasymantec/wss/YYYY/MM/DD/<run_ID>_cloud_<tenant_ID>_<timestamp>.log.gz. Proses ini tidak akan membuat file jika Symantec WSS tidak memiliki log baru.
Jika Anda melihat error di log:
- HTTP 401: Periksa kredensial API di variabel lingkungan. Verifikasi bahwa nama pengguna dan sandi sudah benar.
- HTTP 403: Pastikan kredensial API mengaktifkan izin "Reporting Access Logs" di portal WSS.
- HTTP 400: Permintaan pertama sinkronisasi menggunakan tanggal mulai yang lebih lama dari 7 hari.
INITIAL_LOOKBACK_HOURSbawah. - HTTP 409: Terlalu banyak permintaan yang memulai sinkronisasi baru dengan
token=none. Tunggu 90 menit sebelum operasi berikutnya. - HTTP 423 atau 429: Permintaan lain sedang diproses, atau Sync API membatasi permintaan. Fungsi akan menunggu dan mencoba lagi. Jika waktu tunggu tidak sesuai dengan waktu proses, proses berikutnya akan dilanjutkan dari token yang disimpan.
- Token sinkronisasi habis masa berlakunya (HTTP 410): Fungsi akan memulai ulang sinkronisasi dari jam sinkronisasi terakhir yang selesai. Beberapa peristiwa dari jam tersebut dapat diserap lagi.
- X-sync-status adalah 'abort' atau tidak ada footer X-sync-token/X-sync-status: Respons tidak lengkap dan dihapus. Proses berikutnya akan mencoba lagi dengan token yang sama.
- Mengharapkan file ZIP: Sync API menampilkan sesuatu selain arsip log. Periksa respons dengan pengujian di Menguji akses API.
- Diubah oleh operasi lain: Dua operasi tumpang-tindih. Tetapkan Maximum number of instances ke
1. - KeyError untuk nama variabel: Pastikan semua variabel lingkungan yang diperlukan telah ditetapkan dalam konfigurasi fungsi Cloud Run.
Mengonfigurasi feed di Google SecOps untuk menyerap log Symantec WSS
- Buka SIEM Settings > Feeds.
- Klik Tambahkan Feed Berita Baru.
- Klik Konfigurasi satu feed.
- Di kolom Nama feed, masukkan nama untuk feed (misalnya,
Symantec WSS logs). - Pilih Google Cloud Storage V2 sebagai Source type.
- Pilih Symantec WSS sebagai Log type.
Klik Get Service Account. Email akun layanan yang unik akan ditampilkan, misalnya:
chronicle-12345678@chronicle-gcp-prod.iam.gserviceaccount.comSalin alamat email ini. Anda akan menggunakannya pada langkah berikutnya.
Klik Berikutnya.
Tentukan nilai untuk parameter input berikut:
- Storage bucket URL: Masukkan URI bucket Cloud Storage dengan jalur awalan:
gs://symantec-wss-logs/symantec/wss/Ganti:
symantec-wss-logs: Nama bucket Cloud Storage Anda.symantec/wss/: Awalan atau jalur folder opsional tempat log disimpan (biarkan kosong untuk root).
Contoh: - Bucket root:
gs://company-logs/- Dengan awalan:gs://company-logs/symantec-wss/- Dengan subfolder:gs://company-logs/symantec/wss/Opsi penghapusan sumber: Pilih opsi penghapusan sesuai preferensi Anda:
- Jangan pernah menghapus file: Jangan pernah menghapus file dari sumber (direkomendasikan untuk pengujian).
- Hapus file yang ditransfer dan direktori kosong: Hapus file dan direktori kosong dari sumber setelah pengambilan berhasil diselesaikan.
Usia File Maksimum: Sertakan file yang diubah dalam jumlah hari terakhir. Defaultnya adalah 180 hari.
Namespace aset: Namespace aset.
Label penyerapan: Label yang akan diterapkan ke peristiwa dari feed ini.
Klik Berikutnya.
Tinjau konfigurasi feed berita baru Anda di layar Finalize, lalu klik Submit.
Memberikan izin IAM ke akun layanan Google SecOps
Akun layanan Google SecOps memerlukan dua peran di bucket Cloud Storage Anda: Storage Object Viewer untuk membaca objek log, dan peran level bucket untuk membaca metadata bucket.
- Buka Cloud Storage > Buckets.
- Klik nama bucket Anda.
- Buka tab Izin.
- Klik Grant access.
- Berikan detail konfigurasi berikut:
- Add principals: Tempel email akun layanan Google SecOps.
- Assign roles: Pilih kedua peran berikut:
- Storage Object Viewer: membaca objek log.
- Storage Legacy Bucket Reader: membaca metadata bucket. Jika Anda memilih opsi penghapusan Delete transferred files and empty directories, pilih Storage Legacy Bucket Writer, yang juga memberikan izin penghapusan.
Klik Simpan.
Tabel pemetaan UDM
| Kolom Log | Pemetaan UDM | Logika |
|---|---|---|
content_type_label |
additional.fields |
Digabung |
cs_uri_extension_label |
additional.fields |
Digabung |
cs_uri_path_label |
additional.fields |
Digabung |
hostname_categories_label |
additional.fields |
Digabung |
_intermediary |
intermediary |
Digabung |
msg_desc |
metadata.description |
Dipetakan secara langsung |
s_action |
metadata.description |
Dipetakan secara langsung |
device_time |
metadata.event_timestamp |
Diurai sebagai ISO8601 |
log_time |
metadata.event_timestamp |
Diurai sebagai UNIX_MS |
timestamp |
metadata.event_timestamp |
Diurai sebagai UNIX |
when |
metadata.event_timestamp |
Diurai sebagai MMM dd HH:mm:ss |
has_principal |
metadata.event_type |
Dipetakan: true → NETWORK_CONNECTION, true → STATUS_UPDATE |
s-action |
metadata.product_event_type |
Dipetakan secara langsung |
product_data.x-bluecoat-transaction-uuid |
metadata.product_log_id |
Dipetakan secara langsung |
ref_uid |
metadata.product_log_id |
Dipetakan secara langsung |
uuid |
metadata.product_log_id |
Dipetakan secara langsung |
x-bluecoat-transaction-uuid |
metadata.product_log_id |
Dipetakan secara langsung |
product_name |
metadata.product_name |
Dipetakan secara langsung |
product_ver |
metadata.product_version |
Dipetakan secara langsung |
connection.url.scheme |
network.application_protocol |
Dipetakan secara langsung |
cs-uri-scheme |
network.application_protocol |
Dipetakan: (?i)https → HTTPS |
uri_scheme |
network.application_protocol |
Dipetakan secara langsung |
cs-version |
network.application_protocol_version |
Dipetakan secara langsung |
connection.url.method |
network.http.method |
Dipetakan secara langsung |
cs-method |
network.http.method |
Dipetakan secara langsung |
method |
network.http.method |
Dipetakan secara langsung |
cs_referer |
network.http.referral_url |
Dipetakan secara langsung |
connection.http_status |
network.http.response_code |
Diganti namanya/dipetakan |
status |
network.http.response_code |
Dipetakan secara langsung |
connection.http_user_agent |
network.http.user_agent |
Dipetakan secara langsung |
cs(user-agent) |
network.http.user_agent |
Dipetakan secara langsung |
http_user_agent |
network.http.user_agent |
Dipetakan secara langsung |
connection.url.scheme |
network.ip_protocol |
Dipetakan secara langsung |
uri_scheme |
network.ip_protocol |
Dipetakan secara langsung |
connection.bytes_download |
network.received_bytes |
Diganti namanya/dipetakan |
received_bytes |
network.received_bytes |
Diganti namanya/dipetakan |
connection.bytes_upload |
network.sent_bytes |
Diganti namanya/dipetakan |
sent_bytes |
network.sent_bytes |
Diganti namanya/dipetakan |
time_taken |
network.session_duration.seconds |
Dipetakan secara langsung |
session_id |
network.session_id |
Dipetakan secara langsung |
cs_connection_negotiated_cipher |
network.tls.cipher |
Dipetakan secara langsung |
product_data.x-cs-connection-negotiated-cipher |
network.tls.cipher |
Dipetakan secara langsung |
x-cs-connection-negotiated-cipher |
network.tls.cipher |
Dipetakan secara langsung |
certificate_hostname |
network.tls.client.server_name |
Dipetakan secara langsung |
product_data.x-rs-certificate-hostname |
network.tls.client.server_name |
Dipetakan secara langsung |
x-rs-certificate-hostname |
network.tls.client.server_name |
Dipetakan secara langsung |
product_data.x-rs-certificate-observed-errors |
network.tls.server.certificate.issuer |
Dipetakan secara langsung |
x-rs-certificate-observed-errors |
network.tls.server.certificate.issuer |
Dipetakan secara langsung |
certificate_validate |
network.tls.server.certificate.subject |
Dipetakan secara langsung |
product_data.x-rs-certificate-validate-status |
network.tls.server.certificate.subject |
Dipetakan secara langsung |
x-rs-certificate-validate-status |
network.tls.server.certificate.subject |
Dipetakan secara langsung |
connection.tls.version |
network.tls.version_protocol |
Dipetakan secara langsung |
cs_ssl_version |
network.tls.version_protocol |
Dipetakan secara langsung |
product_data.x-cs-connection-negotiated-ssl-version |
network.tls.version_protocol |
Dipetakan secara langsung |
x-cs-connection-negotiated-ssl-version |
network.tls.version_protocol |
Dipetakan secara langsung |
agent_type |
observer.application |
Dipetakan secara langsung |
product_data.x-client-agent-type |
observer.application |
Dipetakan secara langsung |
x-client-agent-type |
observer.application |
Dipetakan secara langsung |
os_version |
observer.platform_version |
Dipetakan secara langsung |
product_data.x-client-agent-sw |
observer.platform_version |
Dipetakan secara langsung |
x-client-agent-sw |
observer.platform_version |
Dipetakan secara langsung |
user_domain |
principal.administrative_domain |
Dipetakan secara langsung |
hostname |
principal.asset.hostname |
Dipetakan secara langsung |
c-ip |
principal.asset.ip |
Digabung |
c_ip |
principal.asset.ip |
Digabung |
collector_device_ip |
principal.asset.ip |
Digabung |
connection.src_ip |
principal.asset.ip |
Digabung |
src_ip |
principal.asset.ip |
Digabung |
x-sr-vpop-ip |
principal.asset.ip |
Digabung |
x-client-os |
principal.asset.platform_software.platform |
Dipetakan: Windows → WINDOWS |
hostname |
principal.hostname |
Dipetakan secara langsung |
c-ip |
principal.ip |
Digabung |
c_ip |
principal.ip |
Digabung |
collector_device_ip |
principal.ip |
Digabung |
connection.src_ip |
principal.ip |
Digabung |
src_ip |
principal.ip |
Digabung |
x-sr-vpop-ip |
principal.ip |
Digabung |
product_data.r-supplier-country |
principal.location.country_or_region |
Dipetakan secara langsung |
r-supplier-country |
principal.location.country_or_region |
Dipetakan secara langsung |
supplier_country |
principal.location.country_or_region |
Dipetakan secara langsung |
src_port |
principal.port |
Diganti namanya/dipetakan |
x-client-device-id |
principal.resource.product_object_id |
Dipetakan secara langsung |
user.name |
principal.user.user_display_name |
Dipetakan secara langsung |
user_name |
principal.user.user_display_name |
Dipetakan secara langsung |
cs-userdn |
principal.user.userid |
Dipetakan secara langsung |
security_result_action |
security_result.action |
Digabung |
filter_result |
security_result.action_details |
Dipetakan secara langsung |
result |
security_result.action_details |
Dipetakan secara langsung |
rs_icap_status |
security_result.action_details |
Dipetakan secara langsung |
category_details |
security_result.category_details |
Digabung |
cs-categories |
security_result.category_details |
Digabung |
cs-icap-status |
security_result.description |
Dipetakan secara langsung |
cs_icap_status |
security_result.description |
Dipetakan secara langsung |
product_data.cs-icap-status |
security_result.description |
Dipetakan secara langsung |
additional_x_tenant_id |
security_result.detection_fields |
Digabung |
architecture_label |
security_result.detection_fields |
Digabung |
content_type_label |
security_result.detection_fields |
Digabung |
risk_groups_label |
security_result.detection_fields |
Digabung |
rs_negotiated_cipher_size_label |
security_result.detection_fields |
Digabung |
verdict_label |
security_result.detection_fields |
Digabung |
x_bluecoat_access_type_label |
security_result.detection_fields |
Digabung |
x_bluecoat_application_operation_label |
security_result.detection_fields |
Digabung |
x_cs_connection_negotiated_cipher_size_label |
security_result.detection_fields |
Digabung |
x_data_leak_detected |
security_result.detection_fields |
Digabung |
x_rs_certificate_hostname_threat_risk_label |
security_result.detection_fields |
Digabung |
x_rs_connection_negotiated_cipher_label |
security_result.detection_fields |
Digabung |
x_rs_connection_negotiated_cipher_size_label |
security_result.detection_fields |
Digabung |
x_rs_connection_negotiated_ssl_version_label |
security_result.detection_fields |
Digabung |
x_rs_ocsp_error_label |
security_result.detection_fields |
Digabung |
x_x_virus_id_label |
security_result.detection_fields |
Digabung |
rule_name1 |
security_result.rule_name |
Dipetakan secara langsung |
severity_id |
security_result.severity |
Dipetakan: 1 , 2 → LOW, 3 , 4 → MEDIUM, 5 , 6 → HIGH |
product_data.x-exception-id |
security_result.summary |
Dipetakan secara langsung |
device_name |
src.asset.hostname |
Dipetakan secara langsung |
product_data.x-client-device-name |
src.asset.hostname |
Dipetakan secara langsung |
x-client-device-name |
src.asset.hostname |
Dipetakan secara langsung |
connection.src_ip |
src.asset.ip |
Digabung |
device_name |
src.hostname |
Dipetakan secara langsung |
product_data.x-client-device-name |
src.hostname |
Dipetakan secara langsung |
x-client-device-name |
src.hostname |
Dipetakan secara langsung |
connection.src_ip |
src.ip |
Digabung |
product_data.x_bluecoat_application_name |
target.application |
Dipetakan secara langsung |
target_application |
target.application |
Dipetakan secara langsung |
x_bluecoat_application_name |
target.application |
Dipetakan secara langsung |
connection.dst_name |
target.asset.hostname |
Dipetakan secara langsung |
connection.url.host |
target.asset.hostname |
Dipetakan secara langsung |
cs-host |
target.asset.hostname |
Dipetakan secara langsung |
device_name |
target.asset.hostname |
Dipetakan secara langsung |
connection.dst_ip |
target.asset.ip |
Digabung |
s-ip |
target.asset.ip |
Digabung |
target_ip |
target.asset.ip |
Digabung |
os_name |
target.asset.platform_software.platform |
Dipetakan: Windows → WINDOWS, macOS → MAC |
os_ver |
target.asset.platform_software.platform_version |
Dipetakan secara langsung |
connection.dst_name |
target.hostname |
Dipetakan secara langsung |
connection.url.host |
target.hostname |
Dipetakan secara langsung |
cs-host |
target.hostname |
Dipetakan secara langsung |
device_name |
target.hostname |
Dipetakan secara langsung |
connection.dst_ip |
target.ip |
Digabung |
s-ip |
target.ip |
Digabung |
target_ip |
target.ip |
Digabung |
ip_geo_artifact_entry |
target.ip_geo_artifact |
Digabung |
client_country |
target.location.country_or_region |
Dipetakan secara langsung |
connection.dst_location.country |
target.location.country_or_region |
Dipetakan secara langsung |
product_data.x-cs-client-ip-country |
target.location.country_or_region |
Dipetakan secara langsung |
x-cs-client-ip-country |
target.location.country_or_region |
Dipetakan secara langsung |
connection.dst_port |
target.port |
Diganti namanya/dipetakan |
cs-uri-port |
target.port |
Diganti namanya/dipetakan |
device_id |
target.resource.id |
Dipetakan secara langsung |
product_data.x-client-device-id |
target.resource.id |
Dipetakan secara langsung |
device_id |
target.resource.product_object_id |
Dipetakan secara langsung |
product_data.x-client-device-id |
target.resource.product_object_id |
Dipetakan secara langsung |
x_bluecoat_location_id |
target.resource.product_object_id |
Dipetakan secara langsung |
connection.url.path |
target.url |
Dipetakan secara langsung |
connection.url.text |
target.url |
Dipetakan secara langsung |
target_url |
target.url |
Dipetakan secara langsung |
uri_query |
target.url |
Dipetakan secara langsung |
| T/A | metadata.event_type |
Konstanta: NETWORK_UNCATEGORIZED |
| T/A | metadata.product_event_type |
Konstanta: Security |
| T/A | metadata.vendor_name |
Konstanta: SYMANTEC |
| T/A | network.http.parsed_user_agent |
Konstanta: cs(user-agent)} |
| T/A | principal.asset.platform_software.platform |
Konstanta: WINDOWS |
| T/A | security_result.severity |
Konstanta: LOW |
| T/A | target.asset.platform_software.platform |
Konstanta: WINDOWS |
| T/A | target.resource.type |
Konstanta: DEVICE |
Log Perubahan
Melihat Log Perubahan untuk parser ini
Perlu bantuan lain? Dapatkan jawaban dari anggota Komunitas dan profesional Google SecOps.