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

Reduce number of cockpit selinux changes #19631

Merged

Conversation

carbonin
Copy link
Member

To make the cockpit proxy work alongside cockpit used to manage the appliance we need a more targeted selinux policy.

To make this easier we can make some changes here to give cockpit-ws fewer permissions to the files in our source tree.

https://bugzilla.redhat.com/show_bug.cgi?id=1779988

This doesn't need to live here, it isn't tested, doesn't use our
models and moving it removes a few AVC denials when running cockpit-ws

https://bugzilla.redhat.com/show_bug.cgi?id=1779988
…t-ws

This was causing the ruby authentication process to look for our
Gemfile and Gemfile.lock which caused a bunch of SELinux denials

https://bugzilla.redhat.com/show_bug.cgi?id=1779988
Since we are creating the files, they will have the same context
as our process (httpd_sys_content_t), we want these files to have
the context of the parent directory (etc_t) so that they can be read
by cockpit-ws without SELinux denials

https://bugzilla.redhat.com/show_bug.cgi?id=1779988
@miq-bot
Copy link
Member

miq-bot commented Dec 11, 2019

Checked commits carbonin/manageiq@53207cb~...cbeb464 with ruby 2.5.5, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0
3 files checked, 4 offenses detected

app/models/miq_cockpit_ws_worker/runner.rb

  • ⚠️ - Line 152, Col 14 - Lint/UselessAssignment - Useless assignment to variable - stdout. Use _ or _stdout as a variable name to indicate that it won't be used.
  • ⚠️ - Line 152, Col 22 - Lint/UselessAssignment - Useless assignment to variable - stderr. Use _ or _stderr as a variable name to indicate that it won't be used.
  • ⚠️ - Line 152, Col 30 - Lint/UselessAssignment - Useless assignment to variable - wait_thr. Use _ or _wait_thr as a variable name to indicate that it won't be used.
  • ⚠️ - Line 152, Col 7 - Lint/UselessAssignment - Useless assignment to variable - stdin. Use _ or _stdin as a variable name to indicate that it won't be used.

@jrafanie jrafanie merged commit 771f620 into ManageIQ:master Dec 11, 2019
@jrafanie jrafanie added this to the Sprint 127 Ending Jan 6, 2020 milestone Dec 11, 2019
simaishi pushed a commit that referenced this pull request Dec 17, 2019
…nux_changes

Reduce number of cockpit selinux changes

(cherry picked from commit 771f620)

https://bugzilla.redhat.com/show_bug.cgi?id=1784555
@simaishi
Copy link
Contributor

Ivanchuk backport details:

$ git log -1
commit 17a9b5657553565957e52df518474f2b7cf421be
Author: Joe Rafaniello <jrafanie@users.noreply.github.com>
Date:   Wed Dec 11 17:16:36 2019 -0500

    Merge pull request #19631 from carbonin/reduce_number_of_cockpit_selinux_changes

    Reduce number of cockpit selinux changes

    (cherry picked from commit 771f62075c884301a4e2d462fedbb87cc0442616)

    https://bugzilla.redhat.com/show_bug.cgi?id=1784555

@carbonin carbonin deleted the reduce_number_of_cockpit_selinux_changes branch April 23, 2020 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants