Bug 1147738

Summary: SELinux blocks swift's access to ephemeral ports
Product: [Fedora] Fedora Reporter: Richard Su <rwsu>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: dominick.grift, dwalsh, lvrabec, mgrepl, mmalik
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: selinux-policy-3.12.1-189.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-16 02:01:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
audit.log none

Description Richard Su 2014-09-30 01:39:51 UTC
Created attachment 942555 [details]
audit.log

Description of problem:
Upstream swift is now using ephemeral ports.

type=AVC msg=audit(1411756364.896:5765): avc: denied { name_connect } for pid=10073 comm="swift-object-se" dest=56420 scontext=system_u:system_r:swift_t:s0 tcontext=system_u:object_r:ephemeral_port_t:s0 tclass=tcp_socket
type=AVC msg=audit(1411756391.224:6246): avc: denied { name_connect } for pid=9938 comm="swift-object-re" dest=47392 scontext=system_u:system_r:swift_t:s0 tcontext=system_u:object_r:ephemeral_port_t:s0 tclass=tcp_socket

Can we update the policy to allow swift access to them?

Version-Release number of selected component (if applicable):
selinux-policy-3.12.1-183.fc20.noarch
selinux-policy-targeted-3.12.1-183.fc20.noarch

How reproducible:
always

Steps to Reproduce:
1. Deploy tripleo overcloud

Actual results:
Swift denied access to ephemeral ports

Expected results:
Swift allowed access to ephemeral ports

Additional info:

Comment 1 Richard Su 2014-09-30 04:07:33 UTC
Should swift_can_network boolean be used here?

Comment 2 Miroslav Grepl 2014-10-03 09:30:40 UTC
commit a8b80da5c88bb4e26473a22a9fcc5abe3cadb251
Author: Miroslav Grepl <mgrepl>
Date:   Fri Oct 3 11:29:48 2014 +0200

    Allow swift to connect to all ephemeral ports by default.

Comment 3 Fedora Update System 2014-10-07 13:36:33 UTC
selinux-policy-3.12.1-189.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-189.fc20

Comment 4 Fedora Update System 2014-10-08 19:02:29 UTC
Package selinux-policy-3.12.1-189.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.12.1-189.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-12350/selinux-policy-3.12.1-189.fc20
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2014-10-16 02:01:00 UTC
selinux-policy-3.12.1-189.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.