-
Notifications
You must be signed in to change notification settings - Fork 341
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
tetragon: resolve uid to username for exec events from /proc fs #2588
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Member
tixxdz
commented
Jun 20, 2024
270499b
to
65688a6
Compare
✅ Deploy Preview for tetragon ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
kkourt
requested changes
Jun 21, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, please find some comments below.
Right now we resolve uid->username only for processes that start after tetragon. To also handle the ones that start before, we need to resolve the username during /proc fs scanning. This patch adds userinfo module part of sensors/exec and call it for both bpf exec sensors and proc_reader procfs scanning. We keep same semantics if a process is not in mount and user host namespaces we do not resolve its username. Signed-off-by: Djalal Harouni <tixxdz@gmail.com>
Signed-off-by: Djalal Harouni <tixxdz@gmail.com>
Signed-off-by: Djalal Harouni <tixxdz@gmail.com>
Add two metrics: - process_metadata_username_ignored_not_in_host_namespaces: This is to note that we did not perform uid->username resolution and it was ignored due the target process not being in mount or user host namespaces. - process_metadata_username_failed: that is to note that we did try to resolve target process uid->username but it failed for some reasons. Signed-off-by: Djalal Harouni <tixxdz@gmail.com>
65688a6
to
28ce5ef
Compare
Done, thank you, PTAL! |
backport is here: #2603 , when merged will amend |
kkourt
approved these changes
Jun 26, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.