containers / containers/selinuxd
container-selinux udica-templates not compatible with refpolicy based distros
- Dominant language
- Go
- Stars
- 42
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
When running [security-profiles-operator (SPO)](https://github.com/kubernetes-sigs/security-profiles-operator) on a Flatcar Linux Kubernetes cluster, the selinuxd container fails to install policies. SPO installs SELinux policies by running `semodule -i` inside the selinuxd container, but it fails because the udica templates shipped in the image are incompatible with refpolicy-based systems.
The Dockerfile installs `container-selinux` and copies its templates to `/usr/share/selinuxd/templates/`. These templates are written against the Fedora SELinux policy base and reference Fedora-specific types that do not exist in refpolicy-based systems such as Flatcar Linux.
How should selinuxd handle refpolicy-based systems like Flatcar Linux? The current images bundle udica templates from `container-selinux`, which are only compatible with Fedora-based policy stores. One option could be a separate image variant shipping templates from the upstream [SELinuxProject/refpolicy](https://github.com/SELinuxProject/refpolicy) repository, but there may be other approaches worth considering.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the Dockerfile and the step that copies container-selinux's udica templates into /usr/share/selinuxd/templates/. Compare those templates with the SELinuxProject/refpolicy-based environment described for Flatcar Linux, and review how selinuxd installs policies with semodule -i. Done means a supported approach is defined and policies install successfully on refpolicy-based systems.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dockerfile, go, kubernetes, linux
- Domain
- devops, operating-systems, security
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100