[要約] RFC 8275は、NFSv4のアクセス制御エントリーがumaskを上書きできるようにするためのものです。目的は、ファイルのアクセス制御を柔軟に設定することです。

Internet Engineering Task Force (IETF)                         J. Fields
Request for Comments: 8275                                A. Gruenbacher
Category: Standards Track                                        Red Hat
ISSN: 2070-1721                                            December 2017
        

Allowing Inheritable NFSv4 Access Control Entries to Override the Umask

継承可能なNFSv4アクセス制御エントリによるUmaskの上書きを許可する

Abstract

概要

In many environments, inheritable NFSv4 Access Control Entries (ACEs) can be rendered ineffective by the application of the per-process file mode creation mask (umask). This can be addressed by transmitting the umask and create mode as separate pieces of data, allowing the server to make more intelligent decisions about the permissions to set on new files. This document proposes a protocol extension to accomplish that.

多くの環境では、継承可能なNFSv4アクセス制御エントリ(ACE)は、プロセスごとのファイルモード作成マスク(umask)を適用することによって無効にできます。これは、umaskと作成モードを別々のデータとして送信することで対処できます。これにより、サーバーは、新しいファイルに設定する権限についてよりインテリジェントな決定を行うことができます。このドキュメントでは、それを実現するためのプロトコル拡張を提案します。

Status of This Memo

本文書の状態

This is an Internet Standards Track document.

これはInternet Standards Trackドキュメントです。

This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 7841.

このドキュメントは、IETF(Internet Engineering Task Force)の製品です。これは、IETFコミュニティのコンセンサスを表しています。公開レビューを受け、インターネットエンジニアリングステアリンググループ(IESG)による公開が承認されました。インターネット標準の詳細については、RFC 7841のセクション2をご覧ください。

Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at https://www.rfc-editor.org/info/rfc8275.

このドキュメントの現在のステータス、正誤表、およびフィードバックの提供方法に関する情報は、https://www.rfc-editor.org/info/rfc8275で入手できます。

Copyright Notice

著作権表示

Copyright (c) 2017 IETF Trust and the persons identified as the document authors. All rights reserved.

Copyright(c)2017 IETF Trustおよびドキュメントの作成者として識別された人物。全著作権所有。

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.

