Tenable 감사 로그 수집

다음에서 지원:

이 문서에서는 Cloud Storage V2를 사용하여 Tenable 감사 로그를 Google Security Operations로 수집하는 방법을 설명합니다.

Tenable Vulnerability Management (이전 명칭: Tenable.io)는 활동 로그에 사용자 인증, API 액세스, 구성 변경, 관리 작업을 기록하는 클라우드 기반 취약점 관리 플랫폼 (cloud.tenable.com)입니다. Tenable Vulnerability Management REST API는 이러한 활동 로그 이벤트에 대한 프로그래매틱 액세스를 제공합니다.

시작하기 전에

다음 기본 요건이 충족되었는지 확인합니다.

  • Google SecOps 인스턴스
  • Cloud Storage API가 사용 설정된 Google Cloud 프로젝트
  • Cloud Storage 버킷을 만들고 관리할 수 있는 권한
  • Cloud Storage 버킷의 Identity and Access Management (IAM) 정책을 관리할 수 있는 권한
  • Cloud Run 서비스, Pub/Sub 주제, Cloud Scheduler 작업을 만들 수 있는 권한
  • 관리자 역할이 있는 Tenable Vulnerability Management (cloud.tenable.com)에 대한 권한 있는 액세스
  • 관리자 역할이 있는 사용자 계정에서 생성된 Tenable Vulnerability Management API 키 (액세스 키 및 보안 비밀 키)

Cloud Storage 버킷 만들기

  1. Google Cloud 콘솔로 이동합니다.
  2. 프로젝트를 선택하거나 새 프로젝트를 만듭니다.
  3. 탐색 메뉴에서 Cloud Storage> 버킷으로 이동합니다.
  4. 버킷 만들기를 클릭합니다.
  5. 다음 구성 세부정보를 제공합니다.

    설정 값
    버킷 이름 지정 전역적으로 고유한 이름 (예: tenable-audit-logs)을 입력합니다.
    위치 유형 필요에 따라 선택 (리전, 이중 리전, 멀티 리전)
    위치 위치를 선택합니다 (예: us-central1).
    스토리지 클래스 Standard (자주 액세스하는 로그에 권장)
    액세스 제어 균일 (권장)
    보호 조치 선택사항: 객체 버전 관리 또는 보관 정책 사용 설정
  6. 만들기를 클릭합니다.

Tenable Vulnerability Management API 사용자 인증 정보 수집

API 키 생성

  1. 취약점 관리 사용 설정에 로그인합니다.
  2. 페이지 오른쪽 상단에서 파란색 사용자 원을 클릭한 다음 내 프로필을 클릭합니다. 내 계정 페이지가 표시됩니다.
  3. API 키 탭으로 이동합니다.
  4. 생성을 클릭합니다. API 키 생성 창이 경고와 함께 표시됩니다.

    '주의: 키를 생성하면 다른 통합에서 이미 사용 중인 키를 포함하여 이 사용자 계정의 기존 API 키가 대체됩니다. 이 통합에 전용 사용자 계정을 사용하거나 이전 키를 사용한 모든 애플리케이션을 업데이트하세요.'

  5. 경고를 검토하고 생성을 클릭합니다.

  6. 다음 세부정보를 복사하여 안전한 위치에 저장하세요.

    • 액세스 키: 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. 취약점 관리 사용 설정에 로그인합니다.
  2. 왼쪽 탐색에서 설정을 클릭합니다.
  3. 액세스 제어 타일을 클릭합니다.
  4. 사용자 탭을 클릭한 다음 이 통합에 사용된 사용자 계정을 클릭합니다.
  5. 계정에 관리자 역할이 있는지 확인합니다. 활동 로그 엔드포인트에는 관리자 사용자 역할이 필요합니다. 맞춤 역할은 활동 로그에 대한 액세스 권한을 부여하지 않으며 다른 역할은 HTTP 403 응답을 수신합니다.

  6. 필요한 권한이 없는 경우 Tenable Vulnerability Management 관리자에게 문의하세요.

Cloud Run 함수의 서비스 계정 만들기

Cloud Run 함수에는 Cloud Storage 버킷에 쓸 수 있고 Pub/Sub에 의해 호출될 수 있는 권한이 있는 서비스 계정이 필요합니다.

서비스 계정 만들기

  1. GCP 콘솔에서 IAM 및 관리자 > 서비스 계정으로 이동합니다.
  2. 서비스 계정 만들기를 클릭합니다.
  3. 다음 구성 세부정보를 제공합니다.
    • 서비스 계정 이름: tenable-audit-collector-sa을 입력합니다.
    • 서비스 계정 설명: Service account for Cloud Run function to collect Tenable Audit logs를 입력합니다.
  4. 만들고 계속하기를 클릭합니다.
  5. 이 서비스 계정에 프로젝트에 대한 액세스 권한 부여 섹션에서 다음 역할을 추가합니다.
    1. 역할 선택을 클릭합니다.
    2. 스토리지 객체 관리자를 검색하여 선택합니다.
    3. + 다른 역할 추가를 클릭합니다.
    4. Cloud Run 호출자를 검색하여 선택합니다.
    5. + 다른 역할 추가를 클릭합니다.
    6. Cloud Functions 호출자를 검색하여 선택합니다.
  6. 계속을 클릭합니다.
  7. 완료를 클릭합니다.

