Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1057780 - RFE seboolean to enable OpenShift gears to read from NFS mounts
Summary: RFE seboolean to enable OpenShift gears to read from NFS mounts
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: selinux-policy
Version: 6.5
Hardware: x86_64
OS: Linux
medium
low
Target Milestone: rc
: ---
Assignee: Simon Sekidde
QA Contact: Eduard Benes
URL:
Whiteboard:
Depends On:
Blocks: 1056252
TreeView+ depends on / blocked
 
Reported: 2014-01-24 20:19 UTC by Luke Meyer
Modified: 2014-10-14 07:59 UTC (History)
9 users (show)

Fixed In Version: selinux-policy-3.7.19-236.el6
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-14 07:59:39 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 720253 None None None Never
Red Hat Product Errata RHBA-2014:1568 normal SHIPPED_LIVE selinux-policy bug fix and enhancement update 2014-10-14 01:27:37 UTC

Description Luke Meyer 2014-01-24 20:19:58 UTC
Description of problem:
We need a clean way to enable OpenShift (Enterprise or Origin) users to provide NFS-mounted resources to their gears (in-house libraries and assets and such). If the administrators so choose, setting a boolean to allow this should enable gear contexts (either via sshd or web server contexts) to have this read access. There might be use cases for writing as well, but that seems like a separate boolean at least.

Steps to Reproduce:
1. Create a gear on OpenShift Enterprise on RHEL 6
2. NFS mount something at /mnt/nfs on the node where your gear is
3. setenforce 0
4. ssh into the gear and ls /mnt/nfs
5. setenforce 1
6. ssh into the gear and ls /mnt/nfs

Actual results:
4 succeeds, 6 denied

Expected results:
Both succeed, as long as you setsebool -P openshift_read_nfs true (or similar)

Additional info:
Enabling NFS access from an OpenShift gear is normally just a matter of installing this policy:

##################################################
module openshift_nfs 1.0;
require {
        type openshift_t;
        type nfs_t;
        class dir { search getattr read open };
}

#!!!! This avc has a dontaudit rule in the current policy
allow openshift_t nfs_t:dir { read getattr open search };

# note: 
# checkmodule -Mm openshift_nfs.te -o openshift_nfs.mod
# semodule_package -m openshift_nfs.mod -o openshift_nfs.pp
# semodule -i openshift_nfs.pp
##################################################

Given the AVC is dontaudit, though, it can be pretty confusing for people to find who aren't SELinux experts. Much nicer to have a boolean we can document somewhere.

Comment 2 Daniel Walsh 2014-02-14 18:52:50 UTC
94963f6ae5b752fc2552bdef1f4dd3c3d7131e3a adds the boolean in git.

Comment 4 Johnny Liu 2014-07-31 10:13:34 UTC
Could reproduce this issue with selinux-policy-3.7.19-231.el6_5.3.noarch.

Verify this bug with selinux-policy-3.7.19-236.el6.noarch, and PASS.

# getsebool -a|grep openshift
openshift_use_nfs --> off
# setsebool -P openshift_use_nfs true
Create gear, then log into gear, access nfs mount point is working well.

Comment 5 Luke Meyer 2014-09-29 19:50:21 UTC
Update https://access.redhat.com/solutions/720253 and close this when RHEL 6.6 ships.

Comment 7 errata-xmlrpc 2014-10-14 07:59:39 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, and where to find the updated
files, follow the link below.

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

http://rhn.redhat.com/errata/RHBA-2014-1568.html


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