Skip to content
This repository was archived by the owner on May 30, 2023. It is now read-only.

containerd: Enable SELinux labeling support by default#1699

Merged
tormath1 merged 2 commits intoflatcar-archive:mainfrom
JAORMX:containerd-selinux
Mar 8, 2022
Merged

containerd: Enable SELinux labeling support by default#1699
tormath1 merged 2 commits intoflatcar-archive:mainfrom
JAORMX:containerd-selinux

Conversation

@JAORMX
Copy link
Copy Markdown
Contributor

@JAORMX JAORMX commented Mar 8, 2022

containerd: Enable SELinux labeling by default

This enables containerd to do appropriate SELinux labeling of containers
and files by default. This should not be problematic as Flatcar ships with
SELinux permissive by default.

This was based on the sample config provided by containerd

This enables containerd to do appropriate SELinux labeling of containers
and files by default. This should not be problematic as Flatcar ships with
SELinux permissive by default.

Signed-off-by: Juan Antonio Osorio <juan.osoriorobles@eu.equinix.com>
@jepio jepio requested a review from tormath1 March 8, 2022 15:02
@jepio
Copy link
Copy Markdown
Contributor

jepio commented Mar 8, 2022

CI has passed; I'll let @tormath1 take a look, as he might think of some dependency between this and the container selinux profiles.

@tormath1
Copy link
Copy Markdown
Contributor

tormath1 commented Mar 8, 2022

Thanks @JAORMX for this contribution. To me this change looks good and relevant with SElinux enabled by default with Docker: https://github.com/flatcar-linux/coreos-overlay/blob/613277c65ea9288941b0db5d9683c97724d3f347/app-emulation/docker/files/docker.service#L11

Currently Flatcar is booting in permissive mode so it should not prevent application to run normally - and as mentioned in SELinux documentation:

Check the system logs for any messages containing avc: denied. Such messages indicate that an enforcing SELinux would prevent the container from performing the logged operation. Please open an issue on Github, including the full avc log message. 1

Would you mind adding a changelog entry in the following folder: https://github.com/flatcar-linux/coreos-overlay/tree/main/changelog/changes ?

Footnotes

  1. https://www.flatcar.org/docs/latest/setup/security/selinux/#check-a-containers-compatibility-with-selinux-policy

@tormath1 tormath1 added the main label Mar 8, 2022
Signed-off-by: Juan Antonio Osorio <juan.osoriorobles@eu.equinix.com>
@JAORMX
Copy link
Copy Markdown
Contributor Author

JAORMX commented Mar 8, 2022

@tormath1 done.

@tormath1 tormath1 merged commit fd68c08 into flatcar-archive:main Mar 8, 2022
@tormath1
Copy link
Copy Markdown
Contributor

tormath1 commented Mar 8, 2022

Thanks a lot @JAORMX. This change should be available in the next Alpha release. :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants