From 654501d481668b43200e7ec5b8a8254353c2160c Mon Sep 17 00:00:00 2001 From: Joseph Gmitter Date: Mon, 7 May 2018 14:06:09 -0400 Subject: [PATCH] LUDOC-403 acl: Update link for POSIX ACL paper This patch updates the link to the POSIX ACL paper by SuSe Labs. The patch also refactors the source file to adhere to coding standards, namely the 80 col limit and appropriate section names. Signed-off-by: Joseph Gmitter Change-Id: I6898eb389fb22e545ec768d0697681cfb36a7c73 Reviewed-on: https://review.whamcloud.com/32312 Tested-by: Jenkins Reviewed-by: James Nunez --- ManagingSecurity.xml | 262 ++++++++++++++++++++++++++++++++++----------------- 1 file changed, 176 insertions(+), 86 deletions(-) diff --git a/ManagingSecurity.xml b/ManagingSecurity.xml index 7e55684..ec85979 100644 --- a/ManagingSecurity.xml +++ b/ManagingSecurity.xml @@ -1,78 +1,113 @@ Managing Security in a Lustre File System - This chapter describes security features of the Lustre file system and includes the - following sections: + This chapter describes security features of the Lustre file system and + includes the following sections: - + - + -
- <indexterm><primary>Access Control List (ACL)</primary></indexterm>Using ACLs - An access control list (ACL), is a set of data that informs an operating system about permissions or access rights that each user or group has to specific system objects, such as directories or files. Each object has a unique security attribute that identifies users who have access to it. The ACL lists each object and user access privileges such as read, write or execute. -
- <indexterm><primary>Access Control List (ACL)</primary><secondary>how they work</secondary></indexterm>How ACLs Work - Implementing ACLs varies between operating systems. Systems that support the Portable - Operating System Interface (POSIX) family of standards share a simple yet powerful file - system permission model, which should be well-known to the Linux/UNIX administrator. ACLs - add finer-grained permissions to this model, allowing for more complicated permission - schemes. For a detailed explanation of ACLs on a Linux operating system, refer to the SUSE - Labs article, Posix Access Control Lists on Linux: - http://www.suse.de/~agruen/acl/linux-acls/online/ - We have implemented ACLs according to this model. The Lustre software works with the - standard Linux ACL tools, setfacl, getfacl, and the historical chacl, normally installed - with the ACL package. +
+ <indexterm><primary>Access Control List (ACL)</primary></indexterm> + Using ACLs + An access control list (ACL), is a set of data that informs an + operating system about permissions or access rights that each user or + group has to specific system objects, such as directories or files. Each + object has a unique security attribute that identifies users who have + access to it. The ACL lists each object and user access privileges such as + read, write or execute. +
+ <indexterm><primary>Access Control List (ACL)</primary><secondary> + how they work</secondary></indexterm>How ACLs Work + Implementing ACLs varies between operating systems. Systems that + support the Portable Operating System Interface (POSIX) family of + standards share a simple yet powerful file system permission model, + which should be well-known to the Linux/UNIX administrator. ACLs add + finer-grained permissions to this model, allowing for more complicated + permission schemes. For a detailed explanation of ACLs on a Linux + operating system, refer to the SUSE Labs article + + Posix Access Control Lists on Linux. + We have implemented ACLs according to this model. The Lustre + software works with the standard Linux ACL tools, setfacl, getfacl, and + the historical chacl, normally installed with the ACL package. - ACL support is a system-range feature, meaning that all clients have ACL enabled or not. You cannot specify which clients should enable ACL. + ACL support is a system-range feature, meaning that all clients + have ACL enabled or not. You cannot specify which clients should + enable ACL.
-
- <indexterm> - <primary>Access Control List (ACL)</primary> - <secondary>using</secondary> - </indexterm>Using ACLs with the Lustre Software - POSIX Access Control Lists (ACLs) can be used with the Lustre software. An ACL consists - of file entries representing permissions based on standard POSIX file system object - permissions that define three classes of user (owner, group and other). Each class is - associated with a set of permissions [read (r), write (w) and execute (x)]. +
+ <indexterm> + <primary>Access Control List (ACL)</primary> + <secondary>using</secondary> + </indexterm>Using ACLs with the Lustre Software + POSIX Access Control Lists (ACLs) can be used with the Lustre + software. An ACL consists of file entries representing permissions based + on standard POSIX file system object permissions that define three + classes of user (owner, group and other). Each class is associated with + a set of permissions [read (r), write (w) and execute (x)]. - Owner class permissions define access privileges of the file owner. + Owner class permissions define access privileges of the file + owner. - Group class permissions define access privileges of the owning group. + Group class permissions define access privileges of the owning + group. - Other class permissions define access privileges of all users not in the owner or group class. + Other class permissions define access privileges of all users + not in the owner or group class. - The ls -l command displays the owner, group, and other class permissions in the first column of its output (for example, -rw-r- -- for a regular file with read and write access for the owner class, read access for the group class, and no access for others). - Minimal ACLs have three entries. Extended ACLs have more than the three entries. Extended ACLs also contain a mask entry and may contain any number of named user and named group entries. - The MDS needs to be configured to enable ACLs. Use --mountfsoptions to enable ACLs when creating your configuration: + The ls -l command displays the owner, group, and + other class permissions in the first column of its output (for example, + -rw-r- -- for a regular file with read and write + access for the owner class, read access for the group class, and no + access for others). + Minimal ACLs have three entries. Extended ACLs have more than the + three entries. Extended ACLs also contain a mask entry and may contain + any number of named user and named group entries. + The MDS needs to be configured to enable ACLs. Use + --mountfsoptions to enable ACLs when creating your + configuration: $ mkfs.lustre --fsname spfs --mountfsoptions=acl --mdt -mgs /dev/sda - Alternately, you can enable ACLs at run time by using the --acl option with mkfs.lustre: + Alternately, you can enable ACLs at run time by using the + --acl option with mkfs.lustre: + $ mount -t lustre -o acl /dev/sda /mnt/mdt To check ACLs on the MDS: $ lctl get_param -n mdc.home-MDT0000-mdc-*.connect_flags | grep acl acl To mount the client with no ACLs: $ mount -t lustre -o noacl ibmds2@o2ib:/home /home - ACLs are enabled in a Lustre file system on a system-wide basis; either all clients - enable ACLs or none do. Activating ACLs is controlled by MDS mount options - acl / noacl (enable/disable ACLs). Client-side mount - options acl/noacl are ignored. You do not need to change the client configuration, and the - 'acl' string will not appear in the client /etc/mtab. The client acl mount option - is no longer needed. If a client is mounted with that option, then this message appears in - the MDS syslog: + ACLs are enabled in a Lustre file system on a system-wide basis; + either all clients enable ACLs or none do. Activating ACLs is controlled + by MDS mount options acl / noacl + (enable/disable ACLs). Client-side mount options acl/noacl are ignored. + You do not need to change the client configuration, and the + 'acl' string will not appear in the client /etc/mtab. The + client acl mount option is no longer needed. If a client is mounted with + that option, then this message appears in the MDS syslog: ...MDS requires ACL support but client does not - The message is harmless but indicates a configuration issue, which should be corrected. - If ACLs are not enabled on the MDS, then any attempts to reference an ACL on a client return an Operation not supported error. + The message is harmless but indicates a configuration issue, which + should be corrected. + If ACLs are not enabled on the MDS, then any attempts to reference + an ACL on a client return an Operation not supported error.
-
- <indexterm><primary>Access Control List (ACL)</primary><secondary>examples</secondary></indexterm>Examples - These examples are taken directly from the POSIX paper referenced above. ACLs on a Lustre file system work exactly like ACLs on any Linux file system. They are manipulated with the standard tools in the standard manner. Below, we create a directory and allow a specific user access. +
+ <indexterm> + <primary>Access Control List (ACL)</primary> + <secondary>examples</secondary> + </indexterm>Examples + These examples are taken directly from the POSIX paper referenced + above. ACLs on a Lustre file system work exactly like ACLs on any Linux + file system. They are manipulated with the standard tools in the + standard manner. Below, we create a directory and allow a specific user + access. [root@client lustre]# umask 027 [root@client lustre]# mkdir rain [root@client lustre]# ls -ld rain @@ -96,90 +131,139 @@ mask::rwx other::---
-
- <indexterm><primary>root squash</primary></indexterm>Using Root Squash - Root squash is a security feature which restricts super-user access rights to a Lustre - file system. Without the root squash feature enabled, Lustre file system users on untrusted - clients could access or modify files owned by root on the file system, including deleting - them. Using the root squash feature restricts file access/modifications as the root user to - only the specified clients. Note, however, that this does not prevent - users on insecure clients from accessing files owned by other - users. - The root squash feature works by re-mapping the user ID (UID) and group ID (GID) of the - root user to a UID and GID specified by the system administrator, via the Lustre configuration - management server (MGS). The root squash feature also enables the Lustre file system - administrator to specify a set of client for which UID/GID re-mapping does not apply. -
- <indexterm><primary>root squash</primary><secondary>configuring</secondary></indexterm>Configuring Root Squash - Root squash functionality is managed by two configuration parameters, root_squash and nosquash_nids. +
+ <indexterm> + <primary>root squash</primary> + </indexterm>Using Root Squash + Root squash is a security feature which restricts super-user access + rights to a Lustre file system. Without the root squash feature enabled, + Lustre file system users on untrusted clients could access or modify files + owned by root on the file system, including deleting them. Using the root + squash feature restricts file access/modifications as the root user to + only the specified clients. Note, however, that this does + not prevent users on insecure clients from accessing + files owned by other users. + The root squash feature works by re-mapping the user ID (UID) and + group ID (GID) of the root user to a UID and GID specified by the system + administrator, via the Lustre configuration management server (MGS). The + root squash feature also enables the Lustre file system administrator to + specify a set of client for which UID/GID re-mapping does not apply. + +
+ <indexterm> + <primary>root squash</primary> + <secondary>configuring</secondary> + </indexterm>Configuring Root Squash + Root squash functionality is managed by two configuration + parameters, root_squash and + nosquash_nids. - The root_squash parameter specifies the UID and GID with which the root user accesses the Lustre file system. + The root_squash parameter specifies the UID + and GID with which the root user accesses the Lustre file system. + - The nosquash_nids parameter specifies the set of clients to which root squash does not apply. LNet NID range syntax is used for this parameter (see the NID range syntax rules described in ). For example: + The nosquash_nids parameter specifies the set + of clients to which root squash does not apply. LNet NID range + syntax is used for this parameter (see the NID range syntax rules + described in ). For + example: nosquash_nids=172.16.245.[0-255/2]@tcp - In this example, root squash does not apply to TCP clients on subnet 172.16.245.0 that have an even number as the last component of their IP address. + In this example, root squash does not apply to TCP clients on subnet + 172.16.245.0 that have an even number as the last component of their IP + address.
-
- <indexterm><primary>root squash</primary><secondary>enabling</secondary></indexterm>Enabling and Tuning Root Squash - The default value for nosquash_nids is NULL, which means that root squashing applies to all clients. Setting the root squash UID and GID to 0 turns root squash off. - Root squash parameters can be set when the MDT is created (mkfs.lustre --mdt). For example: +
+ <indexterm> + <primary>root squash</primary><secondary>enabling</secondary> + </indexterm>Enabling and Tuning Root Squash + The default value for nosquash_nids is NULL, + which means that root squashing applies to all clients. Setting the root + squash UID and GID to 0 turns root squash off. + Root squash parameters can be set when the MDT is created + (mkfs.lustre --mdt). For example: mds# mkfs.lustre --reformat --fsname=testfs --mdt --mgs \ --param "mdt.root_squash=500:501" \ --param "mdt.nosquash_nids='0@elan1 192.168.1.[10,11]'" /dev/sda1 - Root squash parameters can also be changed on an unmounted device with tunefs.lustre. For example: + Root squash parameters can also be changed on an unmounted device + with tunefs.lustre. For example: tunefs.lustre --param "mdt.root_squash=65534:65534" \ --param "mdt.nosquash_nids=192.168.0.13@tcp0" /dev/sda1 - Root squash parameters can also be changed with the lctl conf_param command. For example: + Root squash parameters can also be changed with the + lctl conf_param command. For example: mgs# lctl conf_param testfs.mdt.root_squash="1000:101" mgs# lctl conf_param testfs.mdt.nosquash_nids="*@tcp" When using the lctl conf_param command, keep in mind: - lctl conf_param must be run on a live MGS + lctl conf_param must be run on a live MGS + - lctl conf_param causes the parameter to change on all MDSs + lctl conf_param causes the parameter to + change on all MDSs - lctl conf_param is to be used once per a parameter + lctl conf_param is to be used once per a + parameter - The nosquash_nids list can be cleared with: + The nosquash_nids list can be cleared with: + mgs# lctl conf_param testfs.mdt.nosquash_nids="NONE" - OR - mgs# lctl conf_param testfs.mdt.nosquash_nids="clear" - If the nosquash_nids value consists of several NID ranges (e.g. 0@elan, 1@elan1), the list of NID ranges must be quoted with single (') or double ('') quotation marks. List elements must be separated with a space. For example: + If the nosquash_nids value consists of several + NID ranges (e.g. 0@elan, 1@elan1), + the list of NID ranges must be quoted with single (') or double + ('') quotation marks. List elements must be separated with a + space. For example: mds# mkfs.lustre ... --param "mdt.nosquash_nids='0@elan1 1@elan2'" /dev/sda1 lctl conf_param testfs.mdt.nosquash_nids="24@elan 15@elan1" These are examples of incorrect syntax: mds# mkfs.lustre ... --param "mdt.nosquash_nids=0@elan1 1@elan2" /dev/sda1 lctl conf_param testfs.mdt.nosquash_nids=24@elan 15@elan1 - To check root squash parameters, use the lctl get_param command: + To check root squash parameters, use the lctl get_param command: + mds# lctl get_param mdt.testfs-MDT0000.root_squash lctl get_param mdt.*.nosquash_nids An empty nosquash_nids list is reported as NONE.
-
- <indexterm><primary>root squash</primary><secondary>tips</secondary></indexterm>Tips on Using Root Squash - Lustre configuration management limits root squash in several ways. +
+ <indexterm> + <primary>root squash</primary> + <secondary>tips</secondary> + </indexterm>Tips on Using Root Squash + Lustre configuration management limits root squash in several ways. + - The lctl conf_param value overwrites the parameter's previous value. If the new value uses an incorrect syntax, then the system continues with the old parameters and the previously-correct value is lost on remount. That is, be careful doing root squash tuning. + The lctl conf_param value overwrites the + parameter's previous value. If the new value uses an incorrect + syntax, then the system continues with the old parameters and the + previously-correct value is lost on remount. That is, be careful + doing root squash tuning. - mkfs.lustre and tunefs.lustre do not perform parameter syntax checking. If the root squash parameters are incorrect, they are ignored on mount and the default values are used instead. + mkfs.lustre and + tunefs.lustre do not perform parameter syntax + checking. If the root squash parameters are incorrect, they are + ignored on mount and the default values are used instead. - Root squash parameters are parsed with rigorous syntax checking. The root_squash parameter should be specified as <decnum>:<decnum>. The nosquash_nids parameter should follow LNet NID range list syntax. + Root squash parameters are parsed with rigorous syntax checking. + The root_squash parameter should be specified as + <decnum>:<decnum>. The + nosquash_nids parameter should follow LNet NID + range list syntax. LNet NID range syntax: @@ -201,7 +285,13 @@ lctl get_param mdt.*.nosquash_nids | "ra" | "elan" <number> :== <nonnegative decimal> | <hexadecimal> - For networks using numeric addresses (e.g. elan), the address range must be specified in the <numaddr_range> syntax. For networks using IP addresses, the address range must be in the <ipaddr_range>. For example, if elan is using numeric addresses, 1.2.3.4@elan is incorrect. + For networks using numeric addresses (e.g. elan), the address + range must be specified in the + <numaddr_range> syntax. For networks using + IP addresses, the address range must be in the + <ipaddr_range>. For example, if elan is using + numeric addresses, 1.2.3.4@elan is incorrect. +
-- 1.8.3.1