Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1933164 - Selinux blocks websockify, vnc console is blocked
Summary: Selinux blocks websockify, vnc console is blocked
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: SELinux
Version: 6.7.0
Hardware: All
OS: Unspecified
unspecified
medium
Target Milestone: 6.8.5
Assignee: Lukas Zapletal
QA Contact: Lukas Pramuk
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-02-25 20:38 UTC by James Jeffers
Modified: 2023-12-15 20:11 UTC (History)
3 users (show)

Fixed In Version: foreman-selinux-2.1.2.4-1,foreman-selinux-2.1.2.5-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1868005
Environment:
Last Closed: 2021-03-31 19:48:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 30657 0 Normal Closed Selinux blocks websockify, vnc console is blocked 2021-02-25 20:38:30 UTC
Foreman Issue Tracker 32110 0 Normal Ready For Testing Add missing passenger websockify transition 2021-03-16 14:18:53 UTC
Red Hat Product Errata RHBA-2021:1057 0 None None None 2021-03-31 19:48:26 UTC

Comment 3 Lukas Pramuk 2021-03-16 02:47:40 UTC
FailedQA.

@Satellite 6.8.5 Snap1
foreman-selinux-2.1.2.4-1.el7sat.noarch

by the reproducer described in comment#0

1) Select any provisioned host

2) Click [Console] button

(x) Failed to set console: Permission denied - /usr/share/foreman/extras/noVNC/websockify.py

# grep websockify /var/log/audit/audit.log
type=AVC msg=audit(1615862142.932:222): avc:  denied  { execute } for  pid=11591 comm="diagnostic_con*" name="websockify.py" dev="dm-0" ino=604173190 scontext=system_u:system_r:passenger_t:s0 tcontext=system_u:object_r:websockify_exec_t:s0 tclass=file permissive=0

# semodule -l | grep foreman
foreman	2.1.2.4

# grep -C3 'corecmd_exec_ls(websockify_t)' /usr/share/doc/foreman-selinux-2.1.2.4/foreman.te
read_files_pattern(websockify_t, puppet_var_lib_t, puppet_var_lib_t)
files_search_etc(websockify_t)
read_files_pattern(websockify_t, puppet_etc_t, puppet_etc_t)
corecmd_exec_ls(websockify_t)

tunable_policy(`websockify_can_connect_all',`
    corenet_tcp_connect_all_ports(websockify_t)

# audit2allow -a

#============= passenger_t ==============
allow passenger_t websockify_exec_t:file execute;


>>> the fix is present however there is another selinux denial (passenger 6.8  vs. puma 6.9)

Comment 4 Lukas Zapletal 2021-03-16 14:18:53 UTC
We need this patch:

https://projects.theforeman.org/issues/32110

Comment 7 Lukas Pramuk 2021-03-24 09:42:23 UTC
VERIFIED.

@Satellite 6.8.5 Snap2
foreman-selinux-2.1.2.5-1.el7sat.noarch

by the reproducer described in comment#0

1) Select any provisioned host

2) Click [Console] button

# semodule -l | grep foreman
foreman	2.1.2.5

# grep websockify /var/log/audit/audit.log
<empty>

>>> no selinux denials

Comment 11 errata-xmlrpc 2021-03-31 19:48:19 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Satellite 6.8.5 Async Bug Fix Update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:1057


Note You need to log in before you can comment on or make changes to this bug.