Based on SELinux section in https://github.com/Tendrl/documentation/wiki/Tendrl-release-v1.5.2-(install-guide), update tendrl-ansible (most likely add tendrl-selinux role).
Specification
Actual Implementation
SELinux policies are maintained in selinux directories of these 2 repositories:
So that there are the following SELinux packages:
In tendrl-api spec file:
carbon-selinux-1.5.2-20170927T205654.a9e16c0.noarch.rpm
tendrl-grafana-selinux-1.5.2-20170927T205654.a9e16c0.noarch.rpm
tendrl-server-selinux-1.5.2-20170927T205654.a9e16c0.noarch.rpm
In tendrl-gluster-integration spec file:
tendrl-collectd-selinux-1.5.2-20171002T062306.f428920.noarch.rpm
tendrl-node-selinux-1.5.2-20171002T062306.f428920.noarch.rpm
Questions to figure out
Related Issues and Details
Blocker Issues
While I'm able to work on SELinux setup outright, I'm not going to merge the changes without these issues being addressed:
Status update: I'm going to fix these issues during work on moving selinux code into single repository tendrl-selinux.
Upstream Guidelines
https://fedoraproject.org/wiki/SELinux/IndependentPolicy
Based on SELinux section in https://github.com/Tendrl/documentation/wiki/Tendrl-release-v1.5.2-(install-guide), update tendrl-ansible (most likely add tendrl-selinux role).
Specification
Actual Implementation
SELinux policies are maintained in
selinuxdirectories of these 2 repositories:So that there are the following SELinux packages:
In tendrl-api spec file:
In tendrl-gluster-integration spec file:
Questions to figure out
Why we have
tendrl-collectd-selinuxrpm andcarbon-selinuxrpm? Havingtendrl-prefix is a valid approach, as long as tendrl-collectd policy overrides collectd policy from selinux-policy package. Having no prefix could work as long the policy is not covered in selinux-policy package.Is it ok to maintain SELinux policies in 2 unrelated repositories?
No, this is not a good idea. While it would be ok to attach selinux policy to one of already established repositories (as written in the specification), spreading it into 2 repositories and covering 3rd party components is not, as it unnecessary increases work required for maintenance.
Is it ok for specfile for gluster-integration or api to contain selinux policies of 3rd party packages? No, it's not ok.
There is a conflict between node and server package (see below). Is this ok?
No, this is not ok.
What a default mode of the tendrl domains should be? It should be permissive.
Related Issues and Details
Blocker Issues
While I'm able to work on SELinux setup outright, I'm not going to merge the changes without these issues being addressed:
restorecon -Rv /gluster-integration#424restorecon -Rv /api#291Status update: I'm going to fix these issues during work on moving selinux code into single repository tendrl-selinux.
Upstream Guidelines
https://fedoraproject.org/wiki/SELinux/IndependentPolicy