-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
CloudTrail in AWS Module does not work when CloudTrail is enabled at Organization Level #23203
Comments
Pinging @elastic/integrations-platforms (Team:Platforms) |
Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
This is similar to #23126 but the format of the path is different. |
The docs at https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html indicate that the format is
so that patterns we have need adapted to handle the optional I was playing with https://regex101.com/r/7WfOYY/2 as a quick test. |
- only match on /CloudTrail/, /CloudTrail-Digest/ and /CloudTrail-Insight/, ignore variable prefix Closes elastic#23203
- only match on /CloudTrail/, /CloudTrail-Digest/ and /CloudTrail-Insight/, ignore variable prefix Closes #23203
- only match on /CloudTrail/, /CloudTrail-Digest/ and /CloudTrail-Insight/, ignore variable prefix Closes elastic#23203 (cherry picked from commit 6935dc6)
- only match on /CloudTrail/, /CloudTrail-Digest/ and /CloudTrail-Insight/, ignore variable prefix Closes elastic#23203 (cherry picked from commit 6935dc6)
Describe the enhancement:
Have the ability to specify a path for the CloudTrail S3 bucket
Describe a specific use case for the enhancement or feature:
If CloudTrail is enabled at the organization level, then the path structure would look like this:
"object.key": "AWSLogs//12345678910/CloudTrail/ap-southeast-2/2020/11/30/12345678910_CloudTrail_ap-southeast-2_20201130T1305Z_QuZ9yKG0lRw5wLmx.json.gz
However, filebeat is expecting different path structure:
"object.key": "AWSLogs/12345678910/CloudTrail/ap-southeast-2/2020/11/30/12345678910_CloudTrail_ap-southeast-2_20201130T1305Z_QuZ9yKG0lRw5wLmx.json.gz"
As a workaround, regex changed here, in order to parse the organization id folder in the s3 bucket
beats/x-pack/filebeat/module/aws/cloudtrail/config/s3.yml
Lines 3 to 7 in 5d07709
from: '^AWSLogs/\d+/CloudTrail/'
to: ^AWSLogs/\S+/\d+/CloudTrail/
The text was updated successfully, but these errors were encountered: