Collect AWS Elastic MapReduce logs
This document explains how to ingest AWS Elastic MapReduce (EMR) logs to Google Security Operations. AWS EMR is a cloud-native big data platform that processes large amounts of data quickly. Integrating EMR logs into Google SecOps lets you analyze cluster activity and detect potential security threats.
Before you begin
Ensure you have the following prerequisites:
- Google SecOps instance
- Privileged access to AWS
Configure Amazon S3 bucket
- Create an Amazon S3 bucketfollowing this user guide: Creating a bucket
- Save the bucket Nameand Regionfor later use.
- Create a user following this user guide: Creating an IAM user .
- Select the created User.
- Select the Security credentialstab.
- Click Create Access Keyin the Access Keyssection.
- Select Third-party serviceas the Use case.
- Click Next.
- Optional: add a description tag.
- Click Create access key.
- Click Download CSV fileto save the Access Keyand Secret Access Keyfor later use.
- Click Done.
- Select the Permissionstab.
- Click Add permissionsin the Permissions policiessection.
- Select Add permissions.
- Select Attach policies directly.
- Search for and select AmazonS3FullAccessand CloudWatchLogsFullAccesspolicies.
- Click Next.
- Click Add permissions.
How to configure AWS EMR to forward Logs
- Sign in to the AWS Management Console .
- In the search bar, type EMRand select Amazon EMRfrom the services list.
- Click Clusters.
- Find and select the EMR clusterfor which you want to enable logging.
- Click Editon the Cluster detailspage.
- In the Edit Clusterscreen, go to the Loggingsection.
- Select Enablelogging.
- Specify the S3 bucketwhere logs will be stored.
- Specify the S3 URIin the format s3://your-bucket-name/(this will store all EMR logs in the root of the bucket).
- Select the following log types: -  Step logs
-  Application logs
-  YARN logs
-  System logs
-  HDFS Logs(if you are using Hadoop)
 
-  
- Click Save.
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 AWS EMR feed
- Click the Amazon Cloud Platformpack.
- Locate the AWS EMRlog type.
-  Specify the values in the following fields. - Source Type: Amazon SQS V2
- Queue Name: The SQS queue name to read from
-  S3 URI: The bucket URI. -  s3://your-log-bucket-name/- Replace your-log-bucket-namewith the actual name of your S3 bucket.
 
- Replace 
 
-  
-  Source deletion options: Select the deletion option according to your ingestion preferences. 
-  Maximum File Age: Include files modified in the last number of days. Default is 180 days. 
-  SQS Queue Access Key ID: An account access key that is a 20-character alphanumeric string. 
-  SQS Queue Secret Access Key: An account access key that is a 40-character alphanumeric string. 
 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 | 
|---|---|---|
| app_id | additional.fields[].key | The value "APP" is assigned via parser | 
| app_id | additional.fields[].value.string_value | Directly mapped from the APPfield in the raw log. | 
| app_name | additional.fields[].key | The value "APPNAME" is assigned via parser | 
| app_name | additional.fields[].value.string_value | Directly mapped from the APPNAMEfield in the raw log. | 
| blockid | additional.fields[].key | The value "blockid" is assigned via parser | 
| blockid | additional.fields[].value.string_value | Directly mapped from the blockidfield in the raw log. | 
| bytes | network.received_bytes | Directly mapped from the bytesfield in the raw log, converted to an unsigned integer. | 
| cliID | additional.fields[].key | The value "cliID" is assigned via parser | 
| cliID | additional.fields[].value.string_value | Directly mapped from the cliIDfield in the raw log. | 
| cmd | target.process.command_line | Directly mapped from the cmdfield in the raw log. | 
| comp_name | additional.fields[].key | The value "COMP" is assigned via parser | 
| comp_name | additional.fields[].value.string_value | Directly mapped from the COMPfield in the raw log. | 
| configuration_version | additional.fields[].key | The value "configuration_version" is assigned via parser | 
| configuration_version | additional.fields[].value.string_value | Directly mapped from the configuration_versionfield in the raw log, converted to a string. | 
| containerID | additional.fields[].key | The value "containerID" is assigned via parser | 
| containerID | additional.fields[].value.string_value | Directly mapped from the CONTAINERIDfield in the raw log. | 
| description | security_result.description | Directly mapped from the descriptionfield in the raw log. | 
| dfs.FSNamesystem.* | additional.fields[].key | Key is generated by concatenating "dfs.FSNamesystem." with the key from the JSON data. | 
| dfs.FSNamesystem.* | additional.fields[].value.string_value | Value is directly mapped from the corresponding value in the dfs.FSNamesystemJSON object, converted to a string. | 
| duration | additional.fields[].key | The value "duration" is assigned via parser | 
| duration | additional.fields[].value.string_value | Directly mapped from the durationfield in the raw log. | 
| duration | network.session_duration.seconds | Directly mapped from the durationfield in the raw log, converted to an integer. | 
| environment | additional.fields[].key | The value "environment" is assigned via parser | 
| environment | additional.fields[].value.string_value | Directly mapped from the environmentfield in the raw log. Extracted from theip_portfield using grok and string manipulation. Extracted from theip_portfield using grok and string manipulation, converted to an integer. | 
| event_type | metadata.event_type | Determined by parser logic based on the presence of principalandtargetinformation. Can beNETWORK_CONNECTION,USER_RESOURCE_ACCESS,STATUS_UPDATE, orGENERIC_EVENT. | 
| file_path | target.file.full_path | Directly mapped from the file_pathfield in the raw log. | 
| host | principal.hostname | Directly mapped from the hostfield in the raw log. | 
| host | target.hostname | Directly mapped from the hostfield in the raw log. | 
| host_ip | principal.ip | Directly mapped from the host_ipfield in the raw log. | 
| host_port | principal.port | Directly mapped from the host_portfield in the raw log, converted to an integer. | 
| http_url | target.url | Directly mapped from the http_urlfield in the raw log. | 
| index | additional.fields[].key | The value "index" is assigned via parser | 
| index | additional.fields[].value.string_value | Directly mapped from the indexfield in the raw log. | 
| kind | metadata.product_event_type | Directly mapped from the kindfield in the raw log. The value "AWS_EMR" is assigned via parser The value "AWS EMR" is assigned via parser The value "AMAZON" is assigned via parser | 
| offset | additional.fields[].key | The value "offset" is assigned via parser | 
| offset | additional.fields[].value.string_value | Directly mapped from the offsetfield in the raw log. | 
| op | metadata.product_event_type | Directly mapped from the oporOPERATIONfield in the raw log. | 
| proto | network.application_protocol | Extracted from the http_urlfield using grok, converted to uppercase. | 
| puppet_version | additional.fields[].key | The value "puppet_version" is assigned via parser | 
| puppet_version | additional.fields[].value.string_value | Directly mapped from the puppet_versionfield in the raw log. | 
| queue_name | additional.fields[].key | The value "queue_name" is assigned via parser | 
| queue_name | additional.fields[].value.string_value | Directly mapped from the queue_namefield in the raw log. | 
| report_format | additional.fields[].key | The value "report_format" is assigned via parser | 
| report_format | additional.fields[].value.string_value | Directly mapped from the report_formatfield in the raw log, converted to a string. | 
| resource | additional.fields[].key | The value "resource" is assigned via parser | 
| resource | additional.fields[].value.string_value | Directly mapped from the resourcefield in the raw log. | 
| result | security_result.action_details | Directly mapped from the RESULTfield in the raw log. | 
| security_id | additional.fields[].key | The value "security_id" is assigned via parser | 
| security_id | additional.fields[].value.string_value | Directly mapped from the security_idfield in the raw log. | 
| severity | security_result.severity | Mapped from the severityfield in the raw log.INFOis mapped toINFORMATIONAL,WARNis mapped toMEDIUM. | 
| srvID | additional.fields[].key | The value "srvID" is assigned via parser | 
| srvID | additional.fields[].value.string_value | Directly mapped from the srvIDfield in the raw log. | 
| status | additional.fields[].key | The value "status" is assigned via parser | 
| status | additional.fields[].value.string_value | Directly mapped from the statusfield in the raw log. | 
| summary | security_result.summary | Directly mapped from the summaryfield in the raw log. | 
| target_app | target.application | Directly mapped from the TARGETfield in the raw log. | 
| target_ip | target.ip | Directly mapped from the target_iporIPfield in the raw log. | 
| target_port | target.port | Directly mapped from the target_portfield in the raw log, converted to an integer. | 
| timestamp | metadata.event_timestamp | Directly mapped from the timestampfield in the raw log, parsed as an ISO8601 timestamp. | 
| timestamp | event.timestamp | Directly mapped from the timestampfield in the raw log, parsed as an ISO8601 timestamp. | 
| trade_date | additional.fields[].key | The value "trade_date" is assigned via parser | 
| trade_date | additional.fields[].value.string_value | Directly mapped from the trade_datefield in the raw log. | 
| transaction_uuid | additional.fields[].key | The value "transaction_uuid" is assigned via parser | 
| transaction_uuid | additional.fields[].value.string_value | Directly mapped from the transaction_uuidfield in the raw log. | 
| type | additional.fields[].key | The value "type" is assigned via parser | 
| type | additional.fields[].value.string_value | Directly mapped from the typefield in the raw log. | 
| user | target.user.userid | Directly mapped from the USERorugifield in the raw log. | 
Need more help? Get answers from Community members and Google SecOps professionals.

