-
Notifications
You must be signed in to change notification settings - Fork 53
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
Selinux support #135
Selinux support #135
Conversation
So far I did few findings regarding the SELinux story around #22
The current PR is mere informative about how I executed the tests, I don't think it is worth to merge it as it is now, it does not work and it will not work unless policies are refined. |
7b54025
to
2168a71
Compare
Finally I managed to install the TW selinux packages, apply selinux labels at install time and then boot. The boot procedure now is on permissive mode and after boot one can see labels are applied on the rootfs (e.g. |
Apparently go-mtree optionally supports parsing xattrs, it is an option. So I was wondering if it wouldn't be possible to actually include the go-mtree result of labeled files into the pushed image, so we could eventually dump the image to the filesystem then apply the labels and after that run go-mtree and compare with the pre-stored result that was included into image metadata. No labels processing on boot time, just at install/upgrade time and with a proper sanity check before rebooting. This way we could eventually avoid having to push a filesystem image to the registry. |
#147 seams to be a valid procedure to verify the images however this still has a problem, which is that we need to somehow provide the mtree manifest as part of the image. Applying SELinux labels to the rootfs at build time even if it is just to create the mtree manifest might be tricky since my attempts to relabel inside the container all failed. Apparently I also gave a trial using In fact this is a reasonable limitation, allowing this sort of operations at build time could easily lead to non portable images... |
b18e26e
to
053fd1b
Compare
053fd1b
to
b6e4e55
Compare
@mudler @Itxaka @kkaempf This PR is the first step of having SELinux support in cOS. This installs the policies and sets the labels at upgrade/install time. Currently SELinux is started on permissive mode to ensure SELinux does not block cloud-init operations. Proper policies should be applied to ensure all the changes we do on the fly aren't blocked. Proper policies is something TBC and probably not something we should spend time on, since we are not experts on it. |
b6e4e55
to
9bcd361
Compare
9bcd361
to
720c552
Compare
0407ae2
to
de13283
Compare
This commit adds SELinux support to the system. Note this only installs some already packaged policies and enable them at install/upgrade time. Signed-off-by: David Cassany <[email protected]>
de13283
to
270de66
Compare
Merging since all required tests are passing and pull_request suite passed all clean. Only one test of the push suite failed... |
This is a work in progress PR about setting and enabling SELInux in cOS-Toolkit
Fixes #22