Skip to content

Commit

Permalink
feat(#4055): add subscriber defaults parameters and configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
fdalmaup committed Jun 16, 2023
1 parent c62ba12 commit 1602db8
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 8 deletions.
2 changes: 1 addition & 1 deletion tests/integration/test_aws/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ wazuh-qa/deps/wazuh_testing/wazuh_testing/modules/aws

## Requirements

- The only extra dependency is `boto3`
- The extra dependencies are `boto3` and `pyarrow`.
- The module will assume there are already buckets, log groups and an inspector assessment with test data in AWS.

## Configuration settings
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
- sections:
- section: wodle
attributes:
- name: aws-s3
elements:
- disabled:
value: 'no'
- subscriber:
attributes:
- type: SUBSCRIBER_TYPE
elements:
- external_id:
value: wazuh-qa-integration-tests-external-id
- queue:
value: QUEUE
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
- name: security_lake_defaults
description: Security Lake default configurations
configuration_parameters:
SUBSCRIBER_TYPE: security_lake
QUEUE: sqs-security-lake-main-queue
EXTERNAL_ID: wazuh-qa-integration-tests-external-id
metadata:
queue: sqs-security-lake-main-queue
external_id: wazuh-qa-integration-tests-external-id
11 changes: 4 additions & 7 deletions tests/integration/test_aws/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,19 +384,16 @@ def test_service_defaults(
- The `configuration_defaults` file provides the module configuration for this test.
- The `cases_defaults` file provides the test cases.
"""
log_groups = metadata.get('log_group_name')

parameters = [
'wodles/aws/aws-s3',
'--service', metadata['service_type'],
'--aws_profile', 'qa',
'--regions', 'us-east-1',
'--subscriber', 'security_lake',
'--queue', metadata['queue'],
'--iam_role_arn', 'arn:aws:iam::example',
'--external_id', metadata['external_id'],
'--debug', '2'
]

if log_groups is not None:
parameters.insert(7, log_groups)
parameters.insert(7, '--aws_log_groups')

# Check AWS module started
wazuh_log_monitor.start(
Expand Down

0 comments on commit 1602db8

Please sign in to comment.