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 1531075 - passenger connection to container_port_t is denied
Summary: passenger connection to container_port_t is denied
Keywords:
Status: CLOSED DUPLICATE of bug 1478966
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: SELinux
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Lukas Zapletal
QA Contact: Lukas Pramuk
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-04 14:24 UTC by Lukas Pramuk
Modified: 2019-08-12 14:02 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-01-08 11:04:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Lukas Pramuk 2018-01-04 14:24:40 UTC
Description of problem:
When you try to access docker CR via TCP you get "Permission denied - connect(2) for 127.0.0.1:2375 (Errno::EACCES)"
The passenger connection is denied producing following AVC:

type=AVC msg=audit(1514988360.074:3530): avc:  denied  { name_connect } for  pid=5052 comm="diagnostic_con*" dest=2375 scontext=system_u:system_r:passenger_t:s0 tcontext=system_u:object_r:container_port_t:s0 tclass=tcp_socket


Version-Release number of selected component (if applicable):
satellite-6.3.0-23.0.el7sat.noarch
foreman-selinux-1.15.5-1.el7sat.noarch


How reproducible:
deterministic

Steps to Reproduce:
1. Have a Satellite and Docker CR accessible via TCP 

2. If the CR is external install also container-selinux

3. Due to BZ #1527052 (slated for rhel-7.5.0) assign 2375/tcp port to container_port_t label since the label is missing any port assigments
# semanage port -a -t container_port_t -p tcp 2375

You have to have the port assigned to the container_port_t label 
# semanage port -l |grep -e container
container_port_t               tcp      2375

4. Try to connect to localhost:2375 or external_docker_host:2375 (by "Test Connection" in UI)

Actual results:
connection denied

Expected results:
connection succeeds

Additional info:
The boolean passenger_can_connect_docker_tcp that should be related is turned on still connection is denied

passenger_can_connect_all      (off  ,  off)  Allow passenger to can connect all
passenger_can_connect_docker_unix (on   ,   on)  Allow passenger to can connect docker unix
passenger_can_connect_docker_tcp (on   ,   on)  Allow passenger to can connect docker tcp

Comment 3 Lukas Pramuk 2018-01-08 11:04:25 UTC

*** This bug has been marked as a duplicate of bug 1478966 ***


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