-
Notifications
You must be signed in to change notification settings - Fork 24
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
ROX-18838: Remove docker socket mountpoint from collector container. #1277
Conversation
Skipping CI for Draft Pull Request. |
|
Looks like RHCOS is showing the same behavior I was getting on my Fedora, I wonder if there's something about the format for the cgroups in that platform that is not supported by Falco and we were falling back to using the container engine for getting that data somehow 🤔 It'd be great if we could somehow log what container runtime is being used, I suspect crun is not supported by Falco and is what I'm using on my environment.
|
Ok, I've been doing some debugging and I've found why this is failing on systems with podman. Usually, the container ID is detected by the container engine in falco, some of the engines are run by default, but podman has this little jewel: https://github.com/stackrox/falcosecurity-libs/blob/653e24c25d10c1a7ac16455ec41d0c6bc5bfd219/userspace/libsinsp/container_engine/docker/podman.cpp#L177-L182 That piece of code is quite weird, but the basic idea is, "if the podman socket doesn't exists, don't try to match podman type cgroups", causing Falco to not be able to parse container IDs on systems running podman. We will need to figure out a way to either:
|
Good catch @Molter73 !
I was searching for the reason behind this particular exception, and it would be a performance trick: falcosecurity/libs#296 |
Also, none of the end-user runtime environments we support uses podman, nor docker... so I wonder whether the problem is in the code, ... or the test environment 😬 |
Yeah, I assumed something of the sort, since it has to look for the socket in multiple users.
For the time being, I think we can keep the podman mount to trick the integration tests into passing, but we'll need to look for a better solution. I'll talk to folks upstream, cause there is a mask that you can set at runtime to skip any engines you don't use, so I think it makes sense to move the check out of the libraries and into Falco itself. The sad part in all this is that we will still have the code for querying container APIs, even if they fail and there won't be an easy way to decouple them. |
…podman We do not make use of the runtime socket, but its absence disables the runtime cgroup parsing... We bind it to a dummy file, which should do the trick.
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.
LGTM!
TIL: yet an other difference between podman and docker |
Description
The current definition of the Collector daemonset contains a volume to access to the Docker socket. This is not used anymore and could cause security concern.
This PR removes the mountpoint parameters in the CI tests to check that Collector is not affected by this change.
Checklist