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

Cover SELinux configuration #44

Closed
5 tasks done
mbukatov opened this issue Sep 21, 2017 · 5 comments
Closed
5 tasks done

Cover SELinux configuration #44

mbukatov opened this issue Sep 21, 2017 · 5 comments
Assignees

Comments

@mbukatov
Copy link
Collaborator

mbukatov commented Sep 21, 2017

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

  • Why we have tendrl-collectd-selinux rpm and carbon-selinux rpm? Having tendrl- 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?

    # rpm -ql -p tendrl-node-selinux-1.5.2-20171002T062306.f428920.noarch.rpm 
    /usr/share/selinux/packages/tendrl.pp.bz2
    # rpm -ql -p tendrl-server-selinux-1.5.2-20170927T205654.a9e16c0.noarch.rpm 
    /usr/share/selinux/packages/tendrl.pp.bz2
    

    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:

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

@mbukatov mbukatov added this to the changes_for_v1.5.2 milestone Sep 21, 2017
@mbukatov mbukatov self-assigned this Sep 22, 2017
@mbukatov
Copy link
Collaborator Author

I need to verify current setup with someone from SELinux team first to prevent automating flawed setup. Moving to milestone for 1.5.3.

@mbukatov
Copy link
Collaborator Author

mbukatov commented Oct 9, 2017

I'm working on moving all selinux bits into single repository, work in progress repository is available here: https://github.com/mbukatov/tendrl-selinux , when finalized and after agreement with tendrl dev team, the repo will be moved into Tendrl github group and selinux code from api and gluster integration repositories will be removed.

@mbukatov
Copy link
Collaborator Author

Repository https://github.com/mbukatov/tendrl-selinux is ready to be transfered into Tendrl organization. Related pull requests:

@mbukatov
Copy link
Collaborator Author

Status update:

  • repository with selinux policies has been transferred into https://github.com/Tendrl/tendrl-selinux
  • the idea behind SELinux support for Tendr is that we will keep SELinux in enforcing mode, but will have our independent policies in permissive, so that we can catch the problems.

mbukatov added a commit to mbukatov/tendrl-ansible that referenced this issue Oct 16, 2017
This commit adds:

* switching SELinux mode to permissive mode system wide by default,
  but one can redefine this via selinux_mode variable
* installation of tendrl-selinux packages

When we have more confidence in the tendrl-selinux policies, we will
switch the default to "enforcing".

tendrl-bug-id: Tendrl#44
@mbukatov
Copy link
Collaborator Author

Implemented by #55

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

No branches or pull requests

1 participant