Closed engelmi closed 2 months ago
After #935 was merged, the integration tests were run in multihost mode (with SELinux enforced enabled) to find any potential SELinux issues: https://artifacts.osci.redhat.com/testing-farm/e78806b7-b700-4286-b367-1093ffa62064/ A few tests failed - not due to issues with the SELinux policy, but because of other reasons (e.g. timeout). These test failures need to be investigated. However, the refined SELinux policy doesn't break any integration test, so we can close this issue.
Describe the bug
In https://github.com/eclipse-bluechi/bluechi/pull/850 we changed the
bluechi-selinux
policy from permissive to enforcing by default. This leads to various errors.Known issues
Blocked systemd calls When enforcing it prevents various essential calls for
bluechi-agent
(and probablybluechi-controller
). For example starting a systemd service from thebluechi-agent
is blocked:These need to be added to bluechi.te. For reference, please see https://github.com/fedora-selinux/selinux-policy/blob/rawhide/policy/modules/system/systemd.if
Files can't be read BlueChi reads its configuration files from
/etc
. However, it is possible to pass in paths to configuration files via the-c
CLI option. The policy only allows reads from/etc
, though. Using chcon it is possible to allow reads for files on other locations.This needs to be changed in:
/tmp/bluechi
and thenchcon -R -t etc_t /tmp/bluechi/
, where all configuration files passed in via-c
are locatedTo Reproduce
Installing the latest BlueChi from snapshot repo on copr: https://copr.fedorainfracloud.org/coprs/g/centos-automotive-sig/bluechi-snapshot
Starting
bluechi-controller
andbluechi-agent
. Then starting a unit viabluechictl
to trigger the denial for starting systemd units, for example.Expected behavior
All functionalities from BlueChi (in expected uses) aren't denied by the SELinux policy.