この文書は、BCP 78およびIETF文書に関するIETFトラストの法的規定(https://trustee.ietf.org/license-info)の対象であり、この文書の発行日に有効です。これらのドキュメントは、このドキュメントに関するあなたの権利と制限について説明しているため、注意深く確認してください。このドキュメントから抽出されたコードコンポーネントには、Trust Legal Provisionsのセクション4.eに記載されているSimplified BSD Licenseのテキストが含まれている必要があり、Simplified BSD Licenseに記載されているように保証なしで提供されます。

Table of Contents

目次

   1.  Problem Statement . . . . . . . . . . . . . . . . . . . . . .   2
   2.  Conventions Used in This Document . . . . . . . . . . . . . .   3
   3.  Protocol Extension Considerations . . . . . . . . . . . . . .   3
   4.  XDR Extraction  . . . . . . . . . . . . . . . . . . . . . . .   3
   5.  The mode_umask Attribute  . . . . . . . . . . . . . . . . . .   4
   6.  Security Considerations . . . . . . . . . . . . . . . . . . .   5
   7.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   5
   8.  References  . . . . . . . . . . . . . . . . . . . . . . . . .   5
     8.1.  Normative References  . . . . . . . . . . . . . . . . . .   5
     8.2.  Informative References  . . . . . . . . . . . . . . . . .   6
   Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . .   7
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .   7
        
1. Problem Statement
1. 問題文

On Unix-like systems, each process is associated with a file mode creation mask (umask). The umask specifies which permissions must be turned off when creating new file system objects.

Unixライクなシステムでは、各プロセスはファイルモード作成マスク(umask)に関連付けられています。 umaskは、新しいファイルシステムオブジェクトを作成するときにオフにする必要がある権限を指定します。

When applying the mode, Section 6.4.1.1 of [RFC7530] recommends that servers SHOULD restrict permissions granted to any user or group named in the Access Control List (ACL) to be no more than the permissions granted by the MODE4_RGRP, MODE4_WGRP, and MODE4_XGRP bits. Servers aiming to provide clients with Unix-like chmod behavior may also be motivated by the same requirements in [SUSv4]. (See the discussion of additional and alternate access control mechanisms in "File Permissions", Section 4.4 of [SUSv4].)

モードを適用する場合、[RFC7530]のセクション6.4.1.1は、サーバーがアクセス制御リスト(ACL)で指定されたユーザーまたはグループに付与されるアクセス許可を、MODE4_RGRP、MODE4_WGRP、およびMODE4_XGRPによって付与されるアクセス許可以下に制限することを推奨しますビット。クライアントにUnixライクなchmod動作を提供することを目的とするサーバーも、[SUSv4]の同じ要件によって動機付けされる場合があります。 ([SUSv4]のセクション4.4「ファイルアクセス許可」の追加および代替アクセス制御メカニズムの説明を参照してください。)

On many existing installations, all ordinary users use the same effective group ID by default. To prevent granting all users full access to each other's files, such installations usually default to a umask with very restrictive permissions. As a result, inherited ACL entries (inheritable ACEs) describing the permissions to be granted to named users and groups are often ignored. This makes inheritable ACEs useless in some common cases.

多くの既存のインストールでは、すべての一般ユーザーがデフォルトで同じ実効グループIDを使用します。すべてのユーザーに互いのファイルへのフルアクセスを許可しないようにするために、そのようなインストールでは通常、非常に制限されたアクセス許可を持つumaskがデフォルトで使用されます。その結果、指定されたユーザーおよびグループに付与されるアクセス許可を記述する継承されたACLエントリ(継承可能なACE)は、多くの場合無視されます。これにより、継承可能なACEが一部の一般的なケースで役に立たなくなります。

Linux solves this problem on local file systems by ignoring the umask whenever a newly created file inherits ACEs from its parent; see [LinuxACL].

Linuxは、新しく作成されたファイルがその親からACEを継承するたびにumaskを無視することにより、ローカルファイルシステムでこの問題を解決します。 [LinuxACL]を参照してください。

The same solution should work for NFS. However, the NFSv4 protocol does not currently give the client a way to transmit the umask of the process opening a file. And clients have no way of atomically checking for inheritable permissions and applying the umask only when necessary. As a result, the server receives an OPEN with a mode attribute that already has the umask applied.

同じソリューションがNFSでも機能するはずです。ただし、NFSv4プロトコルは現在、クライアントがファイルを開くプロセスのumaskを送信する方法を提供していません。また、クライアントには、継承可能なアクセス許可をアトミックにチェックし、必要な場合にのみumaskを適用する方法がありません。その結果、サーバーは、すでにumaskが適用されているモード属性を持つOPENを受け取ります。

This document solves the problem by defining a new attribute that allows the client to transmit umask and the mode specified at file creation separately, allowing the client to ignore the umask in the presence of inheritable ACEs. At least in the Linux case, this allows NFSv4 to provide the same semantics available using local access.

このドキュメントでは、クライアントがumaskとファイル作成時に指定されたモードを個別に送信できるようにする新しい属性を定義することで問題を解決し、継承可能なACEの存在下でクライアントがumaskを無視できるようにします。少なくともLinuxの場合、これにより、NFSv4はローカルアクセスを使用して利用可能な同じセマンティクスを提供できます。

2. Conventions Used in This Document
2. このドキュメントで使用される規則

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

キーワード「MUST」、「MUST NOT」、「REQUIRED」、「SHALL」、「SHALL NOT」、「SHOULD」、「SHOULD NOT」、「RECOMMENDED」、「NOT RECOMMENDED」、「MAY」、「OPTIONALこのドキュメントの「」は、BCP 14 [RFC2119] [RFC8174]で説明されているように解釈されます。

3. Protocol Extension Considerations
3. プロトコル拡張の考慮事項

This document presents an extension to minor version 2 of the NFSv4 protocol as described in [RFC8178]. It describes a new OPTIONAL feature. NFSv4.2 servers and clients implemented without knowledge of this extension will continue to interoperate with clients and servers that are aware of the extension (whether or not they support it).

このドキュメントは、[RFC8178]で説明されているように、NFSv4プロトコルのマイナーバージョン2への拡張を提示します。新しいOPTIONAL機能について説明します。この拡張機能の知識なしで実装されたNFSv4.2サーバーとクライアントは、拡張機能を認識しているクライアントとサーバーと相互運用し続けます(サポートするかどうかに関係なく)。

Note that [RFC7862] does not define NFSv4.2 as non-extensible, so [RFC8178] treats it as an extensible minor version. This Standards Track RFC extends NFSv4.2 but does not update [RFC7862] or [RFC7863].

[RFC7862]はNFSv4.2を非拡張可能として定義していないため、[RFC8178]はそれを拡張可能なマイナーバージョンとして扱います。このStandards Track RFCはNFSv4.2を拡張しますが、[RFC7862]または[RFC7863]を更新しません。

4. XDR Extraction
4. XDR抽出

The additional lines of External Data Representation (XDR) [RFC4506] description embedded in this document can be extracted by feeding this document into the following shell script:

このドキュメントに埋め込まれている外部データ表現(XDR)[RFC4506]の説明の追加行は、このドキュメントを次のシェルスクリプトに入力することで抽出できます。

<CODE BEGINS>

<コード開始>

   #!/bin/sh
   grep '^ *///' $* | sed 's?^ */// ??' | sed 's?^ *///$??'
        

<CODE ENDS>

<コード終了>

That is, if the above script is stored in a file called "extract.sh", and this document is in a file called "umask.txt", then the reader can do:

つまり、上記のスクリプトが「extract.sh」というファイルに保存されていて、このドキュメントが「umask.txt」というファイルにある場合、読者は次のことを実行できます。

sh extract.sh < umask.txt > umask.x The effect of the script is to remove leading white space from each line, plus a sentinel sequence of "///".

sh extract.sh <umask.txt> umask.xスクリプトの効果は、各行から先頭の空白と、 "///"のセンチネルシーケンスを削除することです。

Once that extraction is done, these added lines need to be inserted into an appropriate base XDR of the generated XDR from [RFC7863] together with XDR from any additional extensions to be recognized by the implementation. This will result in a ready-to-compile XDR file.

その抽出が完了したら、これらの追加された行を、[RFC7863]から生成されたXDRの適切なベースXDRに、実装によって認識される追加の拡張機能からのXDRとともに挿入する必要があります。これにより、コンパイル可能なXDRファイルが生成されます。

5. The mode_umask Attribute
5. mode_umask属性

<CODE BEGINS>

<コード開始>

   ///   struct mode_umask4 {
   ///     mode4  mu_mode;
   ///     mode4  mu_umask;
   ///   };
   ///
   ///   %/*
   ///   % * New For UMASK
   ///   % */
   ///   const FATTR4_MODE_UMASK         = 81;
        

<CODE ENDS>

<コード終了>

           +------------+----+-------------+-----+------------+
           | Name       | Id | Data Type   | Acc | Defined in |
           +------------+----+-------------+-----+------------+
           | mode_umask | 81 | mode_umask4 | W   | Section 5  |
           +------------+----+-------------+-----+------------+
        

Table 1

表1

The NFSv4.2 mode_umask attribute is based on the umask and on the mode bits specified at open time, which together determine the mode of a newly created UNIX file. Only the nine low-order mode4 bits of mu_umask are defined. A server MUST return NFS4ERR_INVAL if bits other than those nine are set.

NFSv4.2のmode_umask属性は、新しく作成されたUNIXファイルのモードを決定する、オープン時に指定されたumaskとモードビットに基づいています。 mu_umaskの下位9モード4ビットのみが定義されています。これらの9つ以外のビットが設定されている場合、サーバーはNFS4ERR_INVALを返す必要があります。

The mode_umask attribute is only meaningful for operations that create objects (CREATE and OPEN); in other operations that take fattr4 arguments, the server MUST reject it with NFS4ERR_INVAL.

mode_umask属性は、オブジェクトを作成する操作(CREATEおよびOPEN)に対してのみ意味があります。 fattr4引数を取る他の操作では、サーバーはNFS4ERR_INVALでそれを拒否する必要があります。

The server MUST return NFS4ERR_INVAL if the client attempts to set both mode and mode_umask in the same operation.

クライアントが同じ操作でmodeとmode_umaskの両方を設定しようとした場合、サーバーはNFS4ERR_INVALを返さなければなりません(MUST)。

When the server supports the mode_umask attribute, a client creating a file should use mode_umask in place of mode, with mu_mode set to the unmodified mode provided by the user and mu_umask set to the umask of the requesting process.

サーバーがmode_umask属性をサポートしている場合、ファイルを作成するクライアントは、modeの代わりにmode_umaskを使用する必要があります。mu_modeはユーザーが提供する変更されていないモードに設定され、mu_umaskは要求プロセスのumaskに設定されます。

The server then uses mode_umask as follows:

次に、サーバーはmode_umaskを次のように使用します。

o On a server that supports ACL attributes, if an object inherits any ACEs from its parent directory, mu_mode SHOULD be used and mu_umask ignored.

o ACL属性をサポートするサーバーでは、オブジェクトがその親ディレクトリからACEを継承する場合、mu_modeを使用して(SHOULD)、mu_umaskを無視してください。

o Otherwise, mu_umask MUST be used to limit the mode: all bits in the mode that are set in the unmask MUST be turned off; the mode assigned to the new object becomes (mu_mode & ~mu_umask) instead.

o それ以外の場合は、mu_umaskを使用してモードを制限する必要があります。unmaskで設定されているモードのすべてのビットをオフにする必要があります。新しいオブジェクトに割り当てられたモードは、代わりに(mu_mode&〜mu_umask)になります。

6. Security Considerations
6. セキュリティに関する考慮事項

The mode_umask attribute shifts to the server the decision about when to apply the umask. Because the server MUST apply the umask if there are no inheritable permissions, the traditional semantics are preserved in the absence of a permission inheritance mechanism. The only relaxation of permissions comes in the case in which servers follow the recommendation that they ignore the umask in the presence of inheritable permissions.

mode_umask属性は、u​​maskをいつ適用するかについての決定をサーバーにシフトします。継承可能なアクセス許可がない場合、サーバーはumaskを適用する必要があるため、アクセス許可の継承メカニズムがない場合でも、従来のセマンティクスは保持されます。アクセス許可の緩和は、サーバーが継承可能なアクセス許可の存在下でumaskを無視するという推奨に従う場合にのみ発生します。

The practice of ignoring the umask when there are inheritable permissions in the form of a "POSIX" default ACL is of long standing and has not given rise to security issues. The "POSIX" default ACL mechanism and the mechanism for permission inheritance in NFSv4 are equivalent from a security perspective.

「POSIX」のデフォルトACLの形式で継承可能なアクセス許可がある場合にumaskを無視する慣習は、長年にわたり、セキュリティの問題を引き起こしていません。 「POSIX」のデフォルトACLメカニズムとNFSv4での権限継承のメカニズムは、セキュリティの観点からは同等です。

7. IANA Considerations
7. IANAに関する考慮事項

This document does not require any IANA actions.

このドキュメントでは、IANAアクションは必要ありません。

8. References
8. 参考文献
8.1. Normative References
8.1. 引用文献

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, <https://www.rfc-editor.org/info/rfc2119>.

[RFC2119] Bradner、S。、「要件レベルを示すためにRFCで使用するキーワード」、BCP 14、RFC 2119、DOI 10.17487 / RFC2119、1997年3月、<https://www.rfc-editor.org/info/ rfc2119>。

[RFC4506] Eisler, M., Ed., "XDR: External Data Representation Standard", STD 67, RFC 4506, DOI 10.17487/RFC4506, May 2006, <https://www.rfc-editor.org/info/rfc4506>.

[RFC4506] Eisler、M。、編、「XDR:外部データ表現標準」、STD 67、RFC 4506、DOI 10.17487 / RFC4506、2006年5月、<https://www.rfc-editor.org/info/rfc4506 >。

[RFC7530] Haynes, T., Ed. and D. Noveck, Ed., "Network File System (NFS) Version 4 Protocol", RFC 7530, DOI 10.17487/RFC7530, March 2015, <https://www.rfc-editor.org/info/rfc7530>.

[RFC7530]ヘインズ、T。、エド。およびD. Noveck編、「Network File System(NFS)Version 4 Protocol」、RFC 7530、DOI 10.17487 / RFC7530、2015年3月、<https://www.rfc-editor.org/info/rfc7530>。

[RFC7862] Haynes, T., "Network File System (NFS) Version 4 Minor Version 2 Protocol", RFC 7862, DOI 10.17487/RFC7862, November 2016, <https://www.rfc-editor.org/info/rfc7862>.

[RFC7862]ヘインズ、T。、「ネットワークファイルシステム(NFS)バージョン4マイナーバージョン2プロトコル」、RFC 7862、DOI 10.17487 / RFC7862、2016年11月、<https://www.rfc-editor.org/info/rfc7862 >。

[RFC7863] Haynes, T., "Network File System (NFS) Version 4 Minor Version 2 External Data Representation Standard (XDR) Description", RFC 7863, DOI 10.17487/RFC7863, November 2016, <https://www.rfc-editor.org/info/rfc7863>.

[RFC7863]ヘインズ、T。、「ネットワークファイルシステム(NFS)バージョン4マイナーバージョン2外部データ表現標準(XDR)の説明」、RFC 7863、DOI 10.17487 / RFC7863、2016年11月、<https://www.rfc- editor.org/info/rfc7863>。

[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, <https://www.rfc-editor.org/info/rfc8174>.

[RFC8174] Leiba、B。、「RFC 2119キーワードの大文字と小文字のあいまいさ」、BCP 14、RFC 8174、DOI 10.17487 / RFC8174、2017年5月、<https://www.rfc-editor.org/info/ rfc8174>。

[RFC8178] Noveck, D., "Rules for NFSv4 Extensions and Minor Versions", RFC 8178, DOI 10.17487/RFC8178, July 2017, <https://www.rfc-editor.org/info/rfc8178>.

[RFC8178] Noveck、D。、「Rules for NFSv4 Extensions and Minor Versions」、RFC 8178、DOI 10.17487 / RFC8178、2017年7月、<https://www.rfc-editor.org/info/rfc8178>。

8.2. Informative References
8.2. 参考引用

[LinuxACL] Gruenbacher, A., "ACL(5) - Access Control Lists", Linux man pages online, ACL(5), March 2002, <http://kernel.org/doc/man-pages/online/pages/man5/ acl.5.html>.

[LinuxACL] Gruenbacher、A。、「ACL(5)-アクセス制御リスト」、Linuxマニュアルページオンライン、ACL(5)、2002年3月、<http://kernel.org/doc/man-pages/online/pages / man5 / acl.5.html>。

[SUSv4] The Open Group, "Single UNIX Specification, Version 4", 2013.

[SUSv4] The Open Group、「Single UNIX Specification、Version 4」、2013。

Acknowledgments

謝辞

Thanks to Trond Myklebust and Dave Noveck for their review and the suggestion to define this as a (mode, umask) pair rather than just umask. Thanks to Warren Kumari, Adam Roach, Spencer Dawkins, Mike Kupfer, and Thomas Haynes for their review and to Thomas Haynes for help with XDR.

Trond MyklebustとDave Noveckのレビューと、これを単なるumaskではなく(mode、umask)ペアとして定義するように提案してくれたことに感謝します。 Warren Kumari、Adam Roach、Spencer Dawkins、Mike Kupfer、Thomas Haynesのレビュー、Thomas HaynesのXDRのサポートに感謝します。

Authors' Addresses

著者のアドレス

J. Bruce Fields Red Hat, Inc.

J.ブルースフィールズRed Hat、Inc.

   Email: bfields@redhat.com
        

Andreas Gruenbacher Red Hat, Inc.

Andreas Gruenbacher Red Hat、Inc.

   Email: agruenba@redhat.com