]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
NFS Security Enhancements: allows secure NFS environment setup
authorGlenn M. Gobeli <Glenn.Gobeli@netapp.com>
Thu, 12 Jun 2014 13:31:25 +0000 (09:31 -0400)
committerBen Swartzlander <ben@swartzlander.org>
Thu, 23 Oct 2014 20:35:51 +0000 (16:35 -0400)
commit6879bd0720b2c4c5ef4d2f2c42fe0e4e436ba998
treea89873a8ca10b72f814942ac67fb2c61507aa7dc
parent52600c82a1e46fd20c0cffc8f9db93c380ebf3cc
NFS Security Enhancements: allows secure NFS environment setup

This patch allows an OpenStack environment to run as a secure NAS
environment from the client and server perspective, including having
root squash enabled and not running file operations as the 'root'
user. This also sets Cinder file permissions as 660: removing
other/world file access.

The "nas_secure_file_permissions" option controls the setting of file
permissions when Cinder volumes are created. The option defaults to
"auto" to gracefully handle upgrade scenarios. When set to "auto",
a check is done during Cinder startup to determine if there are
existing Cinder volumes: no volumes will set the option to 'true',
and use secure file permissions. The detection of existing volumes will
set the option to 'false', and use the current insecure method of
handling file permissions.

The "nas_secure_file_operations" option controls whether file
operations are run as the 'root' user or the current OpenStack
'process' user. The option defaults to "auto" to gracefully handle
upgrade scenarios. When set to "auto", a check is done during Cinder
startup to determine if there are existing Cinder volumes: no volumes
will set the option to 'true', be secure and do NOT run as the 'root'
user. The detection of existing volumes will set the option to 'false',
and use the current method of running operations as the 'root' user.
For new installations, a 'marker file' is written so that subsequent
restarts of Cinder will know what the original determination had been.

This patch enables this functionality only for the NFS driver.
Other similar drivers can use this code to enable the same
functionality with the same config options.

DocImpact
Change-Id: I3d25f593beab7f5462576b14ab62d13d8c53e7c6
Implements: blueprint secure-nfs
Partial-Bug: 1260679
17 files changed:
cinder/brick/initiator/connector.py
cinder/image/image_utils.py
cinder/tests/test_coraid.py
cinder/tests/test_glusterfs.py
cinder/tests/test_image_utils.py
cinder/tests/test_netapp_nfs.py
cinder/tests/test_nfs.py
cinder/tests/test_remotefs.py
cinder/tests/test_smbfs.py
cinder/tests/test_volume.py
cinder/volume/driver.py
cinder/volume/drivers/netapp/common.py
cinder/volume/drivers/netapp/nfs.py
cinder/volume/drivers/nfs.py
cinder/volume/drivers/remotefs.py
cinder/volume/manager.py
etc/cinder/cinder.conf.sample