Collect Azure Application Gateway logs
This document explains how to collect Azure Application Gateway logs by setting up a Google Security Operations feed. This parser handles both single and multi-record JSON structures, extracts fields from the "records" array, performs data type conversions, maps fields to the UDM, and enriches the data with metadata and derived fields like network connection type. It also handles specific logic for different operationName 
values, extracting relevant IP addresses, subnets, and other configuration details.
Before you begin
Ensure you have the following prerequisites:
- Google SecOps instance
- Privileged access to an Azure subscription
- An Azure application gateway environment (tenant) in Azure
Configure Azure Storage Account
- In the Azure console, search for Storage accounts.
- Click Create.
- Specify values for the following input parameters: - Subscription: Select the subscription.
- Resource Group: Select the resource group.
- Region: Select the region.
- Performance: Select the performance (Standard recommended).
- Redundancy: Select the redundancy (GRS or LRS recommended).
- Storage account name: Enter a name for the new storage account.
 
- Click Review + create.
- Review the overview of the account and click Create.
- From the Storage Account Overviewpage, select submenu Access keysin Security + networking.
- Click Shownext to key1or key2
- Click Copy to clipboardto copy the key.
- Save the key in a secure location for later use.
- From the Storage Account Overviewpage, select submenu Endpointsin Settings.
- Click Copy to clipboardto copy the Blob serviceendpoint URL. (for example, https://<storageaccountname>.blob.core.windows.net)
- Save the endpoint URL in a secure location for later use.
How to configure Azure Application Gateway
- Sign in to the Azure portal.
- Go to the resource group you want.
- Select Application gateway(the Application gatewaywindow appears).
- In the Monitoringsection, select Diagnostic settings > Turn on diagnostics.
- Select Add diagnostics setting(the Diagnostic settingswindow displays the settings for the diagnostic logs).
- In the logsection, do the following: - Select the ApplicationGatewayAccessLogcheckbox.
- Select the ApplicationGatewayFirewallLogcheckbox.
 
- To store logs in the storage account, do the following: - Select Archive to a storage accountcheckbox.
- In the Subscriptionlist, select an existing subscription.
- In the Storage accountlist, select an existing storage account.
 
Set up feeds
There are two different entry points to set up feeds in the Google SecOps platform:
- SIEM Settings > Feeds > Add New Feed
- Content Hub > Content Packs > Get Started
How to set up the Azure application gateway feed
- Click the Azure Platformpack.
- Locate the Azure Application Gatewaylog type and click Add new feed.
-  Specify values for the following fields: - Source Type: Microsoft Azure Blob Storage V2.
-  Azure URI: The blob endpoint URL. -  ENDPOINT_URL/BLOB_NAME- Replace the following: -  ENDPOINT_URL: The blob endpoint URL. (https://<storageaccountname>.blob.core.windows.net)
-  BLOB_NAME: The name of the blob. (such as,insights-logs-<logname>)
 
-  
 
- Replace the following: 
 
-  
- Source deletion options: Select the deletion option according to your ingestion preferences.
- Maximum File Age: Includes files modified in the last number of days. Default is 180 days.
- Shared key: The shared key (a 512-bit random string in base-64 encoding) used to access Azure resources.
 Advanced options - Feed Name: A prepopulated value that identifies the feed.
- Asset Namespace: Namespace associated with the feed .
- Ingestion Labels: Labels applied to all events from this feed.
 
-  Click Create feed. 
For more information about configuring multiple feeds for different log types within this product family, see Configure feeds by product .
UDM Mapping Table
| Log Field | UDM Mapping | Logic | 
|---|---|---|
| Category | metadata.product_event_type | Directly mapped from the Categoryfield. | 
| ClientOperationId | additional.fields[].key:"ClientOperationId", value.string_value | Directly mapped from the ClientOperationIdfield. | 
| CorrelationRequestId | additional.fields[].key:"CorrelationRequestId", value.string_value | Directly mapped from the CorrelationRequestIdfield. | 
| GatewayManagerVersion | additional.fields[].key:"GatewayManagerVersion", value.string_value | Directly mapped from the GatewayManagerVersionfield. | 
| category | metadata.product_event_type | Directly mapped from the categoryfield. | 
| level | security_result.severity | Directly mapped from the levelfield, converted to uppercase. If the value is "WARNING", the severity is set to "HIGH" andsecurity_result.severity_detailsis set to the original value. | 
| properties.clientIP | principal.ip,principal.asset.ip | Directly mapped from the properties.clientIPfield. | 
| properties.clientPort | principal.port | Directly mapped from the properties.clientPortfield, converted to an integer. | 
| properties.clientResponseTime | additional.fields[].key:"clientResponseTime", value.string_value | Directly mapped from the properties.clientResponseTimefield. | 
| properties.configuration.BgpConfiguration.GatewayConfig.Asn | security_result.detection_fields[].key:"ASN", value | Directly mapped from the properties.configuration.BgpConfiguration.GatewayConfig.Asnfield whenoperationNameis "SetGatewayConfiguration". | 
| properties.configuration.BgpConfiguration.GatewayConfig.PeerAddress | target.ip,target.asset.ip | Directly mapped from the properties.configuration.BgpConfiguration.GatewayConfig.PeerAddressfield whenoperationNameis "SetGatewayConfiguration". | 
| properties.configuration.BgpConfiguration.GatewayConfig.PeerType | security_result.detection_fields[].key:"PeerType", value | Directly mapped from the properties.configuration.BgpConfiguration.GatewayConfig.PeerTypefield whenoperationNameis "SetGatewayConfiguration". | 
| properties.configuration.IkeVersion | principal.resource.attribute.labels[].key:"ike_version", value | Directly mapped from the properties.configuration.IkeVersionfield whenoperationNameis "SetConnectionConfiguration". | 
| properties.configuration.LocalSubnets | principal.resource.attribute.labels[].key:"local subnets", value | Concatenated string of IP addresses from the properties.configuration.LocalSubnetsarray whenoperationNameis "SetConnectionConfiguration". | 
| properties.configuration.LocalTunnelEndpoint | principal.ip,principal.asset.ip | Directly mapped from the properties.configuration.LocalTunnelEndpointfield whenoperationNameis "SetConnectionConfiguration". | 
| properties.configuration.Name | principal.hostname,principal.asset.hostname | Directly mapped from the properties.configuration.Namefield. If empty, the value is taken fromproperties.instance. | 
| properties.configuration.RemoteSite | target.hostname,target.asset.hostname | Directly mapped from the properties.configuration.RemoteSitefield. | 
| properties.configuration.RemoteSubnets | principal.resource.attribute.labels[].key:"remote subnets", value | Concatenated string of IP addresses from the properties.configuration.RemoteSubnetsarray whenoperationNameis "SetConnectionConfiguration". | 
| properties.configuration.RemoteTunnelEndpoint | target.ip,target.asset.ip | Directly mapped from the properties.configuration.RemoteTunnelEndpointfield whenoperationNameis "SetConnectionConfiguration". | 
| properties.configuration.VIPAddress | principal.ip,principal.asset.ip | Directly mapped from the properties.configuration.VIPAddressfield whenoperationNameis "SetGatewayConfiguration". | 
| properties.configuration.VirtualNetworkRanges | principal.resource.attribute.labels[].key:"virutal network ranges", value | Concatenated string of IP addresses from the properties.configuration.VirtualNetworkRangesarray whenoperationNameis "SetGatewayConfiguration". | 
| properties.configuration.VirtualNetworkSubnets | principal.resource.attribute.labels[].key:"virtual network subnets", value | Concatenated string of IP addresses from the properties.configuration.VirtualNetworkSubnetsarray whenoperationNameis "SetGatewayConfiguration". | 
| properties.error_info | additional.fields[].key:"error_info", value.string_value | Directly mapped from the properties.error_infofield. | 
| properties.host | principal.hostname,principal.asset.hostname | Directly mapped from the properties.hostfield ifproperties.originalHostis empty. | 
| properties.httpMethod | network.http.method | Directly mapped from the properties.httpMethodfield. | 
| properties.httpStatus | network.http.response_code | Directly mapped from the properties.httpStatusfield, converted to an integer. | 
| properties.httpVersion | network.application_protocol | Set to "HTTP" if the properties.httpVersionfield contains "HTTP". | 
| properties.instance | principal.hostname,principal.asset.hostname | Used as the value for principal.hostnameifproperties.configuration.Nameis empty. | 
| properties.message | metadata.description | Directly mapped from the properties.messagefield. | 
| properties.operationName | additional.fields[].key:"operationName", value.string_value | Directly mapped from the properties.operationNamefield. | 
| properties.operationStatus | security_result.category_details | Directly mapped from the properties.operationStatusfield. If the value is "Success" or "InProgress",security_result.actionis set to "ALLOW". | 
| properties.originalHost | principal.hostname,principal.asset.hostname | Directly mapped from the properties.originalHostfield. | 
| properties.originalRequestUriWithArgs | additional.fields[].key:"originalRequestUriWithArgs", value.string_value | Directly mapped from the properties.originalRequestUriWithArgsfield. | 
| properties.receivedBytes | network.received_bytes | Directly mapped from the properties.receivedBytesfield, converted to an unsigned integer. | 
| properties.requestQuery | additional.fields[].key:"requestQuery", value.string_value | Directly mapped from the properties.requestQueryfield. | 
| properties.requestUri | target.url | Directly mapped from the properties.requestUrifield. | 
| properties.sentBytes | network.sent_bytes | Directly mapped from the properties.sentBytesfield, converted to an unsigned integer. | 
| properties.serverResponseLatency | additional.fields[].key:"Server Response Latency", value.string_value | Directly mapped from the properties.serverResponseLatencyfield. | 
| properties.serverRouted | target.ip,target.asset.ip,target.port | The IP and port are extracted from the properties.serverRoutedfield using a regular expression. | 
| properties.sslCipher | network.tls.cipher | Directly mapped from the properties.sslCipherfield. | 
| properties.sslClientCertificateIssuerName | network.tls.server.certificate.issuer | Directly mapped from the properties.sslClientCertificateIssuerNamefield. | 
| properties.sslProtocol | network.tls.version | Directly mapped from the properties.sslProtocolfield. | 
| properties.timeTaken | additional.fields[].key:"timeTaken", value.string_value | Directly mapped from the properties.timeTakenfield. | 
| properties.transactionId | network.session_id | Directly mapped from the properties.transactionIdfield. | 
| properties.userAgent | network.http.user_agent,network.http.parsed_user_agent | Directly mapped from the properties.userAgentfield. Also, the field is converted to a parsed user agent and mapped tonetwork.http.parsed_user_agent. | 
| properties.WAFEvaluationTime | additional.fields[].key:"WAFEvaluationTime", value.string_value | Directly mapped from the properties.WAFEvaluationTimefield. | 
| properties.WAFMode | additional.fields[].key:"WAFMode", value.string_value | Directly mapped from the properties.WAFModefield. | 
| resourceId | target.resource.id | Directly mapped from the resourceIdfield. | 
| resourceid | target.resource.product_object_id | Directly mapped from the resourceidfield. | 
| ruleName | security_result.rule_name | Directly mapped from the ruleNamefield. | 
| time/timeStamp | metadata.event_timestamp,timestamp | Parsed as a timestamp using RFC 3339 or ISO8601 format. timeStampis preferred, buttimeis used iftimeStampis not present. | 
|   
(Parser Logic) | metadata.event_type | Set to "NETWORK_CONNECTION" if both principal and target are present, "STATUS_UPDATE" if only principal is present, and "GENERIC_EVENT" otherwise. | 
|   
(Parser Logic) | metadata.product_name | Set to "Azure Gateway". | 
|   
(Parser Logic) | metadata.vendor_name | Set to "Microsoft". | 
|   
(Parser Logic) | has_principal | A boolean flag, set to "true" if any principal information (hostname, IP, or port) is extracted, and "false" otherwise. | 
|   
(Parser Logic) | has_target | A boolean flag, set to "true" if any target information (hostname, IP, port, resource ID, or URL) is extracted, and "false" otherwise. | 
|   
(Parser Logic) | disambiguation_key | Added when multiple events are extracted from a single log entry. | 

