Re: [nfsv4] WG Last Call for Extension and Minor Versions, Extended Attributes, and ACLs / Umask - Ends Dec 2nd 2016

David Noveck <davenoveck@gmail.com> Wed, 01 March 2017 22:19 UTC

Return-Path: <davenoveck@gmail.com>
X-Original-To: nfsv4@ietfa.amsl.com
Delivered-To: nfsv4@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 37666127ABE for <nfsv4@ietfa.amsl.com>; Wed, 1 Mar 2017 14:19:41 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.698
X-Spam-Level:
X-Spam-Status: No, score=-2.698 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nkxJ-vlF8X7f for <nfsv4@ietfa.amsl.com>; Wed, 1 Mar 2017 14:19:40 -0800 (PST)
Received: from mail-oi0-x230.google.com (mail-oi0-x230.google.com [IPv6:2607:f8b0:4003:c06::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D8B5A127071 for <nfsv4@ietf.org>; Wed, 1 Mar 2017 14:19:39 -0800 (PST)
Received: by mail-oi0-x230.google.com with SMTP id 62so30198714oih.2 for <nfsv4@ietf.org>; Wed, 01 Mar 2017 14:19:39 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Mie3nJ36aD6zG1HGMw77wMF+q+E8vVvmDfdJ2pc6KCM=; b=OHJIHpCRCOfIpEG74sdD92Jk1xNtjVORn6j6NZqcq+OKa9+pTKFf7h38T/Ma5l4D6r Tqs5Ukxm2uNSybMFsh8zW7TtcYosGmWJuyCKbeROynjQ8k48ZUpEcil1WajNrrUs6Qkv jgw6+WRaS7rF6/yhQxHNewVgGa0Un9ZmhQaxtVp7gszAvEtI/0mZtwKVfdAwtK99zwiL JSw2K0B76qDHrQByLH5nR5EAoGG4SC3CaiAU+wqQTHbBfTHqwyMbEz0glqqz6kgfdWXq 0B/XWe/0IgfjZvkURE9hNkVTEBgGlY+8e8ABizZOOXe9o+DNIJfe5ltqj+wUoWIz7l/n +KbA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Mie3nJ36aD6zG1HGMw77wMF+q+E8vVvmDfdJ2pc6KCM=; b=HeFSrXRdV9/ZA36q/zJXEw4w+tFj1nQKVIqqF7ANOgJiFw4Pm0Pyigwfo6bYXuf2QV QEwDIzj9ko2rMvJ1fwomtyJqw/P/SWlrfW6vR6xXuM1BoWM5B4Zdh7330HDO3PNhz3/H maDtejM5dkSp4hD3kjaKxq/yxeMTV9oJ2uezT9a8T3o7xIwI8Rgc0Mufu3d5r6BSD/+S ppXJ5wrP0Y+4k7Kgf52KI9bI+IrVfbIgOgjlGEphYhri/UUixxb1Fyx5ZwJdqk0QLpJo ONHIaMw0JSBntV+OxcdsSBV+kbo9a9bGvLmEAxAhIMHII23KWSt1XgddGL8dVtdKBlM0 nohg==
X-Gm-Message-State: AMke39mKog2Lt9Tev1eV52m8Myug6sHURfFRuRHCHeMCT17uK7QQrnGweJ6vpQzbp/yuv8ea2/kAF83ljQgKUA==
X-Received: by 10.202.252.136 with SMTP id a130mr5367955oii.153.1488406779149; Wed, 01 Mar 2017 14:19:39 -0800 (PST)
MIME-Version: 1.0
Received: by 10.182.137.200 with HTTP; Wed, 1 Mar 2017 14:19:38 -0800 (PST)
In-Reply-To: <20170301220138.GB9545@fieldses.org>
References: <MWHPR03MB28935C4A8AF5FCDB34B37EA6C7B80@MWHPR03MB2893.namprd03.prod.outlook.com> <MWHPR03MB289323FB62D892F442482D9CC7830@MWHPR03MB2893.namprd03.prod.outlook.com> <CADaq8jewDSJZ7p3Kbjg43z0yhSWf20HcB+e+qgY35h0YavgryA@mail.gmail.com> <CAFt6BakDsGoo56KQPV-UGcCsPd=pUzrmy+j1DkGmy-6ryrDTbg@mail.gmail.com> <CADaq8jd42_UThHThuO-co5VSrU1go=QPiEXhu=rAdx6h2SSHYg@mail.gmail.com> <20161208202952.GB26583@fieldses.org> <CADaq8je-pL0yGUvzL2r7wjSWXeWZBf3DgF5APMDKQpD2ejY16Q@mail.gmail.com> <CAFt6Ba=yyVqyt3PJ6g_brUNt+Oy931kOuNw2sXtXWLe=CrqO8Q@mail.gmail.com> <20161212213209.GA6002@fieldses.org> <20170301220138.GB9545@fieldses.org>
From: David Noveck <davenoveck@gmail.com>
Date: Wed, 01 Mar 2017 17:19:38 -0500
Message-ID: <CADaq8jfYeoYYaX2eKuObMJGBq_+TNcF45yNDi3E8evDYq6mCGA@mail.gmail.com>
To: "J. Bruce Fields" <bfields@fieldses.org>
Content-Type: multipart/alternative; boundary="001a113df2ce5a448a0549b2b5b9"
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/Z5jaZDhpKleOJEnqlKwnT25K5MI>
Cc: "J. Bruce Fields" <bfields@redhat.com>, NFSv4 <nfsv4@ietf.org>
Subject: Re: [nfsv4] WG Last Call for Extension and Minor Versions, Extended Attributes, and ACLs / Umask - Ends Dec 2nd 2016
X-BeenThere: nfsv4@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: NFSv4 Working Group <nfsv4.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/nfsv4>, <mailto:nfsv4-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/nfsv4/>
List-Post: <mailto:nfsv4@ietf.org>
List-Help: <mailto:nfsv4-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/nfsv4>, <mailto:nfsv4-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 01 Mar 2017 22:19:41 -0000

Looks good.

I have few nits that you might want to address:

> See the discussion of
>  additional and alternate access control mechanisms in section "4.4
>   File Permissions".)

You might want to add "of that document: before the closing paren.

> allows the client to transmit umask and open mode separately,

Suggest replacing "open mode" by "the mode specified at file creation"

At the end of the last paragraph, you might want to add:

This allows NFSv4 to provide the same semantics available using local
access.


On Wed, Mar 1, 2017 at 5:01 PM, J. Bruce Fields <bfields@fieldses.org>
wrote:

> On Mon, Dec 12, 2016 at 04:32:09PM -0500, J. Bruce Fields wrote:
> > On Thu, Dec 08, 2016 at 02:21:44PM -0800, spencer shepler wrote:
> > > Given how the reference is used, I would be more direct about the
> > > implementation.  As stated in the draft, this mechanism is needed for
> > > unix-like (e.g. Linux) to appropriately apply the umask logic in the
> face
> > > of an ACL implementation.  As Dave suggests, if there is a Linux man
> page
> > > with this logic captured, then quote it in the RFC and make the
> reference
> > > (quoted text could be in an appendix).  If there is concern about
> copyright
> > > (and rightfully so), then just make the general reference and it would
> be
> > > good to have more elaboration of the requirements if the I-D is not
> fully
> > > self-contained.  Would also be good to know the Solaris behavior but
> > > realistically this is being done for Linux, right?
> >
> > Right, so I think it would be enough to say "here's how we know it works
> > on Linux, other systems using mode bits and acls are likely to run into
> > the same problem".
> >
> > OK, I'll think about how to do that.
>
> As suggested, I'm removing the reference to the POSIX draft that we
> weren't sure we could give a stable reference for, and use a reference
> to the relevant Linux man page instead.
>
> I also rewrote the "Problem Statement" section to lead with the problem
> statement and logic leading to the solution instead of leading with the
> reference to the POSIX draft.
>
> Results follow.--b.
>
> 2.  Problem Statement
>
>    On Unix-like systems, each process is associated with a file mode
>    creation mask (umask), which specifies which permissions must be
>    turned off when creating new file system objects.
>
>    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 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 section "4.4
>    File Permissions".)
>
>    On many existing installations, all ordinary users by default use the
>    same effective group ID.  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 ACEs
>    describing the permissions to be granted to named users and groups
>    are often ignored.  This makes inheritable ACLs useless in some
>    common cases.
>
>    Linux solves this problem on local filesystems by ignoring the umask
>    in the case the parent of the newly-created file has inheritable
>    ACEs; see [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.
>
>    This document solves the problem by defining a new attribute which
>    allows the client to transmit umask and open mode separately,
>    allowing the client to ignore the umask in the presence of
>    inheritable ACLs.
>
> ....
>
> 7.2.  Informative References
>
>    [LinuxACL]
>               Gruenbacher, A., "ACL(5) - Access Control Lists", Linux
>               man pages section 5 ACL, March 2002.
>