3 ms·
I've written a bunch of SELinux policy, also without being especially expert. The tooling is definitely getting better, but still there are many annoying thing
by rwmj 6y ago
I've written a bunch of SELinux policy, also without being especially expert. The tooling is definitely getting better, but still there are many annoying things from the obscure file layout, the giant all-in-one everything-is-a-global policy[1], to the small annoyances like m4 in the policy files.
Of course you need to buy into the whole premise of SELinux - that in addition to simple Unix permissions you can use mandatory access control to fine-grain control everything that a process can do and get access to. Obviously this is a giant boil-the-ocean project that has consumed many good people for decades. For SVirt (secure virtualization) this was pretty successful, allowing many qemu instances to run on a single server, and confining them with SELinux so each can only access its own files even when they are all running as the same Unix user.
The linked article is a good intro.
[1] But they're fixing this, yay! I can't find a link now but there's a project to decentralise SELinux policy. Perhaps it's still an internal-only Red Hat project.
- als0 6y ago> [1] But they're fixing this, yay! I can't find a link now but there's a project to decentralise SELinux policy. Perhaps it's still an internal-only Red Hat project. +1 this is sorely needed and I wasn't sure if the design would ever evolve to include this
- yrro 6y agoWorth mentioning that SVirt is also used for running containers on RHEL/Fedora/CentOS etc.
- totony 6y agoI don't think that's the case, svirt is specific to libvirt + selinux-virt, whereas containers use selinux-container which are integrated into docker & al. Same principle tho
- yrro 6y agoOriginally all the domains had 'svirt' in the name: https://www.projectatomic.io/blog/2016/03/dwalsh_selinux_containers/ https://www.projectatomic.io/blog/2016/03/dwalsh_selinux_con... These days containers have their own domains: https://www.mankier.com/8/container_selinux https://www.mankier.com/8/container_selinux As you say, the principle is the same. [edit] container_t is (or was?) an alias for svirt_lxc_net_t: https://danwalsh.livejournal.com/79191.html https://danwalsh.livejournal.com/79191.html