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

Add AWSServices discard_regex integration tests #4278

Merged
merged 4 commits into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Release report: TBD

### Added

- Add new test cases for the `discard_regex` functionality of `CloudWatchLogs` and `Inspector` services. ([#4278](https://github.com/wazuh/wazuh-qa/pull/4278)) \- (Tests)
- Add Windows location wildcards tests ([#4263](https://github.com/wazuh/wazuh-qa/pull/4263)) \- (Tests + Framework)
- New 'SCA' test suite and framework. ([#3566](https://github.com/wazuh/wazuh-qa/pull/3566)) \- (Framework + Tests)
- Add integration tests for AWS module. ([#3911](https://github.com/wazuh/wazuh-qa/pull/3911)) \- (Framework + Tests + Documentation)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
- sections:
- section: wodle
attributes:
- name: aws-s3
elements:
- disabled:
value: 'no'
- service:
attributes:
- type: SERVICE_TYPE
elements:
- aws_profile:
value: qa
- aws_log_groups:
value: LOG_GROUP_NAME
- only_logs_after:
value: ONLY_LOGS_AFTER
- regions:
value: REGIONS
- discard_regex:
attributes:
- field: DISCARD_FIELD
value: DISCARD_REGEX
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
- sections:
- section: wodle
attributes:
- name: aws-s3
elements:
- disabled:
value: 'no'
- service:
attributes:
- type: SERVICE_TYPE
elements:
- aws_profile:
value: qa
- aws_log_groups:
value: LOG_GROUP_NAME
- only_logs_after:
value: ONLY_LOGS_AFTER
- regions:
value: REGIONS
- discard_regex:
value: DISCARD_REGEX
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
- sections:
- section: wodle
attributes:
- name: aws-s3
elements:
- disabled:
value: 'no'
- service:
attributes:
- type: SERVICE_TYPE
elements:
- aws_profile:
value: qa
- only_logs_after:
value: ONLY_LOGS_AFTER
- regions:
value: REGIONS
- discard_regex:
attributes:
- field: DISCARD_FIELD
value: DISCARD_REGEX
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
- name: cloudwatch_discard_regex_json
description: >
CloudWatch configuration for an event being discarded when the regex matches
the content in the specified field inside the incoming JSON log
configuration_parameters:
SERVICE_TYPE: cloudwatchlogs
LOG_GROUP_NAME: wazuh-cloudwatchlogs-integration-tests
REGIONS: us-east-1
DISCARD_FIELD: networkInterfaces.networkInterfaceId
DISCARD_REGEX: .*eni-networkInterfaceId*
ONLY_LOGS_AFTER: 2023-JUL-03
metadata:
service_type: cloudwatchlogs
log_group_name: wazuh-cloudwatchlogs-integration-tests
only_logs_after: 2023-JUL-03
discard_field: networkInterfaces.networkInterfaceId
discard_regex: .*eni-networkInterfaceId.*
regions: us-east-1
found_logs: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
- name: cloudwatch_discard_regex_simple_text
description: >
CloudWatch configuration for an event being discarded when the regex matches
the content inside the incoming simple text log
configuration_parameters:
SERVICE_TYPE: cloudwatchlogs
LOG_GROUP_NAME: wazuh-cloudwatchlogs-integration-tests
REGIONS: us-east-1
DISCARD_REGEX: .*Test.*
ONLY_LOGS_AFTER: 2023-JAN-12
metadata:
service_type: cloudwatchlogs
log_group_name: wazuh-cloudwatchlogs-integration-tests
only_logs_after: 2023-JAN-12
discard_regex: .*Test.*
regions: us-east-1
found_logs: 3
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
- name: inspector_discard_regex
description: >
Inspector configuration for an event being discarded when the regex matches
the content in the specified field inside the incoming JSON log
configuration_parameters:
SERVICE_TYPE: inspector
REGIONS: us-east-1
DISCARD_FIELD: assetAttributes.tags.value
DISCARD_REGEX: .*inspector-integration-test.*
ONLY_LOGS_AFTER: 2023-JAN-12
metadata:
service_type: inspector
only_logs_after: 2023-JAN-12
discard_field: assetAttributes.tags.value
discard_regex: .*inspector-integration-test.*
regions: us-east-1
found_logs: 4
Loading