Collect Salesforce logs
This document explains how to ingest Salesforce logs to Google Security Operations using two methods: Amazon AppFlow with Amazon S3or Third Party API. The parser handles the logs in LEEF, CSV, and JSON formats. It extracts fields, performs format-specific processing (handling LEEF key-value pairs, CSV columns, and JSON structures), maps them to the UDM, and enriches the data with metadata and derived fields. The parser also handles various Salesforce event types, applying specific logic for logins, logouts, and other actions, categorizing events, and setting appropriate UDM event types.
Before you begin
Make sure you have the following prerequisites:
- A Google SecOps instance
- Privileged access to Salesforce (System Administrator or equivalent)
Option 1: Third Party API method
- A Salesforce Shield Event Monitoringlicense or Event Monitoring add-on
- Ability to generate and manage X.509 certificates and RSA key pairs
Option 2: Amazon AppFlow with S3 method
- Privileged access to AWS
- Your organization uses Salesforce Enterprise, Unlimited, or Performance Edition
Important Licensing Note: Without Salesforce Shield Event Monitoring, API access to EventLogFile is limited to only 7 basic event types (Login, Logout, API Total Usage, CORS Violation Record, CSP Violation, Hostname Redirects, Apex Unexpected Exception) with 1-day retention. Most organizations without Shield should use the Amazon AppFlow method (Option 2).
Option 1: Configure Salesforce Direct API Integration using Third Party API (OAuth JWT Bearer)
This method establishes a direct API connection from Google SecOps to Salesforce using OAuth 2.0 JWT Bearer flow for server-to-server authentication.
Prerequisites for This Method:
- A Salesforce Shield Event Monitoringlicense or Event Monitoring add-on (required for comprehensive EventLogFile access)
- System Administrator access in Salesforce
- Ability to generate and manage X.509 certificates and RSA key pairs
Generate RSA Key Pair and X.509 certificate
You need an RSA private key and corresponding X.509 certificate for JWT bearer authentication.
-  Generate an RSA private key: openssl genrsa -out salesforce_jwt_private.key 2048
-  Generate a certificate signing request (CSR): openssl req -new -key salesforce_jwt_private.key -out salesforce_jwt.csr
-  Generate a self-signed certificate (valid for 1 year): openssl x509 -req -days 365 -in salesforce_jwt.csr -signkey salesforce_jwt_private.key -out salesforce_jwt.crt
-  Save the private key securely. You will need it for the Google SecOps feed configuration. 
Create a Salesforce Connected App with JWT Bearer Flow
- Sign in to Salesforceas a System Administrator.
- Go to Setup > Apps > App Manager.
- Click New Connected App.
- Provide the following configuration details: -  Connected App Name: Enter a name (for example, Google Security Operations Integration).
- API Name: Auto-populated based on the Connected App Name.
- Contact Email: Enter your email address.
 
