Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Amazon Security Lake] - OCSF v1.1 update with major refactor & adding support for dynamic template and mappings & system tests #10405

Merged
merged 40 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
66c9372
added support for new user inventory info event class and updated inc…
ShourieG Jun 7, 2024
fb78670
trying to make a working system test
ShourieG Jun 13, 2024
3902a02
merged with upstream
ShourieG Jun 17, 2024
6bec44b
initial working system tests added pending elastic-package changes to…
ShourieG Jun 21, 2024
64f285b
merged with upstream/main
ShourieG Jul 2, 2024
118b2d2
test commit to be reverted
ShourieG Jul 10, 2024
185e2f9
initial working test for dynamic template
ShourieG Jul 12, 2024
f784e75
updated root org templates
ShourieG Jul 12, 2024
4282225
reworked 'org' object mapping as tynamic template for all data streams
ShourieG Jul 12, 2024
e2f8457
Merge branch 'main' into security_lake/ocsf_1.1
ShourieG Jul 23, 2024
d4788f4
Merge remote-tracking branch 'upstream/main' into security_lake/ocsf_1.1
ShourieG Jul 30, 2024
32ed102
segregated process fields in 'findings', added 'actor' fields for new…
ShourieG Jul 30, 2024
78c1ea2
added fulnerability findings support and segregated 'resource' group …
ShourieG Jul 30, 2024
0656284
Merge remote-tracking branch 'upstream/main' into security_lake/ocsf_1.1
ShourieG Jul 30, 2024
8f7122d
added ntp activity event class, deprecated proxy event class, aded pr…
ShourieG Aug 1, 2024
5352aac
added os patch state event class, segregated device fields across all…
ShourieG Aug 2, 2024
ac66e6e
added datastore activity event class, segregated actor, user & metada…
ShourieG Aug 6, 2024
73b7be8
added support for detection finding event class, segregated and mappe…
ShourieG Aug 6, 2024
1236584
added support of compliance finding event class, segregated and updat…
ShourieG Aug 7, 2024
03b5099
segregated and expanded api object across all data streams, added sup…
ShourieG Aug 7, 2024
e99119c
added support for Device Config State Change event class, updated sch…
ShourieG Aug 8, 2024
7e5f687
added support for scan activity event class
ShourieG Aug 8, 2024
516b63b
segregated file fields across required data streams, added support fo…
ShourieG Aug 8, 2024
bf779a5
added cwe & epss objects as flattened to cve object
ShourieG Aug 8, 2024
97459f5
converted feature object to follow dynamic mapping rules across all d…
ShourieG Aug 8, 2024
bb88d57
added firewall rule object to respective event categories
ShourieG Aug 8, 2024
f0fdc32
added some missing fields after locally running system tests for disc…
ShourieG Aug 9, 2024
0b356dc
reworked terrform deployer to support multi-bucket based system tests
ShourieG Aug 9, 2024
19ffbf7
updated docs and changelog
ShourieG Aug 9, 2024
dd90df2
fixed timestamp issues across all data streams, added all system test…
ShourieG Aug 13, 2024
360c3d8
resolved merge conflicts
ShourieG Aug 14, 2024
2b1250d
resolved merge conflicts
ShourieG Aug 19, 2024
2261431
removed system test configs until respective elastic-package changes …
ShourieG Aug 19, 2024
5794401
updated with main, resolved merge conflicts
ShourieG Aug 26, 2024
6e5bc7c
Merge remote-tracking branch 'upstream/main' into security_lake/ocsf_1.1
ShourieG Aug 29, 2024
c204d18
Merge remote-tracking branch 'upstream/main' into security_lake/ocsf_1.1
ShourieG Oct 21, 2024
14bb1a5
updated docs, optimised timestamp conversion logic and changed *.type…
ShourieG Oct 21, 2024
3ec9e28
changed algorithm_id from integer to keyword type mapping
ShourieG Oct 21, 2024
06209ba
updated state_id mappings from integer to keyword
ShourieG Oct 21, 2024
69b2f19
addressed PR comments and updated pipelines, file names and field map…
ShourieG Oct 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@
- name: zone
type: keyword
description: The availability zone in the cloud region, as defined by the cloud provider.
- name: command_uid
type: keyword
description: The command identifier that is associated with this scan event. This ID uniquely identifies the proactive scan command, e.g., if remotely initiated.
- name: count
type: long
description: The number of times that events in the same logical group occurred during the event Start Time to End Time period.
Expand Down Expand Up @@ -331,6 +334,33 @@
- name: message
type: keyword
description: The description of the event, as defined by the event source.
- name: num_detections
type: integer
description: The number of detections.
- name: num_files
type: integer
description: The number of files scanned.
- name: num_folders
type: integer
description: The number of folders scanned.
- name: num_network_items
type: integer
description: The number of network items scanned.
- name: num_processes
type: integer
description: The number of processes scanned.
- name: num_registry_items
type: integer
description: The number of registry items scanned.
- name: num_resolutions
type: integer
description: The number of items that were resolved.
- name: num_skipped_items
type: integer
description: The number of items that were skipped.
- name: num_trusted_items
type: integer
description: The number of trusted items.
- name: observables
type: group
fields:
Expand Down Expand Up @@ -361,6 +391,42 @@
- name: value
type: keyword
description: The value associated with the observable attribute.
- name: policy
type: group
fields:
- name: desc
type: keyword
description: The description of the policy.
- name: group
type: group
fields:
- name: domain
type: keyword
description: The domain where the group is defined. For example, the LDAP or Active Directory domain.
- name: desc
type: keyword
description: The group description.
- name: name
type: keyword
description: The group name.
- name: privileges
type: keyword
description: The group privileges.
- name: type
type: keyword
description: The type of the group or account.
- name: uid
type: keyword
description: The unique identifier of the group. For example, for Windows events this is the security identifier (SID) of the group.
- name: name
type: keyword
description: 'The policy name. For example: IAM Policy.'
- name: uid
type: keyword
description: A unique identifier of the policy instance.
- name: version
type: keyword
description: The policy version number.
- name: proxy
type: group
fields:
Expand Down Expand Up @@ -469,6 +535,25 @@
- name: raw_data
type: flattened
description: The event data as received from the event source.
- name: scan
type: group
description: The Scan object describes characteristics of a proactive scan.
fields:
- name: name
type: keyword
description: The administrator-supplied or application-generated name of the scan.
- name: type
type: keyword
description: The type of scan.
- name: type_id
type: integer
description: The type id of the scan.
- name: uid
type: keyword
description: The application-defined unique identifier assigned to an instance of a scan.
- name: schedule_uid
type: keyword
description: The unique identifier of the schedule associated with a scan job.
- name: severity
type: keyword
description: The event severity, normalized to the caption of the severity_id value. In the case of 'Other', it is defined by the event source.
Expand All @@ -493,6 +578,9 @@
- name: status_id
type: keyword
description: The normalized identifier of the event status.
- name: total
type: integer
description: The total number of items that were scanned; zero if no items were scanned.
- name: time
type: date
description: The normalized event occurrence time.
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ processors:
- set:
field: event.kind
tag: set_event_kind
if: ctx.ocsf?.class_uid != null && ['1001','1002','1003','1004','1005','1006','1007','3001','3002','3003','3005','3006','4001','4002','4003','4004','4005','4006','4007','4008','4009','4010','4011','4012','4013','5001','5002','5003','5004','5019','6001','6002','6003','6004','6005'].contains(ctx.ocsf.class_uid)
if: ctx.ocsf?.class_uid != null && ['1001','1002','1003','1004','1005','1006','1007','3001','3002','3003','3005','3006','4001','4002','4003','4004','4005','4006','4007','4008','4009','4010','4011','4012','4013','5001','5002','5003','5004','5019','6001','6002','6003','6004','6005','6007'].contains(ctx.ocsf.class_uid)
value: event
- set:
field: event.kind
Expand Down Expand Up @@ -136,7 +136,7 @@ processors:
tag: append_info_into_event_type
value: info
allow_duplicates: false
if: ctx.ocsf?.class_uid != null && ['1001','1002','1003','1007','2001', '2002','2003','2004','2005','3001','3002','3003','3005','3006','4001','4002','4003','4004','4005','4006','4007','4008','4009','4010','4011','4012','4013','5001','5002','5003','5004','5019','6002','6003','6004','6005'].contains(ctx.ocsf.class_uid)
if: ctx.ocsf?.class_uid != null && ['1001','1002','1003','1007','2001', '2002','2003','2004','2005','3001','3002','3003','3005','3006','4001','4002','4003','4004','4005','4006','4007','4008','4009','4010','4011','4012','4013','5001','5002','5003','5004','5019','6002','6003','6004','6005','6007'].contains(ctx.ocsf.class_uid)
- append:
field: event.type
tag: append_user_into_event_type
Expand Down Expand Up @@ -178,13 +178,13 @@ processors:
tag: append_start_into_event_type
value: start
allow_duplicates: false
if: ctx.ocsf?.class_uid != null && ['1007','3002','4001','4013','4007','6002'].contains(ctx.ocsf.class_uid) && ['Launch','Logon','Open','Start','Symmetric Active Exchange','Client Synchronization','Broadcast','Control'].contains(ctx.ocsf.activity_name)
if: ctx.ocsf?.class_uid != null && ['1007','3002','4001','4013','4007','6002','6007'].contains(ctx.ocsf.class_uid) && ['Launch','Logon','Open','Start','Started','Symmetric Active Exchange','Client Synchronization','Broadcast','Control'].contains(ctx.ocsf.activity_name)
- append:
field: event.type
tag: append_end_into_event_type
value: end
allow_duplicates: false
if: ctx.ocsf?.class_uid != null && ['1007','2005','3002','4001','4007','4013','6002'].contains(ctx.ocsf.class_uid) && ['Terminate','Logoff','Close','Stop','Symmetric Passive Response','Server Response','Private Use Case','Other'].contains(ctx.ocsf.activity_name)
if: ctx.ocsf?.class_uid != null && ['1007','2005','3002','4001','4007','4013','6002','6007'].contains(ctx.ocsf.class_uid) && ['Terminate','Logoff','Close','Completed','Stop','Symmetric Passive Response','Server Response','Private Use Case','Other'].contains(ctx.ocsf.activity_name)
- append:
field: event.type
tag: append_denied_into_event_type
Expand Down Expand Up @@ -220,7 +220,7 @@ processors:
tag: append_error_into_event_type
value: error
allow_duplicates: false
if: ctx.ocsf?.class_uid != null && ['6004'].contains(ctx.ocsf.class_uid) && ['Access Error'].contains(ctx.ocsf.activity_name)
if: ctx.ocsf?.class_uid != null && ['6004','6007'].contains(ctx.ocsf.class_uid) && ['Access Error','Error'].contains(ctx.ocsf.activity_name)
- set:
field: cloud.account.id
tag: set_cloud_account_uid
Expand Down Expand Up @@ -705,7 +705,7 @@ processors:
ignore_missing: true
- pipeline:
name: '{{ IngestPipeline "pipeline_object_actor" }}'
if: ctx.ocsf?.class_uid != null && ['1001','1002','1003','1004','1005','1006','1007','2002','2003','3001','3002','3003','3004','3005','4001','4002','4003','4004','4005','4006','4007','4008','4009','4010','4011','4012','4013','5001','5002','5003','5019','6001','6002','6003','6004','6005'].contains(ctx.ocsf.class_uid) && ctx.ocsf.actor != null
if: ctx.ocsf?.class_uid != null && ['1001','1002','1003','1004','1005','1006','1007','2002','2003','3001','3002','3003','3004','3005','4001','4002','4003','4004','4005','4006','4007','4008','4009','4010','4011','4012','4013','5001','5002','5003','5019','6001','6002','6003','6004','6005','6007'].contains(ctx.ocsf.class_uid) && ctx.ocsf.actor != null
tag: pipeline_object_actor
ignore_missing_pipeline: true
- pipeline:
Expand All @@ -720,7 +720,7 @@ processors:
ignore_missing_pipeline: true
- pipeline:
name: '{{ IngestPipeline "pipeline_object_device" }}'
if: ctx.ocsf?.class_uid != null && ['1001','1002','1003','1004','1005','1006','1007','2002','2003','3001','3002','3003','3004','3005','4001','4002','4003','4004','4005','4006','4007','4008','4009','4011','4012','4013','5001','5002','5004','5019','6001','6002','6004'].contains(ctx.ocsf.class_uid) && ctx.ocsf.device != null
if: ctx.ocsf?.class_uid != null && ['1001','1002','1003','1004','1005','1006','1007','2002','2003','3001','3002','3003','3004','3005','4001','4002','4003','4004','4005','4006','4007','4008','4009','4011','4012','4013','5001','5002','5004','5019','6001','6002','6004','6007'].contains(ctx.ocsf.class_uid) && ctx.ocsf.device != null
tag: pipeline_object_device
ignore_missing_pipeline: true
- pipeline:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
- name: verdict_id
type: integer
description: The normalized verdict of an Incident.
# These fields are used to store misc information about a discovery category event.
# These fields are used to store misc information about a discovery category event.
- name: prev_security_states
type: group
description: The previous security states of the device.
Expand All @@ -55,3 +55,59 @@
- name: state_id
type: integer
description: The security state of the managed entity.
# These fields are used to store misc information about an application activity category event.
- name: command_uid
type: keyword
description: The command identifier that is associated with this scan event. This ID uniquely identifies the proactive scan command, e.g., if remotely initiated.
- name: num_detections
type: integer
description: The number of detections.
- name: num_files
type: integer
description: The number of files scanned.
- name: num_folders
type: integer
description: The number of folders scanned.
- name: num_network_items
type: integer
description: The number of network items scanned.
- name: num_processes
type: integer
description: The number of processes scanned.
- name: num_registry_items
type: integer
description: The number of registry items scanned.
- name: num_resolutions
type: integer
description: The number of items that were resolved.
- name: num_skipped_items
type: integer
description: The number of items that were skipped.
- name: num_trusted_items
type: integer
description: The number of trusted items.
- name: policy
type: flattened
description: The policy that was used to scan the device.
- name: scan
type: group
description: The Scan object describes characteristics of a proactive scan.
fields:
- name: name
type: keyword
description: The administrator-supplied or application-generated name of the scan.
- name: type
type: keyword
description: The type of scan.
- name: type_id
type: integer
ShourieG marked this conversation as resolved.
Show resolved Hide resolved
description: The type id of the scan.
- name: uid
type: keyword
description: The application-defined unique identifier assigned to an instance of a scan.
- name: schedule_uid
type: keyword
description: The unique identifier of the schedule associated with a scan job.
- name: total
type: integer
description: The total number of items that were scanned; zero if no items were scanned.
17 changes: 17 additions & 0 deletions packages/amazon_security_lake/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,7 @@ This is the `Event` dataset.
| ocsf.codes | The list of return codes to the FTP command. | long |
| ocsf.command | The command name. | keyword |
| ocsf.command_responses | The list of responses to the FTP command. | keyword |
| ocsf.command_uid | The command identifier that is associated with this scan event. This ID uniquely identifies the proactive scan command, e.g., if remotely initiated. | keyword |
| ocsf.comment | The user provided comment about why the entity was changed. | keyword |
| ocsf.compliance.control | A Control is prescriptive, prioritized, and simplified set of best practices that one can use to strengthen their cybersecurity posture. e.g. AWS SecurityHub Controls, CIS Controls. | keyword |
| ocsf.compliance.requirements | A list of requirements associated to a specific control in an industry or regulatory framework. e.g. NIST.800-53.r5 AU-10. | keyword |
Expand Down Expand Up @@ -1642,6 +1643,15 @@ This is the `Event` dataset.
| ocsf.module.type | The module type. | keyword |
| ocsf.name | The name of the data affiliated with the command. | keyword |
| ocsf.nist | The NIST Cybersecurity Framework recommendations for managing the cybersecurity risk. | keyword |
| ocsf.num_detections | The number of detections. | integer |
| ocsf.num_files | The number of files scanned. | integer |
| ocsf.num_folders | The number of folders scanned. | integer |
| ocsf.num_network_items | The number of network items scanned. | integer |
| ocsf.num_processes | The number of processes scanned. | integer |
| ocsf.num_registry_items | The number of registry items scanned. | integer |
| ocsf.num_resolutions | The number of items that were resolved. | integer |
| ocsf.num_skipped_items | The number of items that were skipped. | integer |
| ocsf.num_trusted_items | The number of trusted items. | integer |
| ocsf.observables.name | The full name of the observable attribute. The name is a pointer/reference to an attribute within the event data. For example: file.name. | keyword |
| ocsf.observables.reputation.base_score | The reputation score as reported by the event source. | double |
| ocsf.observables.reputation.provider | The provider of the reputation information. | keyword |
Expand All @@ -1651,6 +1661,7 @@ This is the `Event` dataset.
| ocsf.observables.type_id | The observable value type identifier. | keyword |
| ocsf.observables.value | The value associated with the observable attribute. | keyword |
| ocsf.open_type | Indicates how the file was opened (e.g. normal, delete on close). | keyword |
| ocsf.policy | The policy that was used to scan the device. | flattened |
| ocsf.port | The dynamic port established for impending data transfers. | long |
| ocsf.precision | The NTP precision quantifies a clock's accuracy and stability in log2 seconds, as defined in RFC-5905. | integer |
| ocsf.prev_security_states.state | The security state, normalized to the caption of the state_id value. | keyword |
Expand Down Expand Up @@ -1806,6 +1817,11 @@ This is the `Event` dataset.
| ocsf.risk_level | The risk level, normalized to the caption of the risk_level_id value. In the case of 'Other', it is defined by the event source. | keyword |
| ocsf.risk_level_id | The normalized risk level id. | keyword |
| ocsf.risk_score | The risk score as reported by the event source. | long |
| ocsf.scan.name | The administrator-supplied or application-generated name of the scan. | keyword |
| ocsf.scan.type | The type of scan. | keyword |
| ocsf.scan.type_id | The type id of the scan. | integer |
| ocsf.scan.uid | The application-defined unique identifier assigned to an instance of a scan. | keyword |
| ocsf.schedule_uid | The unique identifier of the schedule associated with a scan job. | keyword |
| ocsf.security_level | The current security level of the entity. | keyword |
| ocsf.security_level_id | The current security level of the entity. | integer |
| ocsf.security_states.state | The security state, normalized to the caption of the state_id value. | keyword |
Expand Down Expand Up @@ -1914,6 +1930,7 @@ This is the `Event` dataset.
| ocsf.tls.server_ciphers | The server cipher suites that were exchanged during the TLS handshake negotiation. | keyword |
| ocsf.tls.sni | The Server Name Indication (SNI) extension sent by the client. | keyword |
| ocsf.tls.version | The TLS protocol version. | keyword |
| ocsf.total | The total number of items that were scanned; zero if no items were scanned. | integer |
| ocsf.traffic.bytes | The total number of bytes (in and out). | long |
| ocsf.traffic.bytes_in | The number of bytes sent from the destination to the source. | long |
| ocsf.traffic.bytes_out | The number of bytes sent from the source to the destination. | long |
Expand Down