이러한 역할은 다음 작업에 필요합니다.

  • 스토리지 객체 관리자: Cloud Storage 버킷에 로그를 쓰고 상태 파일을 관리합니다.
  • Cloud Run 호출자: Pub/Sub가 함수를 호출할 수 있도록 허용
  • Cloud Functions 호출자: 함수 호출을 허용합니다.

Cloud Storage 버킷에 대한 IAM 권한 부여

서비스 계정에 Cloud Storage 버킷에 대한 쓰기 권한을 부여합니다.

  1. Cloud Storage> 버킷으로 이동합니다.
  2. 버킷 이름 (예: tenable-audit-logs)을 클릭합니다.
  3. 권한 탭으로 이동합니다.
  4. 액세스 권한 부여를 클릭합니다.
  5. 다음 구성 세부정보를 제공합니다.
    • 주 구성원 추가: 서비스 계정 이메일 (예: tenable-audit-collector-sa@PROJECT_ID.iam.gserviceaccount.com)을 입력합니다.
    • 역할 할당: 스토리지 객체 관리자 선택
  6. 저장을 클릭합니다.

Pub/Sub 주제 만들기

Cloud Scheduler가 게시하고 Cloud Run 함수가 구독할 Pub/Sub 주제를 만듭니다.

  1. GCP 콘솔에서 Pub/Sub> 주제로 이동합니다.
  2. 주제 만들기를 클릭합니다.
  3. 다음 구성 세부정보를 제공합니다.
    • 주제 ID: tenable-audit-trigger를 입력합니다.
    • 다른 설정은 기본값으로 둡니다.
  4. 만들기를 클릭합니다.

로그를 수집하는 Cloud Run 함수 만들기

Cloud Run 함수는 Cloud Scheduler의 Pub/Sub 메시지에 의해 트리거되어 Tenable Vulnerability Management REST API에서 로그를 가져와 Cloud Storage에 기록합니다.

  1. GCP 콘솔에서 Cloud Run으로 이동합니다.
  2. 서비스 만들기를 클릭합니다.
  3. 함수를 선택합니다 (인라인 편집기를 사용하여 함수 만들기).
  4. 구성 섹션에서 다음 구성 세부정보를 입력합니다.

    설정 값
    서비스 이름 tenable-audit-collector
    리전 Cloud Storage 버킷과 일치하는 리전을 선택합니다 (예: us-central1).
    런타임 Python 3.12 이상 선택
  5. 트리거 (선택사항) 섹션에서 다음을 수행합니다.

    1. + 트리거 추가를 클릭합니다.
    2. Cloud Pub/Sub을 선택합니다.
    3. Cloud Pub/Sub 주제 선택에서 tenable-audit-trigger 주제를 선택합니다.
    4. 저장을 클릭합니다.
  6. 인증 섹션에서 다음을 구성합니다.

    1. 인증 필요를 선택합니다.
    2. ID 및 액세스 관리 (IAM)를 확인합니다.
  7. 아래로 스크롤하고 컨테이너, 네트워킹, 보안을 펼칩니다.

  8. 보안 탭으로 이동합니다.

    • 서비스 계정: 서비스 계정 tenable-audit-collector-sa를 선택합니다.
  9. 컨테이너 탭으로 이동합니다.

    1. 변수 및 보안 비밀을 클릭합니다.
    2. 각 환경 변수에 대해 + 변수 추가를 클릭합니다.
    변수 이름 예시 값 설명
    GCS_BUCKET tenable-audit-logs Cloud Storage 버킷 이름
    GCS_PREFIX tenable 로그 파일의 접두사
    STATE_KEY tenable-state.json 로그 접두사 외부의 상태 경로
    TENABLE_ACCESS_KEY your-access-key Tenable Vulnerability Management 액세스 키
    TENABLE_SECRET_KEY your-secret-key Tenable Vulnerability Management 보안 키
    MAX_RECORDS 5000 실행당 최대 레코드 수
    PAGE_SIZE 1000 페이지당 레코드 수
    LOOKBACK_HOURS 24 초기 전환 확인 기간
    OVERLAP_MINUTES 2 늦게 색인이 생성된 이벤트를 포착하기 위해 워터마크 전에 다시 읽은 시간(분)
  10. 변수 및 보안 비밀 섹션에서 요청으로 이동합니다.

    • 요청 제한 시간: 600초 (10분)를 입력합니다.
  11. 설정 탭으로 이동합니다.

    • 리소스 섹션에서 다음을 수행합니다.
      • 메모리: 512MiB 이상 선택
      • CPU: 1을 선택합니다.
  12. 버전 확장 섹션에서 다음을 수행합니다.

    • 최소 인스턴스 수: 0를 입력합니다.
    • 최대 인스턴스 수: 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 Console에서 Cloud Scheduler로 이동합니다.
  2. 작업 만들기를 클릭합니다.
  3. 다음 구성 세부정보를 제공합니다.

    설정 값
    이름 tenable-audit-collector-hourly
    리전 Cloud Run 함수와 동일한 리전 선택
    주파수 0 * * * * (매시간 정각)
    시간대 시간대 선택 (UTC 권장)
    타겟 유형 Pub/Sub
    주제 tenable-audit-trigger 주제를 선택합니다.
    메일 본문 {} (빈 JSON 객체)
  4. 만들기를 클릭합니다.