-  Connected App Name: Enter a name (for example, 
- In the API (Enable OAuth Settings)section: - Select Enable OAuth Settings.
-  Callback URL: Enter https://login.salesforce.com/services/oauth2/callback(this is not used for JWT flow but is required).
- Select Use digital signatures.
- Click Choose Fileand upload the X.509 certificate ( salesforce_jwt.crt) you generated earlier.
-  Selected OAuth Scopes: Add the following scopes: - Access and manage your data (api)
- Perform requests on your behalf at any time (refresh_token, offline_access)
 
- Require Proof Key for Code Exchange (PKCE) Extension for Supported Authorization Flows: Clear this option.
 
- Click Save.
- Click Continueon the warning message.
- On the Connected App detail page, note the Consumer Key. This will be used as the JWT Claims Issuerin Google SecOps.
- Click Manage > Edit Policies.
- In the OAuth Policiessection: - Permitted Users: Select Admin approved users are pre-authorized.
- IP Relaxation: Select Relax IP restrictions.
 
- Click Save.
Create and configure an Integration User in Salesforce
- Go to Setup > Users > Users.
- Click New User.
- Provide the following configuration details: -  First Name: Enter Google.
-  Last Name: Enter Google SecOps Integration.
- Email: Enter an email address.
- Username: Enter a unique username.
- User License: Select Salesforce.
- Profile: Select System Administratoror create a custom profile with API access.
 
-  First Name: Enter 
- Click Save.
- Note the Usernameexactly as entered. This will be used as the JWT Claims Subjectin Google SecOps.
Assign the Integration User to the Connected App
- Go to Setup > Apps > Connected Apps > Manage Connected Apps.
- Click the Google Security Operations IntegrationConnected App you created.
- Click Manage > Manage Profilesor Manage Permission Sets.
- Select the profile or permission set assigned to your integration user (for example, System Administrator).
- Click Save.
Grant API and Event Monitoring Permissions to the Integration User
- Go to Setup > Users > Permission Sets.
- Click New.
- Provide the following configuration details: -  Label: Enter Event Monitoring API Access.
- API Name: Auto-populated.
 
-  Label: Enter 
- Click Save.
- On the Permission Set detail page: - Click System Permissions.
- Click Edit.
- Check the following permissions: - API Enabled
- View Event Log Files
- View All Data(optional, but recommended for comprehensive access)
 
- Click Save.
 
- Click Manage Assignments > Add Assignments.
- Select the integration user you created earlier.
- Click Assign > Done.
Configure a feed in Google SecOps to ingest Salesforce logs via API
- Go to SIEM Settings > Feeds.
- Click + Add New Feed.
- On the next page, click Configure a single feed.
- In the Feed namefield, enter a name for the feed (for example, Salesforce logs).
- Select Third party APIas the Source type.
- Select Salesforceas the Log type.
- Click Next.
- Select OAuth JWT grantfrom the drop-down.
- Specify values for the following input parameters: -  OAuth JWT Endpoint: Enter the Salesforce OAuth token endpoint: -  Production: https://login.salesforce.com/services/oauth2/token
-  Sandbox: https://test.salesforce.com/services/oauth2/token
-  Custom Domain: https://yourdomain.my.salesforce.com/services/oauth2/token
 
-  Production: 
- JWT Claims Issuer: Enter the Consumer Keyfrom the Connected App.
- JWT Claims Subject: Enter the Usernameof the integration user.
-  JWT Claims Audience: Enter the Salesforce login base URL: -  Production: https://login.salesforce.com
-  Sandbox: https://test.salesforce.com
 
-  Production: 
-  RSA Private Key: Paste the entire contents of your RSA private key ( salesforce_jwt_private.key), including the-----BEGIN PRIVATE KEY-----and-----END PRIVATE KEY-----lines.
 
-  OAuth JWT Endpoint: Enter the Salesforce OAuth token endpoint: 
- Specify additional parameters: - Asset namespace: The asset namespace .
- Ingestion labels: The label to be applied to the events from this feed.
 
- Click Next.
- Review your new feed configuration in the Finalizescreen, and then click Submit.
Option 2: Configure Salesforce Logs export using Amazon AppFlow and S3
This method uses Amazon AppFlow to extract data from Salesforce and store it in Amazon S3, which Google SecOps then ingests.
Configure AWS S3 bucket and IAM for Google SecOps
- Create Amazon S3 bucketfollowing this user guide: Creating a bucket
- Save bucket Nameand Regionfor future reference (for example, salesforce-secops-logs).
- Create a Userfollowing this user guide: Creating an IAM user .
- Select the created User.
- Select Security credentialstab.
- Click Create Access Keyin section Access Keys.
- Select Third-party serviceas Use case.
- Click Next.
- Optional: Add a description tag.
- Click Create access key.
- Click Download CSV fileto save the Access Keyand Secret Access Keyfor future reference.
- Click Done.
- Select Permissionstab.
- Click Add permissionsin section Permissions policies.
- Select Add permissions.
- Select Attach policies directly.
- Search for AmazonS3FullAccesspolicy.
- Select the policy.
- Click Next.
- Click Add permissions.
Configure Amazon AppFlow
- Open the Amazon AppFlow console.
- Click Create flow.
- Provide the following configuration details: -  Flow name: Enter a name (for example, Salesforce-to-S3-SecOps).
- Flow description: Optional description.
 
-  Flow name: Enter a name (for example, 
- Click Next.
- For Source details: - Source name: Select Salesforce.
- Choose Salesforce connection: Click Create new connection.
- A Salesforce sign-in window appears. Sign in with your Salesforce credentials.
- Grant access when prompted.
- Salesforce object: Select the object you want to transfer (for example, EventLogFileif you have Event Monitoring, or other audit objects).
 
- Click Next.
- For Destination details: - Destination name: Select Amazon S3.
- Bucket details: Select the S3 bucket you created earlier.
-  S3 bucket prefix: Optional prefix (for example, salesforce-logs/).
 
- Click Next.
- For Flow trigger: - Select Run on schedule.
- Starting at: Set your preferred start time.
- Repeats: Select Hourlyor Dailybased on your requirements.
 
- Click Next.
- For Map data fields: - Select Map all fields directlyor you can specify which fields to map.
- If mapping manually, select the fields you want to transfer.
 
- Click Next.
- For Add filters(optional): - Add any filters to limit the data transferred.
 
- Click Next.
- Review your configuration and click Create flow.
- Click Activate flowto start the scheduled transfers.
Configure a feed in Google SecOps to ingest Salesforce logs
- Go to SIEM Settings > Feeds.
- Click Add New Feed.
- On the next page, click Configure a single feed.
- In the Feed namefield, enter a name for the feed; for example, Salesforce Logs.
- Select Amazon S3 V2as the Source type.
- Select Salesforceas the Log type.
- Click Next.
-  Specify values for the following input parameters: -  S3 URI: The bucket URI. s3://BUCKET_NAMEReplace the following:- BUCKET_NAME: The name of the bucket.
 
-  Source deletion options: Select the deletion option according to your preference. 
-  Maximum File Age: Includes files modified in the last number of days. Default is 180 days. 
-  Access Key ID: The User access key with access to the s3 bucket. 
-  Secret Access Key: The User secret key with access to the s3 bucket. 
 
-  S3 URI: The bucket URI. 
-  Click Next. 
-  Review your new feed configuration in the Finalizescreen, and then click Submit. 
UDM Mapping Table
| Log Field | UDM Mapping | Logic | 
|---|---|---|
| Account.Name | target.resource.name | The value of Account.Namefrom the raw log. | 
| AccountId | target.resource.id | The value of AccountIdfrom the raw log. | 
| Action | security_result.description | The value of Actionfrom the raw log. | 
| AdditionalInfo | - | Not mapped to the IDM object. | 
| ApiType | target.application | The value of ApiTypefrom the raw log. | 
| ApiVersion | - | Not mapped to the IDM object. | 
| Application | principal.application | The value of Applicationfrom the raw log, or "Browser" for LoginAsEvent, or "Integration JWT Token" for LoginEvent, or "SfdcSiqActivityPlatform" for LoginHistory with objecttype LoginHistory, or "N/A" for ApiEvent, or "Browser" for LoginAsEventStream. | 
| attributes.url | target.url | The value of attributes.urlfrom the raw log, or specific URLs for various event types from the raw log. | 
| attributes.type | metadata.product_event_type | The value of attributes.typefrom the raw log. | 
| AuthSessionId | network.session_id | The value of AuthSessionIdfrom the raw log. | 
| Browser | principal.resource.name | The value of Browserfrom the raw log, or "Unknown" ifBrowseris not available in raw log andApplicationis "Insights", or "Java (Salesforce.com)" for LoginHistory withApiTypeas "SOAP Partner", or "Unknown" for LoginHistory withApplicationas "SfdcSiqActivityPlatform", or from data.properties.Browser.str for LoginAsEventStream. | 
| Case.Subject | target.resource.name | The value of Case.Subjectfrom the raw log. | 
| CaseId | target.resource.id | The value of CaseIdfrom the raw log. | 
| cat | metadata.product_event_type | The value of catfrom the raw log. | 
| City | principal.location.city | The value of Cityfrom the raw log, or fromLoginGeo.Cityfor LoginHistory. | 
| Client | principal.labels | The value of Clientfrom the raw log, formatted as a label. | 
| CLIENT_IP | principal.ip,principal.asset.ip | The value of CLIENT_IPfrom the raw log. | 
| ClientVersion | - | Not mapped to the IDM object. | 
| CipherSuite | network.tls.cipher | The value of CipherSuitefrom the raw log. | 
| ColumnHeaders | principal.labels | The value of ColumnHeadersfrom the raw log, formatted as a label. | 
| ConnectedAppId | principal.labels | The value of ConnectedAppIdfrom the raw log, formatted as a label. | 
| Contact.Name | target.resource.name | The value of Contact.Namefrom the raw log. | 
| ContactId | target.resource.id | The value of ContactIdfrom the raw log. | 
| Country | principal.location.country_or_region | The value of Countryfrom the raw log, orLoginGeo.Countryfor LoginHistory. | 
| CreatedByContext | principal.user.userid | The value of CreatedByContextfrom the raw log. | 
| CreatedById | principal.resource.attribute.labels | The value of CreatedByIdfrom the raw log, formatted as a label. | 
| CreatedDate | metadata.collected_timestamp | The value of CreatedDatefrom the raw log, or the current timestamp if not available. | 
| CPU_TIME | target.resource.attribute.labels | The value of CPU_TIMEfrom the raw log, formatted as a label. | 
| data | - | Contains various fields that are extracted and mapped individually. | 
| DATASET_IDS | target.resource.name | The value of DATASET_IDSfrom the raw log. | 
| DelegatedOrganizationId | target.administrative_domain | The value of DelegatedOrganizationIdfrom the raw log. | 
| DelegatedUsername | observer.user.userid | The value of DelegatedUsernamefrom the raw log. | 
| Description | metadata.description | The value of Descriptionfrom the raw log. | 
| DevicePlatform | principal.resource.type | The value of DevicePlatformfrom the raw log, parsed to extract the resource type. | 
| Display | metadata.description | The value of Displayfrom the raw log. | 
| DOWNLOAD_FORMAT | target.resource.attribute.labels | The value of DOWNLOAD_FORMATfrom the raw log, formatted as a label. | 
| Duration | target.resource.attribute.labels | The value of Durationfrom the raw log, formatted as a label. | 
| ENTITY_NAME | target.resource.attribute.labels | The value of ENTITY_NAMEfrom the raw log, formatted as a label. | 
| ErrorCode | security_result.action | The value of ErrorCodefrom the raw log, transformed to ALLOW or BLOCK. | 
| EventDate | timestamp | The value of EventDatefrom the raw log, ordata.properties.TIMESTAMP_DERIVED.strif available, ordata.properties.TIMESTAMP_DERIVED_FIRST.strif available, or@timestampif available, orcreated_dateif available, ortimestampif available, orLoginTimefor LoginHistory. | 
| EventIdentifier | metadata.product_log_id | The value of EventIdentifierfrom the raw log. | 
| EventType | metadata.product_event_type | The value of EventTypefrom the raw log. | 
| Id | principal.user.userid | The value of Idfrom the raw log, ormetadata.product_log_idfor SetupAuditTrail and other events. | 
| IdentityUsed | principal.user.email_addresses | The value of IdentityUsedfrom the raw log. | 
| Lead.Name | target.resource.name | The value of Lead.Namefrom the raw log. | 
| LeadId | target.resource.id | The value of LeadIdfrom the raw log. | 
| LoginAsCategory | - | Not mapped to the IDM object. | 
| LoginGeo.Country | principal.location.country_or_region | The value of LoginGeo.Countryfrom the raw log. | 
| LoginHistoryId | - | Not mapped to the IDM object. | 
| LoginKey | principal.user.userid,network.session_id | The value of LoginKeyfrom the raw log, orCreatedByContextfor SetupAuditTrail. | 
| LoginTime | timestamp | The value of LoginTimefrom the raw log. | 
| LoginType | security_result.description | The value of LoginTypefrom the raw log, or "Other Apex API" for LoginHistory withApiTypeas "SOAP Partner", or "Remote Access 2.0" for LoginHistory withApplicationas "SfdcSiqActivityPlatform". | 
| LoginUrl | target.url,principal.url | The value of LoginUrlfrom the raw log. | 
| LogFile | principal.resource.attribute.labels | The value of LogFilefrom the raw log, formatted as a label. | 
| LogFileContentType | principal.resource.attribute.labels | The value of LogFileContentTypefrom the raw log, formatted as a label. | 
| LogFileLength | principal.resource.attribute.labels | The value of LogFileLengthfrom the raw log, formatted as a label. | 
| Message | - | Not mapped to the IDM object. | 
| METHOD | network.http.method | The value of METHODfrom the raw log. | 
| Name | target.application | The value of Namefrom the raw log. | 
| NewValue | - | Used in conjunction with OldValueto generatesecurity_result.summary. | 
| NUMBER_FIELDS | target.resource.attribute.labels | The value of NUMBER_FIELDSfrom the raw log, formatted as a label. | 
| OldValue | - | Used in conjunction with NewValueto generatesecurity_result.summary. | 
| Operation | security_result.description,target.resource.attribute.labels | The value of Operationfrom the raw log, orDisplayfor SetupAuditTrail. | 
| OperationStatus | security_result.action | The value of OperationStatusfrom the raw log, transformed to ALLOW or BLOCK. | 
| ORGANIZATION_ID | target.administrative_domain | The value of ORGANIZATION_IDfrom the raw log. | 
| OsName | principal.platform | The value of OsNamefrom the raw log. | 
| OsVersion | principal.platform_version | The value of OsVersionfrom the raw log. | 
| Platform | principal.platform | The value of Platformfrom the raw log, or fromdata.properties.OsName.strfor LightningUriEventStream, or fromdata.properties.OsName.strfor LoginEventStream. | 
| QueriedEntities | target.resource.name,principal.labels | The value of QueriedEntitiesfrom the raw log, orcomponent_namefor UriEvent and ApiEvent. | 
| Query | target.process.command_line,principal.labels | The value of Queryfrom the raw log. | 
| RecordId | target.resource.id | The value of RecordIdfrom the raw log. | 
| Records | principal.labels | The value of Recordsfrom the raw log, formatted as a label. | 
| REQUEST_ID | metadata.product_log_id,target.resource.product_object_id | The value of REQUEST_IDfrom the raw log. | 
| REQUEST_SIZE | network.sent_bytes | The value of REQUEST_SIZEfrom the raw log. | 
| REQUEST_STATUS | security_result.summary | The value of REQUEST_STATUSfrom the raw log. | 
| RESPONSE_SIZE | network.received_bytes | The value of RESPONSE_SIZEfrom the raw log. | 
| RowsProcessed | target.resource.attribute.labels | The value of RowsProcessedfrom the raw log, formatted as a label. | 
| RUN_TIME | target.resource.attribute.labels | The value of RUN_TIMEfrom the raw log, formatted as a label. | 
| SamlEntityUrl | - | Not mapped to the IDM object. | 
| SdkAppType | - | Not mapped to the IDM object. | 
| SdkAppVersion | - | Not mapped to the IDM object. | 
| SdkVersion | - | Not mapped to the IDM object. | 
| Section | security_result.summary | The value of Sectionfrom the raw log. | 
| SessionKey | network.session_id | The value of SessionKeyfrom the raw log. | 
| SessionLevel | target.resource.attribute.labels | The value of SessionLevelfrom the raw log, formatted as a label. | 
| SourceIp | principal.ip,principal.asset.ip | The value of SourceIpfrom the raw log. | 
| src | principal.ip,principal.asset.ip | The value of srcfrom the raw log. | 
| SsoType | target.resource.attribute.labels | The value of SsoTypefrom the raw log, formatted as a label. | 
| STATUS_CODE | network.http.response_code | The value of STATUS_CODEfrom the raw log. | 
| Status | security_result.action,security_result.action_details | The value of Statusfrom the raw log, transformed to ALLOW or BLOCK, or used as action details for LoginEventStream. | 
| Subject | target.resource.name | The value of Subjectfrom the raw log. | 
| TargetUrl | - | Not mapped to the IDM object. | 
| TIMESTAMP | metadata.collected_timestamp | The value of TIMESTAMPfrom the raw log. | 
| TIMESTAMP_DERIVED | timestamp | The value of TIMESTAMP_DERIVEDfrom the raw log. | 
| TlsProtocol | network.tls.version_protocol | The value of TlsProtocolfrom the raw log. | 
| URI | target.url | The value of URIfrom the raw log. | 
| USER_AGENT | network.http.user_agent | The value of USER_AGENTfrom the raw log. | 
| USER_ID | principal.user.userid | The value of USER_IDfrom the raw log. | 
| USER_ID_DERIVED | principal.user.product_object_id,target.resource.attribute.labels | The value of USER_ID_DERIVEDfrom the raw log. | 
| UserId | principal.user.userid | The value of UserIdfrom the raw log. | 
| USER_TYPE | target.resource.attribute.labels | The value of USER_TYPEfrom the raw log, formatted as a label. | 
| Username | principal.user.userid,principal.user.email_addresses,target.user.email_addresses | The value of Usernamefrom the raw log, orsrc_emailfor various events, orIdentityUsedfor IdentityProviderEventStore, ordata.properties.Email.strfor Search and SearchAlert, ordata.properties.Username.strfor LoginAsEventStream and LoginEventStream. | 
| UserType | target.resource.attribute.labels | The value of UserTypefrom the raw log, formatted as a label. | 
| usrName | principal.user.userid,principal.user.email_addresses,target.user.email_addresses | The value of usrNamefrom the raw log. | 
| VerificationMethod | target.resource.attribute.labels | The value of VerificationMethodfrom the raw log, formatted as a label. | 
|   
 Parser Logic 
 | metadata.event_type | Derived based on the event_idandoperationfields, or set to "USER_LOGIN" for LoginEventStream, "USER_LOGOUT" for Logout and LogoutEvent, "USER_RESOURCE_UPDATE_CONTENT" for various events, "USER_RESOURCE_UPDATE_PERMISSIONS" for PlatformEncryption, "RESOURCE_READ" for QueuedExecution, ApexExecution, LightningInteraction, LightningPerformance, LightningPageView, URI, RestApi, API, AuraRequest, ApexCallout, OneCommerceUsage, Sites, MetadataApiOperation, OneCommerceUsage, VisualforceRequest, Dashboard, Search, ListViewEvent, "RESOURCE_CREATION" for UriEvent and TimeBasedWorkflow withOperationas "Create" or "INSERT", "RESOURCE_WRITTEN" for UriEvent and LightningUriEvent withOperationas "Update", "RESOURCE_DELETION" for UriEvent withOperationas "Delete" or "ROLLBACK", "USER_UNCATEGORIZED" for SetupAuditTrail and AuditTrail, "USER_CHANGE_PASSWORD" for SetupAuditTrail withoperationas "namedCredentialEncryptedFieldChange", "GENERIC_EVENT" for ApiEventStream and LightningUriEventStream, or based on network and principal presence. | 
|   
 Parser Logic 
 | metadata.ingestion_labels | Labels indicating the source of the event, either "Event Log File" or "Real-Time Event Monitoring" or "SetupAuditTrail". | 
|   
 Parser Logic 
 | metadata.log_type | Always set to "SALESFORCE". | 
|   
 Parser Logic 
 | metadata.product_name | Always set to "SALESFORCE". | 
|   
 Parser Logic 
 | metadata.vendor_name | Always set to "SALESFORCE". | 
|   
 Parser Logic 
 | metadata.url_back_to_product | Constructed from various fields like LoginUrl,attributes.url,data.properties.PageUrl.str,data.properties.LoginUrl.str. | 
|   
 Parser Logic 
 | network.application_protocol | Set to "HTTPS" if the urifield starts with "http". | 
|   
 Parser Logic 
 | network.http.referral_url | Extracted from the user_agentfield if it contains "Referer=". | 
|   
 Parser Logic 
 | network.http.response_code | Derived from request_statusfor various events. | 
|   
 Parser Logic 
 | network.http.user_agent | The value of user_agentfrom the raw log, or fromdata.properties.UserAgent.strfor ApiEventStream and LoginEventStream, or fromSitesevents, or "User-Agent" fromSitesevents. | 
|   
 Parser Logic 
 | network.session_id | The value of session_keyorSESSION_KEYfrom the raw log, or constructed from other fields likeLoginKeyorAuthSessionId. | 
|   
 Parser Logic 
 | network.tls.version | The value of tls_protocolfrom the raw log, or fromdata.properties.TlsProtocol.strfor LoginEventStream. | 
|   
 Parser Logic 
 | principal.application | The value of applicationfrom the raw log, or "Salesforce for Outlook" for Login: Success events, or "Insights" for Login: Success events with no Application, or extracted fromdevice_platformfor Lightning events. | 
|   
 Parser Logic 
 | principal.asset.hostname | The value of client_ipif it is a hostname. | 
|   
 Parser Logic 
 | principal.asset.ip | The value of client_iporsrc_iporSourceIporCLIENT_IPif it is an IP address. | 
|   
 Parser Logic 
 | principal.hostname | The value of client_ipif it is a hostname. | 
|   
 Parser Logic 
 | principal.ip | The value of client_iporsrc_iporSourceIporCLIENT_IPif it is an IP address. | 
|   
 Parser Logic 
 | principal.labels | Labels constructed from various fields like FederationIdentifier,ApiType,OrgId,channel. | 
|   
 Parser Logic 
 | principal.location.city | The value of geoip_src.city_nameorCityorLoginGeo.Cityfrom the raw log. | 
|   
 Parser Logic 
 | principal.location.country_or_region | The value of geoip_src.country_nameorCountryorLoginGeo.Countryorclient_geofrom the raw log. | 
|   
 Parser Logic 
 | principal.location.region_latitude | The value of data.properties.LoginLatitude.numberfrom the raw log. | 
|   
 Parser Logic 
 | principal.location.region_longitude | The value of data.properties.LoginLongitude.numberfrom the raw log. | 
|   
 Parser Logic 
 | principal.location.state | The value of geoip_src.region_namefrom the raw log. | 
|   
 Parser Logic 
 | principal.platform | The value of PlatformorOsNameoros_namefrom the raw log, or "WINDOWS" for LoginEventStream withPlatformcontaining "Windows". | 
|   
 Parser Logic 
 | principal.platform_version | The value of OsVersionoros_versionfrom the raw log, or extracted fromPlatformfor LoginEventStream withPlatformcontaining "Windows". | 
|   
 Parser Logic 
 | principal.resource.attribute.labels | Labels constructed from various fields like CreatedById,ApiVersion,LogFile,LogFileContentType,LogFileLength. | 
|   
 Parser Logic 
 | principal.resource.name | The value of Browserorbrowser_namefrom the raw log, or "Java (Salesforce.com)" for LoginHistory withApiTypeas "SOAP Partner". | 
|   
 Parser Logic 
 | principal.resource.type | Extracted from device_platformfor Lightning events, or "Browser" for LoginAsEvent and LoginAsEventStream. | 
|   
 Parser Logic 
 | principal.url | The value of LoginUrlfrom the raw log. | 
|   
 Parser Logic 
 | principal.user.email_addresses | The value of usrNameorUsernameorsrc_emailorIdentityUsedordata.properties.Username.strordata.properties.Email.strfrom the raw log. | 
|   
 Parser Logic 
 | principal.user.product_object_id | The value of attrs.USER_ID_DERIVEDordata.properties.USER_ID_DERIVED.strfrom the raw log. | 
|   
 Parser Logic 
 | principal.user.userid | The value of usrNameorUsernameoruser_idorUserIdorUSER_IDorIdorLoginKeyorCreatedByContextordata.properties.Username.strordata.properties.USER_ID.strordata.properties.LoginKey.strfrom the raw log. | 
|   
 Parser Logic 
 | security_result.action | Derived from StatusorOperationStatusorErrorCodeoractionoroperation_statusfrom the raw log, transformed to ALLOW or BLOCK. | 
|   
 Parser Logic 
 | security_result.action_details | The value of Statusfrom the raw log for LoginEventStream. | 
|   
 Parser Logic 
 | security_result.description | The value of LoginTypeorlogintypeorOperationorActionorDisplayfrom the raw log. | 
|   
 Parser Logic 
 | security_result.rule_name | The value of Policyorrule_namefrom the raw log. | 
|   
 Parser Logic 
 | security_result.summary | Constructed from NewValueandOldValueorREQUEST_STATUSorSectionorforecastcategoryfrom the raw log. | 
|   
 Parser Logic 
 | target.administrative_domain | The value of ORGANIZATION_IDorDelegatedOrganizationIdororganization_idordata.properties.OrgName.strfrom the raw log. | 
|   
 Parser Logic 
 | target.application | The value of Applicationorapp_nameorApiTypeorNameordata.properties.Application.strfrom the raw log. | 
|   
 Parser Logic 
 | target.asset.hostname | The value of target_hostnameextracted from theurifield. | 
|   
 Parser Logic 
 | target.asset.ip | The value of data.properties.CLIENT_IP.strfrom the raw log. | 
|   
 Parser Logic 
 | target.asset_id | Constructed from device_idorREQUEST_ID. | 
|   
 Parser Logic 
 | target.file.mime_type | The value of file_typefrom the raw log. | 
|   
 Parser Logic 
 | target.file.size | The value of size_bytesfrom the raw log. | 
|   
 Parser Logic 
 | target.hostname | The value of target_hostnameextracted from theurifield. | 
|   
 Parser Logic 
 | target.process.command_line | The value of query_execorQueryordata.properties.Query.strfrom the raw log. | 
|   
 Parser Logic 
 | target.process.pid | The value of job_idfrom the raw log. | 
|   
 Parser Logic 
 | target.resource.attribute.labels | Labels constructed from various fields like CPU_TIME,RUN_TIME,USER_TYPE,DB_TOTAL_TIME,MEDIA_TYPE,ROWS_PROCESSED,NUMBER_FIELDS,DB_BLOCKS,DB_CPU_TIME,ENTITY_NAME,EXCEPTION_MESSAGE,USER_ID_DERIVED,DOWNLOAD_FORMAT,USER_TYPE,CPU_TIME,RUN_TIME,WAVE_SESSION_ID,SessionLevel,verification_method,cpu_time,run_time,db_total_time,db_cpu_time,exec_time,callout_time,number_soql_queries,duration,user_type,entry_point,operation,session_level,rows_processed,sso_type,dashboard_type,Operation,SessionLevel. | 
|   
 Parser Logic 
 | target.resource.id | The value of REQUEST_IDorRecordIdorcaseidorleadidorcontactidoropportunityidoraccountidfrom the raw log. | 
|   
 Parser Logic 
 | target.resource.name | The value of QueriedEntitiesorresource_nameorcomponent_nameorDATASET_IDSorfieldorStageNameorSubjectfrom the raw log. | 
|   
 Parser Logic 
 | target.resource.product_object_id | The value of REQUEST_IDfrom the raw log. | 
|   
 Parser Logic 
 | target.resource.resource_type | Set to "ACCESS_POLICY" for ApexCallout and PlatformEncryption, or "DATABASE" for ApexTrigger, or "FILE" for ContentTransfer, or "TABLE" for ApiEvent. | 
|   
 Parser Logic 
 | target.resource.type | Set to "BATCH" for QueuedExecution and ApexExecution, or "FILE" for ContentTransfer, or "DATABASE_TRIGGER" for ApexTrigger, or "Case", "Lead", "Contact", "Opportunity", "Account" based on the presence of corresponding ID fields. | 
|   
 Parser Logic 
 | target.url | The value of LoginUrlorURIorattributes.urlorlogin_urlorurifrom the raw log. | 
|   
 Parser Logic 
 | target.user.email_addresses | The value of Usernameorattrs.usrNameoremail_addressfrom the raw log. | 
|   
 Parser Logic 
 | target.user.user_display_name | The value of target_user_display_nameoruser_nameorusernamefrom the raw log. | 
|   
 Parser Logic 
 | target.user.userid | The value of target_user_nameordata.properties.UserId.strordata.properties.CreatedById.strfrom the raw log. | 
|   
 Parser Logic 
 | extensions.auth.auth_details | Set to "ACTIVE" if Statusis not "Success", otherwise set to "UNKNOWN_AUTHENTICATION_STATUS". | 
|   
 Parser Logic 
 | extensions.auth.mechanism | Set to "REMOTE" for Login: Success and Login events with logintypecontaining "Remote", or "USERNAME_PASSWORD" for LoginEventStream, or "MECHANISM_OTHER" for events withlogin_urlpresent, or "AUTHTYPE_UNSPECIFIED" for Login: Success and Logout events. | 
|   
 Parser Logic 
 | extensions.auth.type | Set to "SSO" for Login, Logout, LogoutEvent, LoginAs, IdentityProviderEventStore, LoginHistory, LoginAsEvent with LoginType as "SAML Sfdc Initiated SSO", or "AUTHTYPE_UNSPECIFIED" for Login: Success, Logout, LoginAsEvent with LoginType as "Application". | 
Need more help? Get answers from Community members and Google SecOps professionals.

