In diesem Leitfaden wird beschrieben, wie Sie Google Cloud IoT-Logs mit Cloud Storage in Google Security Operations exportieren. Der Parser extrahiert Felder aus JSON-formatierten Logs und ordnet diese Felder dann den entsprechenden Feldern im Google SecOps UDM-Schema zu. So werden Rohlogdaten in ein strukturiertes Format umgewandelt, das für Sicherheitsanalysen geeignet ist.
Vorbereitung
Prüfen Sie, ob die folgenden Voraussetzungen erfüllt sind:
Google SecOps-Instanz.
IoT ist in Ihrer Google Cloud Umgebung eingerichtet und aktiv.
Geben Sie auf der Seite Bucket erstellen die Bucket-Informationen ein. Klicken Sie nach jedem der folgenden Schritte auf Weiter, um mit dem nächsten Schritt fortzufahren:
Führen Sie im Abschnitt Einstieg die folgenden Schritte aus:
Geben Sie einen eindeutigen Namen ein, der den Anforderungen für Bucket-Namen entspricht, z. B. cloudiot-logs.
Wenn Sie den hierarchischen Namespace aktivieren möchten, klicken Sie auf den Maximierungspfeil, um den Bereich Für dateiorientierte und datenintensive Arbeitslasten optimieren zu maximieren, und wählen Sie dann Hierarchischen Namespace für diesen Bucket aktivieren aus.
Wenn Sie ein Bucket-Label hinzufügen möchten, klicken Sie auf den Erweiterungspfeil, um den Abschnitt Labels zu maximieren.
Klicken Sie auf Label hinzufügen und geben Sie einen Schlüssel und einen Wert für das Label an.
Gehen Sie im Bereich Speicherort für Daten auswählen so vor:
Standorttyp auswählen.
Wählen Sie im Menü für den Standorttyp einen Speicherort aus, an dem die Objektdaten in Ihrem Bucket dauerhaft gespeichert werden sollen.
Wenn Sie die Bucket-übergreifende Replikation einrichten möchten, maximieren Sie den Bereich Bucket-übergreifende Replikation einrichten.
Wählen Sie im Abschnitt Speicherklasse für Ihre Daten auswählen entweder eine Standardspeicherklasse für den Bucket oder Autoclass für die automatische Verwaltung der Speicherklassen Ihrer Bucket-Daten aus.
Wählen Sie im Abschnitt Zugriff auf Objekte steuern die Option nicht aus, um die Verhinderung des öffentlichen Zugriffs zu erzwingen, und wählen Sie ein Zugriffssteuerungsmodell für die Objekte Ihres Buckets aus.
Gehen Sie im Bereich Auswählen, wie Objektdaten geschützt werden so vor:
Wählen Sie unter Datenschutz die gewünschten Optionen für Ihren Bucket aus.
Um auszuwählen, wie Ihre Objektdaten verschlüsselt werden, klicken Sie auf den Erweiterungspfeil mit dem Label Datenverschlüsselung und wählen Sie eine Datenverschlüsselungsmethode aus.
Klicken Sie auf Erstellen.
Protokollexport in Google Cloud IoT konfigurieren
Melden Sie sich mit Ihrem privilegierten Konto im Google Cloud-Konto an.
Suchen Sie in der Suchleiste nach Logging und wählen Sie die Option aus.
Filtern Sie die Logs im Log-Explorer, indem Sie Cloud IoT Core auswählen und auf Übernehmen klicken.
Klicken Sie auf Weitere Aktionen.
Klicken Sie auf Senke erstellen.
Geben Sie die folgenden Konfigurationen an:
Senkendetails: Geben Sie einen Namen und eine Beschreibung ein.
Klicken Sie auf Weiter.
Senkenziel: Wählen Sie Cloud Storage-Bucket aus.
Cloud Storage-Bucket: Wählen Sie den zuvor erstellten Bucket aus oder erstellen Sie einen neuen Bucket.
Klicken Sie auf Weiter.
Logs auswählen, die in der Senke enthalten sind: Wenn Sie eine Option in Cloud Storage-Bucket auswählen, wird ein Standardlog eingefügt.
Klicken Sie auf Weiter.
Optional: Logs zum Filtern aus der Senke auswählen: Wählen Sie die Logs aus, die nicht in die Senke aufgenommen werden sollen.
Klicken Sie auf Senke erstellen.
Rufen Sie in der GCP ConsoleLogging > Log Router auf.
Klicken Sie auf Senke erstellen.
Feeds einrichten
So konfigurieren Sie einen Feed:
Rufen Sie die SIEM-Einstellungen>Feeds auf.
Klicken Sie auf Neuen Feed hinzufügen.
Klicken Sie auf der nächsten Seite auf Einen einzelnen Feed konfigurieren.
Geben Sie im Feld Feed name (Feedname) einen Namen für den Feed ein, z. B. GCP Cloud IoT Logs (GCP Cloud IoT-Logs).
Wählen Sie Google Cloud Storage V2 als Quelltyp aus.
Wählen Sie GCP Cloud IoT als Logtyp aus.
Klicken Sie auf Dienstkonto abrufen als Chronicle-Dienstkonto.
Klicken Sie auf Weiter.
Geben Sie Werte für die folgenden Eingabeparameter an:
Storage-Bucket-URI: Google Cloud Storage-Bucket-URL im Format gs://my-bucket/<value>.
Optionen zum Löschen von Quellen: Wählen Sie die gewünschte Option aus.
Maximales Dateialter: Enthält Dateien, die in den letzten Tagen geändert wurden. Standardwert: 180 Tage
Klicken Sie auf Weiter.
Prüfen Sie die neue Feedkonfiguration auf dem Bildschirm Abschließen und klicken Sie dann auf Senden.
UDM-Zuordnungstabelle
Logfeld
UDM-Zuordnung
Logik
insertId
metadata.product_log_id
Direkt aus dem Feld insertId zugeordnet.
jsonPayload.eventType
metadata.product_event_type
Direkt aus dem Feld jsonPayload.eventType zugeordnet.
jsonPayload.protocol
network.application_protocol
Direkt aus dem Feld jsonPayload.protocol zugeordnet.
jsonPayload.serviceName
target.application
Direkt aus dem Feld jsonPayload.serviceName zugeordnet.
jsonPayload.status.description
metadata.description
Direkt aus dem Feld jsonPayload.status.description zugeordnet.
jsonPayload.status.message
security_result.description
Direkt aus dem Feld jsonPayload.status.message zugeordnet.
labels.device_id
principal.asset_id
Der Wert wird auf Device ID: gesetzt, verkettet mit dem Wert des Felds labels.device_id.
receiveTimestamp
metadata.event_timestamp
Wird aus dem Feld receiveTimestamp geparst und zum Ausfüllen von events.timestamp und metadata.event_timestamp verwendet.
resource.labels.device_num_id
target.resource.product_object_id
Direkt aus dem Feld resource.labels.device_num_id zugeordnet.
resource.labels.location
target.location.name
Direkt aus dem Feld resource.labels.location zugeordnet.
resource.labels.project_id
target.resource.name
Direkt aus dem Feld resource.labels.project_id zugeordnet.
resource.type
target.resource.resource_subtype
Direkt aus dem Feld resource.type zugeordnet.
die Ausprägung
security_result.severity
Wird aus dem Feld severity anhand der folgenden Logik abgeleitet: – Wenn severityDEFAULT, DEBUG, INFO oder NOTICE ist, wird security_result.severity auf INFORMATIONAL festgelegt. – Wenn severity gleich WARNING oder ERROR ist, wird security_result.severity auf MEDIUM gesetzt. – Wenn severityCRITICAL, ALERT oder EMERGENCY ist, wird security_result.severity auf HIGH festgelegt.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-02 (UTC)."],[[["\u003cp\u003eThis guide details how to export Cloud IoT logs to Google Security Operations (SecOps) by using Cloud Storage, enabling security analysis through structured log data.\u003c/p\u003e\n"],["\u003cp\u003eThe process involves creating a Google Cloud Storage bucket, configuring log export in Cloud IoT, and setting up a feed in Google SecOps to ingest the logs.\u003c/p\u003e\n"],["\u003cp\u003eBefore beginning, users must have a Google SecOps instance, active Cloud IoT setup, and privileged access to Google Cloud.\u003c/p\u003e\n"],["\u003cp\u003eCloud IoT log fields are extracted and mapped to corresponding fields in the Google SecOps Unified Data Model (UDM) schema for structured security analysis.\u003c/p\u003e\n"],["\u003cp\u003eThe feature to collect cloud IoT logs is supported in Google SecOps and is covered under the Pre-GA Offerings Terms, which may have limited support and could change.\u003c/p\u003e\n"]]],[],null,["# Collect Google Cloud IoT 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 Google Cloud IoT logs to Google Security Operations using Cloud Storage. The parser extracts fields from JSON-formatted logs and then maps those fields to the corresponding fields in the Google SecOps UDM schema, ultimately transforming raw log data into a structured format suitable for security analysis.\n\nBefore You Begin\n----------------\n\nEnsure that you have the following prerequisites:\n\n- Google SecOps instance.\n- IoT 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, **cloudiot-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 Google Cloud IoT\n----------------------------------------\n\n1. Sign in to **Google Cloud** account using your privileged account.\n2. Search and select **Logging** in the search bar.\n3. In **Log Explorer** , filter the logs by choosing **Cloud IoT Core** and click **Apply**.\n4. Click **More Actions**.\n5. Click **Create Sink**.\n6. 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.\n7. Click **Create Sink**.\n\n8. In the **GCP console** , go to **Logging \\\u003e Log Router**.\n\n9. 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, **GCP Cloud IoT Logs**.\n5. Select **Google Cloud Storage V2** as the **Source type**.\n6. Select **GCP Cloud IoT** 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)"]]