일정 빈도 옵션

로그 볼륨 및 지연 시간 요구사항에 따라 빈도를 선택합니다.

빈도 크론 표현식 사용 사례
5분마다 */5 * * * * 대용량, 저지연
15분마다 */15 * * * * 검색량 보통
1시간마다 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> 버킷으로 이동합니다.

  9. 버킷 이름 (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: 비율 제한입니다. 이 함수는 지수 백오프로 재시도한 후 워터마크를 진행하지 않고 실행에 실패하므로 이벤트가 건너뛰지 않습니다.
  • 환경 변수 누락: 필요한 모든 변수가 설정되어 있는지 확인합니다.

Tenable 감사 로그를 수집하도록 Google SecOps에서 피드 구성

  1. SIEM 설정 > 피드로 이동합니다.
  2. 새 피드 추가를 클릭합니다.
  3. 단일 피드 구성을 클릭합니다.
  4. 피드 이름 필드에 피드 이름을 입력합니다(예: Tenable Audit Logs).
  5. 소스 유형으로 Google Cloud Storage V2를 선택합니다.
  6. 로그 유형으로 감사 사용 설정을 선택합니다.
  7. 서비스 계정 가져오기를 클릭합니다. 고유한 서비스 계정 이메일이 표시됩니다. 예를 들면 다음과 같습니다.

    chronicle-12345678@chronicle-gcp-prod.iam.gserviceaccount.com
    
  8. 이 이메일 주소를 복사합니다.

  9. 다음을 클릭합니다.

  10. 다음 입력 매개변수의 값을 지정합니다.

    • 스토리지 버킷 URL: 다음 접두사 경로를 사용하여 Cloud Storage 버킷 URI를 입력합니다.

      gs://tenable-audit-logs/tenable/
      
      • 다음과 같이 바꿉니다.
        • tenable-audit-logs: Cloud Storage 버킷 이름
        • tenable: 로그가 저장되는 선택적 접두사/폴더 경로입니다 (루트의 경우 비워 둠).
    • 소스 삭제 옵션: 환경설정에 따라 삭제 옵션을 선택합니다.

      • 파일 삭제 안함: 소스에서 파일을 삭제하지 않습니다 (테스트에 권장).
      • 전송된 파일 및 빈 디렉터리 삭제: 가져오기가 완료되면 소스에서 파일과 빈 디렉터리를 삭제합니다.

    • 최대 파일 기간: 지난 일수 동안 수정된 파일을 포함합니다 (기본값은 180일).

    • 애셋 네임스페이스: 애셋 네임스페이스

    • 수집 라벨: 이 피드의 이벤트에 적용할 라벨

  11. 다음을 클릭합니다.

  12. 확정 화면에서 새 피드 구성을 검토한 다음 제출을 클릭합니다.

Google SecOps 서비스 계정에 IAM 권한 부여

Google SecOps 서비스 계정에는 Cloud Storage 버킷에 대한 두 가지 역할이 필요합니다. 로그 객체를 읽기 위한 스토리지 객체 뷰어와 버킷 메타데이터를 읽기 위한 버킷 수준 역할입니다.

  1. Cloud Storage> 버킷으로 이동합니다.
  2. 버킷 이름을 클릭합니다.
  3. 권한 탭으로 이동합니다.
  4. 액세스 권한 부여를 클릭합니다.
  5. 다음 구성 세부정보를 제공합니다.
    • 주 구성원 추가: Google SecOps 서비스 계정 이메일을 붙여넣습니다.
    • 역할 할당: 다음 두 가지를 모두 선택합니다.
      • 스토리지 객체 뷰어: 로그 객체를 읽습니다.
      • 스토리지 기존 버킷 리더: 버킷 메타데이터를 읽습니다. 전송된 파일 및 빈 디렉터리 삭제 삭제 옵션을 선택한 경우 삭제 권한도 부여하는 스토리지 기존 버킷 작성자를 대신 선택합니다.
  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 전문가에게 문의하여 답변을 받으세요.