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

Cloudtrail s3 interval #275

Merged
merged 5 commits into from
Jul 17, 2023

Conversation

geraldcombs
Copy link
Contributor

What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind design

/kind documentation

/kind failing-test

/kind feature

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area plugins

/area registry

/area build

/area documentation

What this PR does / why we need it:

It should make configuration easier, since you can now just paste in an S3 URL from the AWS console and the plugin will determine which log pathnames need to be downloaded based on specified interval or duration.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

@jasondellaluce
Copy link
Contributor

Thanks! Will look into this, but I'm proposing to merge this after we wrap up the new plugins version for the next Falco release (which will happen in the next 2 weeks).

Add an "S3Interval" option, which limits log downloads to the specified
time interval. Intervals can be a simple "relative time in the past to
now", "an absolute timestamp until now", or a range of those two
formats.

The interval is applied at the far end using the StartAfter parameter
and locally to filter log pathnames. In my informal testing here the
time from capture start to first event is ~2s.

Signed-off-by: Gerald Combs <[email protected]>
Time.Compare was added in go 1.20.

Signed-off-by: Gerald Combs <[email protected]>
Remove our dependency on str2duration. Fix our interval regex.

Signed-off-by: Gerald Combs <[email protected]>
@github-actions
Copy link

Rules files suggestions

aws_cloudtrail_rules.yaml

Comparing b3a9c9cbbae12745c834349f128b71e5ed60da19 with latest tag cloudtrail-0.8.0

No changes detected

@jasondellaluce
Copy link
Contributor

I think the last commit misses a Sign-off!

Make our default interval "" (which fetches all logs) instead of "24h".

Signed-off-by: Gerald Combs <[email protected]>
@geraldcombs
Copy link
Contributor Author

I think the last commit misses a Sign-off!

Fixed. Thanks!

@github-actions
Copy link

Rules files suggestions

aws_cloudtrail_rules.yaml

Comparing 6bc062e63ce66912f6bde08cae16b3a88359e533 with latest tag cloudtrail-0.8.0

No changes detected

Copy link
Contributor

@jasondellaluce jasondellaluce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@poiana
Copy link
Contributor

poiana commented Jul 17, 2023

LGTM label has been added.

Git tree hash: d8ef17ae121ae857e5dec876c869255bdbe89ea6

@poiana
Copy link
Contributor

poiana commented Jul 17, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: geraldcombs, jasondellaluce

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@poiana poiana merged commit 5bbc310 into falcosecurity:master Jul 17, 2023
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants