falcosecurity / plugins

Falco plugins registry
Apache License 2.0
80 stars 73 forks source link

Cloudtrail: Support for multiple accounts #423

Closed uhei closed 5 months ago

uhei commented 5 months ago

Motivation

For organization trails Cloudtrail uses a S3 path as follows: bucket_name/prefix_name/AWSLogs/O-ID/Account ID/CloudTrail/Region/YYYY/MM/DD/file_name.json.gz. 2

Sometimes it is necessary to search for events in several accounts at the same time.

Feature

Introduce support for accounts with an additional parameter S3AccountList. This parameter is a comma separated list of account IDs.

Application logic should be:

Known limitation:

When S3AccountList and S3Interval are not set, getting all events over all accounts, regions and the entire period could take quite some time or even run into time outs (depending on the size of the organization).

Alternatives

Getting events per account manually and merge same later with mergecap.

Additional context

If there are no objections to this request, I will prepare a commit for it.

Related PR #422