이 가이드에서는 Cloud Storage를 사용하여 Cloud Run 로그를 Google Security Operations로 내보내는 방법을 설명합니다. 파서는 JSON 로그에서 필드를 추출하여 통합 데이터 모델 (UDM)로 변환합니다. HTTP 요청 데이터, 시스템 감사 로그 등 다양한 로그 형식을 처리하고 관련 필드를 UDM에 매핑하는 동시에 Cloud Run에 특정한 라벨과 메타데이터로 데이터를 보강합니다.
스토리지 버킷 URI:gs://my-bucket/<value> 형식의 Google Cloud 스토리지 버킷 URL입니다.
소스 삭제 옵션: 환경설정에 따라 삭제 옵션을 선택합니다.
최대 파일 기간: 지난 일수 동안 수정된 파일을 포함합니다. 기본값은 180일입니다.
다음을 클릭합니다.
확정 화면에서 새 피드 구성을 검토한 다음 제출을 클릭합니다.
UDM 매핑 테이블
로그 필드
UDM 매핑
논리
httpRequest.latency
target.resource.attribute.labels.[]
원시 로그의 httpRequest.latency 값이 target.resource.attribute.labels 내에서 키가 http_request_latency인 라벨의 값으로 사용됩니다.
httpRequest.protocol
network.application_protocol
httpRequest.protocol에 HTTP이 포함된 경우 UDM 필드가 HTTP으로 설정됩니다.
httpRequest.remoteIp
principal.asset.ip
원시 로그의 httpRequest.remoteIp 값이 사용됩니다.
httpRequest.remoteIp
principal.ip
원시 로그의 httpRequest.remoteIp 값이 사용됩니다.
httpRequest.requestMethod
network.http.method
원시 로그의 httpRequest.requestMethod 값이 사용됩니다.
httpRequest.requestSize
network.sent_bytes
원시 로그의 httpRequest.requestSize 값이 부호 없는 정수로 변환되어 사용됩니다.
httpRequest.requestUrl
target.url
원시 로그의 httpRequest.requestUrl 값이 사용됩니다.
httpRequest.responseSize
network.received_bytes
원시 로그의 httpRequest.responseSize 값이 부호 없는 정수로 변환되어 사용됩니다.
httpRequest.serverIp
target.asset.ip
원시 로그의 httpRequest.serverIp 값이 사용됩니다.
httpRequest.serverIp
target.ip
원시 로그의 httpRequest.serverIp 값이 사용됩니다.
httpRequest.status
network.http.response_code
원시 로그의 httpRequest.status 값이 정수로 변환되어 사용됩니다.
httpRequest.userAgent
network.http.parsed_user_agent
원시 로그의 httpRequest.userAgent 값이 사용자 에이전트 문자열로 파싱됩니다.
httpRequest.userAgent
network.http.user_agent
원시 로그의 httpRequest.userAgent 값이 사용됩니다.
insertId
metadata.product_log_id
원시 로그의 insertId 값이 사용됩니다.
labels.instanceId
additional.fields.[]
labels.instanceId의 값은 additional.fields 내에서 키가 instanceId인 라벨의 값으로 사용됩니다.
labels.run.googleapis.com_execution_name
additional.fields.[]
labels.run.googleapis.com_execution_name의 값은 additional.fields 내에서 키가 execution_name인 라벨의 값으로 사용됩니다.
labels.run.googleapis.com_task_attempt
additional.fields.[]
labels.run.googleapis.com_task_attempt의 값은 additional.fields 내에서 키가 task_attempt인 라벨의 값으로 사용됩니다.
labels.run.googleapis.com_task_index
additional.fields.[]
labels.run.googleapis.com_task_index의 값은 additional.fields 내에서 키가 task_index인 라벨의 값으로 사용됩니다.
logName
metadata.product_event_type
원시 로그의 logName 값이 사용됩니다.
resource.labels.configuration_name
target.resource.attribute.labels.[]
resource.labels.configuration_name의 값은 target.resource.attribute.labels 내에서 키가 configuration_name인 라벨의 값으로 사용됩니다.
resource.labels.job_name
additional.fields.[]
resource.labels.job_name의 값은 additional.fields 내에서 키가 job_name인 라벨의 값으로 사용됩니다.
resource.labels.location
target.location.name
원시 로그의 resource.labels.location 값이 사용됩니다.
resource.labels.project_id
target.resource.attribute.labels.[]
resource.labels.project_id의 값은 target.resource.attribute.labels 내에서 키가 project_id인 라벨의 값으로 사용됩니다.
resource.labels.revision_name
target.resource.attribute.labels.[]
resource.labels.revision_name의 값은 target.resource.attribute.labels 내에서 키가 revision_name인 라벨의 값으로 사용됩니다.
resource.labels.service_name
target.resource.attribute.labels.[]
resource.labels.service_name의 값은 target.resource.attribute.labels 내에서 키가 service_name인 라벨의 값으로 사용됩니다.
resource.type
target.resource.resource_subtype
원시 로그의 resource.type 값이 사용됩니다.
severity
security_result.severity
severity 값이 Info와 일치하는 경우 (대소문자 구분 안 함) UDM 필드가 INFORMATIONAL로 설정됩니다.
textPayload
additional.fields.[]
textPayload의 값은 additional.fields 내에서 키가 Textpayload인 라벨의 값으로 사용됩니다.
timestamp
metadata.event_timestamp
원시 로그의 timestamp 값이 타임스탬프로 파싱됩니다.
timestamp
timestamp
원시 로그의 timestamp 값이 타임스탬프로 파싱됩니다. 특정 필드의 존재 여부에 따라 파서 논리에 의해 결정됩니다. 기본값은 GENERIC_EVENT입니다. has_principal_ip, has_target_ip, httpRequest.protocol이 HTTP와 일치하면 NETWORK_HTTP로 설정됩니다. GCP_RUN로 하드코딩되었습니다. GCP_RUN로 하드코딩되었습니다. Google Cloud Platform로 하드코딩되었습니다. GOOGLE_CLOUD_PLATFORM로 하드코딩되었습니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[[["\u003cp\u003eThis guide explains how to export Cloud Run logs to Google Security Operations (SecOps) via Cloud Storage, parsing JSON logs into the Unified Data Model (UDM).\u003c/p\u003e\n"],["\u003cp\u003eThe process involves creating a Google Cloud Storage bucket, configuring Cloud Run to export logs to this bucket, and setting up a feed in Google SecOps to ingest the exported logs.\u003c/p\u003e\n"],["\u003cp\u003eThe parser enriches log data with Cloud Run-specific labels and metadata, and the Unified Data Model (UDM) mapping table outlines how fields from the raw logs are transformed and mapped to UDM fields.\u003c/p\u003e\n"],["\u003cp\u003eThe Cloud Run logs supported, contain several log formats including HTTP requests and system audit logs.\u003c/p\u003e\n"],["\u003cp\u003eThe feature that allows the collection of Cloud Run Logs is currently a Pre-GA offering within Google Security Operations.\u003c/p\u003e\n"]]],[],null,["# Collect Cloud Run logs\n======================\n\nSupported in: \nGoogle secops [SIEM](/chronicle/docs/secops/google-secops-siem-toc)\n| **Note:** This feature is covered by [Pre-GA Offerings Terms](https://chronicle.security/legal/service-terms/) of the Google Security Operations Service Specific Terms. Pre-GA features might have limited support, and changes to pre-GA features might not be compatible with other pre-GA versions. For more information, see the [Google SecOps Technical Support Service guidelines](https://chronicle.security/legal/technical-support-services-guidelines/) and the [Google SecOps Service Specific Terms](https://chronicle.security/legal/service-terms/).\n\nThis guide explains how to export Cloud Run logs to Google Security Operations using Cloud Storage. The parser extracts fields from JSON logs, transforming them into the Unified Data Model (UDM). It handles various log formats, including HTTP request data and system audit logs, mapping relevant fields to UDM while also enriching the data with labels and metadata specific to Cloud Run.\n\nBefore You Begin\n----------------\n\nEnsure that you have the following prerequisites:\n\n- Google SecOps instance.\n- Cloud Run is set up and active in your Google Cloud environment.\n- Privileged access to Google Cloud.\n\nCreate a Google Cloud Storage Bucket\n------------------------------------\n\n1. Sign in to the [Google Cloud console](https://console.cloud.google.com/).\n2. Go to the **Cloud Storage Buckets** page.\n\n [Go to Buckets](https://console.cloud.google.com/storage/browser)\n3. Click **Create**.\n\n4. On the **Create a bucket** page, enter your bucket information. After each of the following steps, click **Continue** to proceed to the next step:\n\n 1. In the **Get started** section, do the following:\n\n 1. Enter a unique name that meets the bucket name requirements; for example, **cloudrun-logs**.\n 2. To enable hierarchical namespace, click the expander arrow to expand the **Optimize for file oriented and data-intensive workloads** section, and then select **Enable Hierarchical namespace on this bucket**.\n\n | **Note:** You cannot enable hierarchical namespace in an existing bucket.\n 3. To add a bucket label, click the expander arrow to expand the **Labels** section.\n\n 4. Click **Add label**, and specify a key and a value for your label.\n\n 2. In the **Choose where to store your data** section, do the following:\n\n 1. Select a **Location type**.\n 2. Use the location type menu to select a **Location** where object data within your bucket will be permanently stored.\n\n | **Note:** If you select the **dual-region** location type, you can also choose to enable **turbo replication** by using the relevant checkbox.\n 3. To set up cross-bucket replication, expand the **Set up cross-bucket replication** section.\n\n 3. In the **Choose a storage class for your data** section, either select a **default storage class** for the bucket, or select **Autoclass** for automatic storage class management of your bucket's data.\n\n 4. In the **Choose how to control access to objects** section, select **not** to enforce **public access prevention** , and select an **access control model** for your bucket's objects.\n\n | **Note:** If public access prevention is already enforced by your project's organization policy, the **Prevent public access** checkbox is locked.\n 5. In the **Choose how to protect object data** section, do the following:\n\n 1. Select any of the options under **Data protection** that you want to set for your bucket.\n 2. To choose how your object data will be encrypted, click the expander arrow labeled **Data encryption** , and select a **Data encryption method**.\n5. Click **Create**.\n\n| **Note:** Be sure to provide your Google SecOps Service Account with permissions to **Read** or **Read \\& Write** to the newly created bucket.\n\nConfigure Log Export in Cloud Run\n---------------------------------\n\n1. On the Google Cloud **Welcome** page, click the **Cloud Run** icon.\n2. Search **Logging** in the search bar at the top and click **Enter**.\n3. In **Log Explorer** , filter the logs by choosing **Cloud Run** in **Log Name** and click **Apply**.\n4. Click **More Actions \\\u003e Create Sink** from the menu.\n5. Provide the following configurations:\n 1. **Sink Details**: enter a name and description.\n 2. Click **Next**.\n 3. **Sink Destination** : select **Cloud Storage Bucket**.\n 4. **Cloud Storage Bucket**: select the bucket created earlier or create a new bucket.\n 5. Click **Next**.\n 6. **Choose Logs to include in Sink**: a default log is populated when you select an option in Cloud Storage Bucket.\n 7. Click **Next**.\n 8. Optional: **Choose Logs to filter out of Sink**: select the logs that you would like not to sink.\n6. Click **Create Sink**.\n\nSet up feeds\n------------\n\nTo configure a feed, follow these steps:\n\n1. Go to **SIEM Settings** \\\u003e **Feeds**.\n2. Click **Add New Feed**.\n3. On the next page, click **Configure a single feed**.\n4. In the **Feed name** field, enter a name for the feed; for example, **Cloud Run Logs**.\n5. Select **Google Cloud Storage V2** as the **Source type**.\n6. Select **GCP Cloud Run** as the **Log type**.\n7. Click **Get Service Account** as the **Chronicle Service Account**.\n8. Click **Next**.\n9. Specify values for the following input parameters:\n\n - **Storage Bucket URI** : Google Cloud storage bucket URL in **`gs://my-bucket/\u003cvalue\u003e`** format.\n - **Source deletion options**: select deletion option according to your preference.\n\n | **Note:** If you select the `Delete transferred files` or `Delete transferred files and empty directories` option, make sure that you granted appropriate permissions to the service account.\n - **Maximum File Age**: Includes files modified in the last number of days. Default is 180 days.\n\n10. Click **Next**.\n\n11. Review your new feed configuration in the **Finalize** screen, and then click **Submit**.\n\nUDM Mapping Table\n-----------------\n\n**Need more help?** [Get answers from Community members and Google SecOps professionals.](https://security.googlecloudcommunity.com/google-security-operations-2)"]]