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

new: add option to enable event sources selectively #2085

Merged
merged 6 commits into from
Aug 26, 2022

Conversation

jasondellaluce
Copy link
Contributor

What type of PR is this?

/kind feature

Any specific area of the project related to this PR?

/area engine

/area tests

What this PR does / why we need it:

This PR introduces a new cmd line option --enable-source=XXX that is dual to the already-existing --disable-source=XXX. Both of them are opt-out: it is up to Falco to choose the default enable event sources depending on the provided configuration. So far, only one can be enabled per time (either syscall, or a plugin-based one).

The semantic of --disable-source is of disabling event sources selectively starting from the set of the ones enabled by Falco by default. On the opposite, --enable-source erases the Falco default enable set and allows enabling sources selectively.

The feature of selecting a custom set of event sources has been introduced in the regression test suite too (falco_tests.py). Tests relying on plugins have been updated accordingly.

Which issue(s) this PR fixes:

Special notes for your reviewer:

For the current setup, this is sort of a huge no-op. However, this introduces preliminary work for #2074.

Does this PR introduce a user-facing change?:

new: add option to enable event sources selectively

@jasondellaluce
Copy link
Contributor Author

/milestone 0.33.0

@poiana poiana added this to the 0.33.0 milestone Jun 22, 2022
@jasondellaluce jasondellaluce force-pushed the new/source-selection branch 2 times, most recently from 0c114d9 to e4014a6 Compare June 23, 2022 16:53
leogr
leogr previously approved these changes Aug 26, 2022
@poiana
Copy link
Contributor

poiana commented Aug 26, 2022

LGTM label has been added.

Git tree hash: 46c532c0c2d5f4c9710fba2984a4c598586c9a7a

jasondellaluce and others added 6 commits August 26, 2022 09:40
…ce selection

Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
…sources

Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
Co-authored-by: Andrea Terzolo <andrea.terzolo@polito.it>
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
}

/* Print all enabled sources. */
std::ostringstream os;
Copy link
Contributor

Choose a reason for hiding this comment

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

For a future PR: perhaps move this part to a different app_action?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I agree. Plus, one day we should also decide if we want to enable/disable event source for capture files too (A single capture file can potentially contain events from more than one source).

Copy link
Contributor

@FedeDP FedeDP 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 Aug 26, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: FedeDP, 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:
  • OWNERS [FedeDP,jasondellaluce]

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

@poiana
Copy link
Contributor

poiana commented Aug 26, 2022

LGTM label has been added.

Git tree hash: f6095cacbb9ff469454f7ace18425b2b5087a781

@poiana poiana merged commit 9646308 into master Aug 26, 2022
@poiana poiana deleted the new/source-selection branch August 26, 2022 10:47
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.

4 participants