Cloud Storage 컨텍스트 로그 수집

다음에서 지원:

이 문서에서는 Cloud Storage를 사용하여 Cloud Storage 컨텍스트 로그를 Google Security Operations로 내보내고 수집하는 방법을 설명합니다. 파서는 Cloud Storage 로그에서 수신되는 JSON 데이터를 정리하고 구조화합니다. 그런 다음 관련 필드를 통합 데이터 모델 (UDM)에 매핑하여 보안 생태계 내에서 일관된 표현과 분석을 위해 라벨과 메타데이터로 데이터를 보강합니다.

시작하기 전에

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

  • Google SecOps 인스턴스
  • Cloud Storage가 Google Cloud 환경에서 설정되어 활성화되어 있습니다.
  • Google Cloud 에 대한 독점 액세스 권한 및 적절한 권한

Cloud Storage 버킷 만들기

  1. Google Cloud 콘솔에 로그인합니다.
  2. Cloud Storage 버킷 페이지로 이동합니다.

    버킷으로 이동

  3. 만들기를 클릭합니다.

  4. 버킷 만들기 페이지에서 버킷 정보를 입력합니다. 다음 각 단계를 완료한 후 계속을 클릭하여 다음 단계로 진행합니다.

    1. 시작하기 섹션에서 다음을 수행합니다.

      1. 버킷 이름 요구사항을 충족하는 고유한 이름을 입력합니다(예: google-storage-context-logs).
      2. 계층적 네임스페이스를 사용 설정하려면 펼치기 화살표를 클릭하여 파일 지향 및 데이터 집약적인 워크로드에 최적화 섹션을 펼친 다음 이 버킷에서 계층적 네임스페이스 사용 설정을 선택합니다.

      3. 버킷 라벨을 추가하려면 펼치기 화살표를 클릭하여 라벨 섹션을 펼칩니다.

      4. 라벨 추가를 클릭하고 라벨의 키와 값을 지정합니다.

    2. 데이터 저장 위치 선택 섹션에서 다음을 수행합니다.

      1. 위치 유형을 선택합니다.
      2. 위치 유형 메뉴를 사용하여 버킷 내 객체 데이터가 영구적으로 저장될 위치를 선택합니다.

      3. 버킷 간 복제를 설정하려면 버킷 간 복제 설정 섹션을 펼칩니다.

    3. 데이터의 스토리지 클래스 선택 섹션에서 버킷에 기본 스토리지 클래스를 선택하거나, 버킷 데이터의 자동 스토리지 클래스 관리에 자동 클래스를 선택합니다.

    4. 객체 액세스를 제어하는 방식 선택 섹션에서 공개 액세스 방지를 적용하지 않음을 선택하고 버킷의 객체에 대한 액세스 제어 모델을 선택합니다.

    5. 객체 데이터 보호 방법 선택 섹션에서 다음을 수행합니다.

      1. 버킷에 설정할 데이터 보호 아래의 옵션을 선택합니다.
      2. 객체 데이터가 암호화되는 방식을 선택하려면 데이터 암호화라는 펼치기 화살표를 클릭하고 데이터 암호화 방법을 선택합니다.
  5. 만들기를 클릭합니다.

Cloud Storage 컨텍스트 로그 내보내기 구성

  1. Google Cloud 콘솔에 로그인합니다.
  2. 로깅 > 로그 라우터로 이동합니다.
  3. 싱크 만들기를 클릭합니다.
  4. 다음 구성 매개변수를 제공합니다.

    • 싱크 이름: 의미 있는 이름을 입력합니다(예: Storage-Context-Sink).
    • 싱크 대상: Cloud Storage를 선택하고 버킷의 URI를 입력합니다(예: gs://google-storage-context-logs).
    • 로그 필터:

      logName="*storage*"
      resource.type="gcs_bucket"
      
  5. 만들기를 클릭합니다.

Cloud Storage 권한 구성

  1. IAM 및 관리자 > IAM으로 이동합니다.
  2. Cloud Logging 서비스 계정을 찾습니다.
  3. 버킷에 대한 roles/storage.admin을 부여합니다.

피드 설정

Google SecOps 플랫폼에서 피드를 설정하는 방법은 두 가지입니다.

  • SIEM 설정 > 피드 > 새로 추가
  • 콘텐츠 허브 > 콘텐츠 팩 > 시작하기

클라우드 스토리지 컨텍스트 피드를 설정하는 방법

  1. Google Cloud Compute 플랫폼 팩을 클릭합니다.
  2. GCP Google Cloud Storage 컨텍스트 로그 유형을 찾아 새 피드 추가를 클릭합니다.
  3. 다음 필드의 값을 지정합니다.

    • 소스 유형: Google Cloud Storage V2
    • 스토리지 버킷 URI: Cloud Storage 버킷 URL입니다(예: gs://compute-context-logs).
    • 소스 삭제 옵션: 환경설정에 따라 삭제 옵션을 선택합니다.
  • 최대 파일 기간: 지난 일수 내에 수정된 파일을 포함합니다. 기본값은 180일입니다.

고급 옵션

  • 피드 이름: 피드를 식별하는 미리 채워진 값입니다.
  • 애셋 네임스페이스: 피드와 연결된 네임스페이스입니다.
  • 수집 라벨: 이 피드의 모든 이벤트에 적용되는 라벨입니다.
  1. 피드 만들기를 클릭합니다.

이 제품군 내에서 다양한 로그 유형에 대해 여러 피드를 구성하는 방법에 관한 자세한 내용은 제품별 피드 구성을 참고하세요.

UDM 매핑 테이블

로그 필드 UDM 매핑 논리
상위 항목 event.idm.entity.entity.resource.attribute.labels.value 상위 값은 원시 로그의 상위 배열에서 추출됩니다.
assetType event.idm.entity.entity.resource.type 원시 로그의 assetType 필드에서 직접 매핑됩니다.
insertId event.idm.entity.metadata.product_entity_id 원시 로그의 insertId 필드에서 직접 매핑됩니다.
labels.compute.googleapis.com/resource_name event.idm.entity.entity.resource.name 원시 로그의 labels.compute.googleapis.com/resource_name 필드에서 직접 매핑됩니다.
labels.k8s-pod/controller-revision-hash event.idm.entity.entity.file.sha1 원시 로그의 labels.k8s-pod/controller-revision-hash 필드에서 직접 매핑됩니다.
labels.k8s-pod/name event.idm.entity.entity.resource.attribute.labels.value 원시 로그의 labels.k8s-pod/name 필드에서 직접 매핑됩니다.
labels.k8s-pod/pod-template-generation event.idm.entity.entity.resource.attribute.labels.value 원시 로그의 labels.k8s-pod/pod-template-generation 필드에서 직접 매핑됩니다.
logName event.idm.entity.entity.resource.attribute.labels.value 원시 로그의 logName 필드에서 직접 매핑됩니다.
name event.idm.entity.entity.resource.name 원시 로그의 이름 필드에서 직접 매핑됩니다.
receiveTimestamp event.idm.entity.entity.resource.attribute.creation_time 원시 로그의 receiveTimestamp 필드에서 타임스탬프 형식으로 변환됩니다.
resource.data.iamConfiguration.publicAccessPrevention event.idm.entity.entity.resource.attribute.labels.value 원시 로그의 resource.data.iamConfiguration.publicAccessPrevention 필드에서 직접 매핑됩니다.
resource.data.id event.idm.entity.entity.resource.product_object_id 원시 로그의 resource.data.id 필드에서 직접 매핑됩니다.
resource.data.kind event.idm.entity.entity.resource.type 원시 로그의 resource.data.kind 필드에서 직접 매핑됩니다.
resource.data.labels.app_id event.idm.entity.entity.resource.attribute.labels.value 원시 로그의 resource.data.labels.app_id 필드에서 직접 매핑됩니다.
resource.data.labels.app_name event.idm.entity.entity.resource.attribute.labels.value 원시 로그의 resource.data.labels.app_name 필드에서 직접 매핑됩니다.
resource.data.labels.bucket_id event.idm.entity.entity.resource.attribute.labels.value 원시 로그의 resource.data.labels.bucket_id 필드에서 직접 매핑됩니다.
resource.data.labels.data_classification event.idm.entity.entity.resource.attribute.labels.value 원시 로그의 resource.data.labels.data_classification 필드에서 직접 매핑됩니다.
resource.data.labels.dept_name event.idm.entity.entity.resource.attribute.labels.value 원시 로그의 resource.data.labels.dept_name 필드에서 직접 매핑됩니다.
resource.data.labels.dept_no event.idm.entity.entity.resource.attribute.labels.value 원시 로그의 resource.data.labels.dept_no 필드에서 직접 매핑됩니다.
resource.data.labels.environment event.idm.entity.entity.resource.attribute.labels.value 원시 로그의 resource.data.labels.environment 필드에서 직접 매핑됩니다.
resource.data.labels.goog-composer-environment event.idm.entity.entity.resource.attribute.labels.value 원시 로그의 resource.data.labels.goog-composer-environment 필드에서 직접 매핑됩니다.
resource.data.labels.goog-composer-location event.idm.entity.entity.resource.attribute.labels.value 원시 로그의 resource.data.labels.goog-composer-location 필드에서 직접 매핑됩니다.
resource.data.labels.goog-composer-version event.idm.entity.entity.resource.attribute.labels.value 원시 로그의 resource.data.labels.goog-composer-version 필드에서 직접 매핑됩니다.
resource.data.labels.technical_contact event.idm.entity.entity.resource.attribute.labels.value 원시 로그의 resource.data.labels.technical_contact 필드에서 직접 매핑됩니다.
resource.data.labels.type event.idm.entity.entity.resource.attribute.labels.value 원시 로그의 resource.data.labels.type 필드에서 직접 매핑됩니다.
resource.data.location event.idm.entity.entity.location.name 원시 로그의 resource.data.location 필드에서 직접 매핑됩니다.
resource.data.projectNumber event.idm.entity.entity.resource.attribute.cloud.project.id 원시 로그의 resource.data.projectNumber 필드에서 직접 매핑됩니다.
resource.data.selfLink event.idm.entity.entity.url 원시 로그의 resource.data.selfLink 필드에서 직접 매핑됩니다.
resource.data.timeCreated event.idm.entity.entity.resource.attribute.creation_time 원시 로그의 resource.data.timeCreated 필드에서 타임스탬프 형식으로 변환되었습니다.
resource.data.updated event.idm.entity.entity.resource.attribute.last_update_time 원시 로그의 resource.data.updated 필드에서 타임스탬프 형식으로 변환되었습니다.
resource.discoveryDocumentUri event.idm.entity.entity.file.full_path 원시 로그의 resource.discoveryDocumentUri 필드에서 직접 매핑됩니다.
resource.labels.cluster_name event.idm.entity.entity.resource.attribute.labels.value 원시 로그의 resource.labels.cluster_name 필드에서 직접 매핑됩니다.
resource.labels.container_name event.idm.entity.entity.resource.attribute.labels.value 원시 로그의 resource.labels.container_name 필드에서 직접 매핑됩니다.
resource.labels.location event.idm.entity.entity.location.name 원시 로그의 resource.labels.location 필드에서 직접 매핑됩니다.
resource.labels.namespace_name event.idm.entity.entity.resource.attribute.labels.value 원시 로그의 resource.labels.namespace_name 필드에서 직접 매핑됩니다.
resource.labels.pod_name event.idm.entity.entity.resource.attribute.labels.value 원시 로그의 resource.labels.pod_name 필드에서 직접 매핑됩니다.
resource.labels.project_id event.idm.entity.entity.resource.attribute.cloud.project.id 원시 로그의 resource.labels.project_id 필드에서 직접 매핑됩니다.
resource.parent event.idm.entity.entity.resource.parent 원시 로그의 resource.parent 필드에서 직접 매핑됩니다.
resource.type event.idm.entity.entity.resource.type 원시 로그의 resource.type 필드에서 직접 매핑됩니다.
resource.version event.idm.entity.entity.resource.attribute.labels.value 원시 로그의 resource.version 필드에서 직접 매핑됩니다.
textPayload event.idm.entity.entity.resource.attribute.labels.value 원시 로그의 textPayload 필드에서 직접 매핑됩니다.
해당 사항 없음 event.idm.entity.metadata.collected_timestamp 수집된 타임스탬프는 로그 항목 타임스탬프입니다.
해당 사항 없음 event.idm.entity.metadata.entity_type RESOURCE로 하드코딩되었습니다.
해당 사항 없음 event.idm.entity.metadata.product_name GCP Storage Context로 하드코딩되었습니다.
해당 사항 없음 event.idm.entity.metadata.vendor_name Google Cloud Platform로 하드코딩되었습니다.
해당 사항 없음 event.idm.entity.entity.resource.attribute.cloud.environment GOOGLE_CLOUD_PLATFORM로 하드코딩되었습니다.
해당 사항 없음 event.idm.entity.entity.resource.resource_type STORAGE_BUCKET로 하드코딩되었습니다.
해당 사항 없음 event.timestamp 이벤트 타임스탬프는 로그 항목 타임스탬프입니다.

도움이 더 필요하신가요? 커뮤니티 회원 및 Google SecOps 전문가로부터 답변을 받으세요.