Skip to content
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

[release-0.20][manual] support for custom and default selinux policies #341

Conversation

ffromani
Copy link
Collaborator

Aggregate backport of #311 #313 #319 (partial) #320 (partial)

Tal-or and others added 6 commits December 16, 2024 14:43
We're using MachineConfig for installing
custom SELinux policy.

We want to depracate the custom policy,
hence we make the MachineConfig as opt-in and
we're deploying/rendering it unless specifically
asked by the user.

Signed-off-by: Talor Itzhak <[email protected]>
(cherry picked from commit fee7ce3)
The `container_device_plugin_t` label type, allows communication with
`kubelet_t` context: containers/container-selinux#178.

The PodResourceAPI socket is an object created by Kubelet so it inherents
the same process context, i.e. `kubelet_t`.

We gradually want to depracate the custom SELinux context
and use this one instead.

Signed-off-by: Talor Itzhak <[email protected]>
(cherry picked from commit 170037a)
Add the `UpdaterCustomSELinuxPolicy` flag so we could control
whether we want to install custom policy from the deployer directly.

This flag is off by default.

Signed-off-by: Talor Itzhak <[email protected]>
(cherry picked from commit 88ca7b2)
There were few places where we forgot to pass the `UpdaterCustomSELinuxPolicy`
option. This commit is suppose to fix that.

Signed-off-by: Talor Itzhak <[email protected]>
(cherry picked from commit 16e4670)
Signed-off-by: Talor Itzhak <[email protected]>
(cherry picked from commit 6aec6fd)
in 0.21 and beyond the default must be to use the native
selinux policy, but in backports we must preserve
backward compatibility and keep defaulting to the custom
one while being forward looking.

Signed-off-by: Francesco Romani <[email protected]>
@Tal-or
Copy link
Contributor

Tal-or commented Dec 16, 2024

LGTM
let's merge after #344 goes in

@ffromani
Copy link
Collaborator Author

let's see if we can avoid the backports because it creates almost more problems as it solves it

@ffromani ffromani closed this Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants