Collect Cloud Next Generation Firewall Enterprise logs

Supported in:

This document explains how to export and ingest Cloud NGFW Enterprise logs into Google Security Operations using Google Cloud. The parser extracts fields from Google Cloud Firewall logs, transforms and maps them to the UDM. It handles various log fields, including connection details, threat information, rule details, and network information, performing data type conversions, renaming, and conditional logic based on the action and direction fields to populate the UDM model correctly.

Before you begin

  • Ensure that you have a Google SecOps instance.
  • Ensure that Cloud NGFW Enterprise is active and configured in your Google Cloud environment.
  • Ensure that you have privileged access to Google Cloud and appropriate permissions to access Cloud NGFW Enterprise logs.

Create a Cloud Storage bucket

  1. Sign in to the Google Cloud console.
  2. Go to the Cloud Storage Buckets page.

    Go to Buckets

  3. Click Create.

  4. On the Create a bucket page, enter your bucket information. After each of the following steps, click Continue to proceed to the next step:

    1. In the Get started section, do the following:

      1. Enter a unique name that meets the bucket name requirements; for example, gcp-ngfw-logs.
      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.

      3. To add a bucket label, click the expander arrow to expand the Labels section.

      4. Click Add label, and specify a key and a value for your label.

    2. In the Choose where to store your data section, do the following:

      1. Select a Location type.
      2. Use the location type menu to select a Location where object data within your bucket will be permanently stored.

      3. To set up cross-bucket replication, expand the Set up cross-bucket replication section.

    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.

    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.

    5. In the Choose how to protect object data section, do the following:

      1. Select any of the options under Data protection that you want to set for your bucket.
      2. To choose how your object data will be encrypted, click the expander arrow labeled Data encryption, and select a Data encryption method.
  5. Click Create.

Configure Cloud NGFW logs export

  1. Sign in to the Google Cloud console.
  2. Go to Logging > Log Router.
  3. Click Create Sink.
  4. Provide the following configuration parameters:

    • Sink Name: enter a meaningful name; for example, NGFW-Export-Sink.
    • Sink Destination: select Google Cloud Storage and enter the URI for your bucket; for example, gs://gcp-ngfw-logs.
    • Log Filter:

      logName="projects/<your-project-id>/logs/gcp-firewall"
      
  5. Click Create.

Configure permissions for Cloud Storage

  1. Go to IAM & Admin > IAM.
  2. Locate the Cloud Logging service account.
  3. Grant the roles/storage.admin on the bucket.

Configure a feed in Google SecOps to ingestCloud NGFW Enterprise logs

  1. Go to SIEM Settings > Feeds.
  2. Click Add new.
  3. In the Feed name field, enter a name for the feed; for example, GCP NGFW Enterprise Logs.
  4. Select Google Cloud Storage as the Source type.
  5. Select GCP NGFW Enterprise as the Log type.
  6. Click Get Service Account next to the Chronicle Service Account field.
  7. Click Next.
  8. Specify values for the following input parameters:

    • Storage Bucket URI: Google Cloud storage bucket URL; for example, gs://gcp-ngfw-logs.
    • URI Is A: Select Directory which includes subdirectories.
    • Source deletion options: select the deletion option according to your preference.

    • Asset namespace: the asset namespace.

    • Ingestion labels: the label applied to the events from this feed.

  9. Click Next.

  10. Review your new feed configuration in the Finalize screen, and then click Submit.

UDM Mapping Table

Log Field UDM Mapping Logic
insertId metadata.product_log_id Directly mapped from the insertId field.
jsonPayload.action security_result.action_details Directly mapped from the jsonPayload.action field.
jsonPayload.connection.clientIp principal.asset.ip Directly mapped from the jsonPayload.connection.clientIp field.
jsonPayload.connection.clientIp principal.ip Directly mapped from the jsonPayload.connection.clientIp field.
jsonPayload.connection.clientPort principal.port Directly mapped from the jsonPayload.connection.clientPort field and converted to integer.
jsonPayload.connection.protocol network.ip_protocol Mapped from jsonPayload.connection.protocol. If the value is tcp, the UDM field is set to TCP. Similar logic applies for udp, icmp, and igmp.
jsonPayload.connection.serverIp target.asset.ip Directly mapped from the jsonPayload.connection.serverIp field.
jsonPayload.connection.serverIp target.ip Directly mapped from the jsonPayload.connection.serverIp field.
jsonPayload.connection.serverPort target.port Directly mapped from the jsonPayload.connection.serverPort field and converted to integer.
jsonPayload.interceptVpc.projectId security_result.rule_labels Mapped from jsonPayload.interceptVpc.projectId with key rule_details_projectId.
jsonPayload.interceptVpc.vpc security_result.rule_labels Mapped from jsonPayload.interceptVpc.vpc with key rule_details_vpc_network.
jsonPayload.securityProfileGroupDetails.securityProfileGroupId security_result.rule_labels Mapped from jsonPayload.securityProfileGroupDetails.securityProfileGroupId with key rule_details_security_profile_group.
jsonPayload.securityProfileGroupDetails.securityProfileGroupId security_result.rule_labels Mapped from jsonPayload.securityProfileGroupDetails.securityProfileGroupId with key rule_details_securityProfileGroupDetails_id.
jsonPayload.threatDetails.category security_result.rule_labels Mapped from jsonPayload.threatDetails.category with key rule_details_category.
jsonPayload.threatDetails.direction security_result.rule_labels Mapped from jsonPayload.threatDetails.direction with key rule_details_direction.
jsonPayload.threatDetails.id security_result.threat_id Directly mapped from the jsonPayload.threatDetails.id field.
jsonPayload.threatDetails.severity security_result.severity Mapped from jsonPayload.threatDetails.severity. If the value is CRITICAL, the UDM field is set to CRITICAL. Similar logic applies for HIGH, MEDIUM, LOW, and INFO.
jsonPayload.threatDetails.threat security_result.threat_name Directly mapped from the jsonPayload.threatDetails.threat field.
jsonPayload.threatDetails.type security_result.rule_labels Mapped from jsonPayload.threatDetails.type with key rule_details_threat_type.
jsonPayload.threatDetails.uriOrFilename security_result.rule_labels Mapped from jsonPayload.threatDetails.uriOrFilename with key rule_details_uriOrFilename.
logName metadata.product_event_type Directly mapped from the logName field.
metadata.collected_timestamp metadata.collected_timestamp Directly mapped from the receiveTimestamp field and parsed using the specified date format.
metadata.event_type metadata.event_type Set to NETWORK_CONNECTION if both principal_ip and target_ip are present. Set to STATUS_UNCATEGORIZED if only principal_ip is present. Otherwise, set to GENERIC_EVENT.
metadata.product_name metadata.product_name Hardcoded to GCP Firewall.
metadata.vendor_name metadata.vendor_name Hardcoded to Google Cloud Platform.
receiveTimestamp metadata.collected_timestamp Directly mapped from the receiveTimestamp field.
security_result.action security_result.action Derived from the jsonPayload.action field. Mapped to ALLOW, BLOCK, or UNKNOWN_ACTION based on the value of jsonPayload.action.
timestamp metadata.event_timestamp Directly mapped from the timestamp field.
timestamp timestamp Directly mapped from the timestamp field.

Changes

2024-04-16

  • Changed mapping of alert_severity from jsonPayload.alert_severity to jsonPayload.threatDetails.severity.
  • Changed mapping of threat_id from jsonPayload.threat_id to jsonPayload.threatDetails.id.
  • Changed mapping of rdspg from jsonPayload.security_profile_group to jsonPayload.securityProfileGroupDetails.securityProfileGroupId.
  • Changed mapping of rduri from jsonPayload.uri_or_filename to jsonPayload.threatDetails.uriOrFilename.
  • Removed mapping of jsonPayload.rule_details.priority, jsonPayload.rule_details.apply_security_profile_fallback_action, jsonPayload.rule_details.source_range, and jsonPayload.rule_details.target_secure_tag.

2024-03-26

  • Newly created parser.

Need more help? Get answers from Community members and Google SecOps professionals.