-
Notifications
You must be signed in to change notification settings - Fork 31
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
[RFE/Fix]: Smooth out SELinux rough edges in Flatcar #673
Comments
also, getting a newer reference of |
I started to investigate on relabeling the whole system during the build of the image. |
Some quick thoughts that might be useful here:
so basically you do |
Thanks for working on this. For the record, I had an issue with the Security Profiles Operator Daemon and Flatcar 3185.0.0. I will post below in case it helps someone with the same problem (https://xkcd.com/979/) It failed to start with:
The current workaround:
|
For the record, the SPO (Security Profiles Operator) runs the daemon with |
Any progress so far? |
Hi @bitfisher, No real progress on this task, we got some contributions and |
Any updates? |
Hi @bitfisher, We started to work on this recently - see the office hours dedicated section: https://youtu.be/r3VPy5tsKmE?t=553 and the associated PRs: flatcar-archive/coreos-overlay#1993 (comment) |
Hi @tormath1, Glad to hear there is progess! Can you give any estimate on when this will be available? |
Note to internet strangers, that may bump on this thread: If you try to install k8s with Cilium CNi on Flatcar, it won't work with the current implementation of SELinux, even in |
@bitfisher a big piece is about to be done: relabeling the whole system. Once done, we must chase down a few denials raised by the CI and finally run all the tests in the CI with SELinux enforced at boot to be sure that everything works correctly. |
Sorry for the late response. I've missed your comment :( Glad to hear, that there is some progress. We are still stuck to k8s < 1.22 here :( BTW ... Is SELinux used if k8s uses containerd directly and k8s control plane runs via docker with SELinux diabled? |
Current situation
Given issues with having the whole system labeled in the past, not every file in the base distribution is labeled with the appropriate SELinux type. On the other hand, crucial boot-time tooling such as
torcx
has historically had issues with SELinux enforcing at boot time.In order to provide a smoother experience in a SELinux enforcing deployment, it would be ideal to get these issues sorted out.
As of file system labeling, an example is the lack of labeling for
sssd
-related files. Another example is the lack of labeling of everything under/usr/bin
. Labeling these would allow us to have more thorough policies and to start enforcing appropriate domain transitions from these binaries.We can see that the default context is correct while the actual type is
unlabeled
.Goals
Non-Goals
enforcing
by default: While this would be a better security default, this change would be too disruptive to bring in one go.Impact
This would require us to revisit the SELinux packages that are provided and fix the necessary bits for the policy to work in Flatcar.
This might also require some updates to more recent versions of
refpolicy
for us to get the latest changes in policy and support containers better.Ideal future situation
Implementation options
setfiles
to the initramfs and enable theselinuxRelabel
Ignition feature to relabel files created by Ignition (dracut/ignition: add setfiles to initramfs bootengine#42)Additional information
Related issues:
execsnoop
inenforcing
mode #509The text was updated successfully, but these errors were encountered: