Re: [nfsv4] Fwd: New Version Notification for draft-dnoveck-nfsv4-security-04.txt

"J. Bruce Fields" <bfields@fieldses.org> Mon, 17 January 2022 14:51 UTC

Return-Path: <bfields@fieldses.org>
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 AEF7D3A0139; Mon, 17 Jan 2022 06:51:45 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.1
X-Spam-Level:
X-Spam-Status: No, score=-2.1 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=fieldses.org
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 DaIdL8rIDODn; Mon, 17 Jan 2022 06:51:40 -0800 (PST)
Received: from fieldses.org (fieldses.org [IPv6:2600:3c00:e000:2f7::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id CD4F33A02C1; Mon, 17 Jan 2022 06:51:40 -0800 (PST)
Received: by fieldses.org (Postfix, from userid 2815) id C3E50A71; Mon, 17 Jan 2022 09:51:38 -0500 (EST)
DKIM-Filter: OpenDKIM Filter v2.11.0 fieldses.org C3E50A71
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fieldses.org; s=default; t=1642431098; bh=NyEy/DY6fuardwbBoTWtjDLg+uWBqyXov296ocZZvj8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=xh+ewu3h2UCTprPa7qDXDa2ahjTiT7lt3mZX93gOCfcMAv42C23f1IsxNCTtQ0rw3 4gqLrd+j5NoJdQKR+NcuPFABPHQicgOIMINE7ljSwD5uZ2JQ33YwhoGZ5HGTqPV4k5 RQ49kUfm5p5RwnshJa/YowGICalK4or/0HDz21+Y=
Date: Mon, 17 Jan 2022 09:51:38 -0500
From: "J. Bruce Fields" <bfields@fieldses.org>
To: David Noveck <davenoveck@gmail.com>
Cc: Rick Macklem <rmacklem@uoguelph.ca>, NFSv4 <nfsv4@ietf.org>, nfsv4-ads@ietf.org, nfsv4-chairs <nfsv4-chairs@ietf.org>
Message-ID: <20220117145138.GA28708@fieldses.org>
References: <164035267965.25968.10921853654415505678@ietfa.amsl.com> <CADaq8jcXitpCCA+y3u6dYxGM95rfX6UtuZTm27g=Ht6=8x3+Qw@mail.gmail.com> <YQXPR0101MB0968955CCDDFC660EE9180D1DD449@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM> <CADaq8jeitOwexgH2tq5azmCj9937SBw6e18+qrAYAFC==LhsRA@mail.gmail.com> <YQXPR0101MB09686A72FA4279392797EA36DD4F9@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM> <20220114214509.GA22366@fieldses.org> <YQXPR0101MB0968EA5EAF51A989B1AB034CDD549@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM> <CADaq8jcF=6+WB-Ai4mDJ-Xjj2qzQL6qguQtvF-fK8z18qkOKyQ@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <CADaq8jcF=6+WB-Ai4mDJ-Xjj2qzQL6qguQtvF-fK8z18qkOKyQ@mail.gmail.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/7MNIJJnHkXklFSAFZizms7ZsOGE>
Subject: Re: [nfsv4] Fwd: New Version Notification for draft-dnoveck-nfsv4-security-04.txt
X-BeenThere: nfsv4@ietf.org
X-Mailman-Version: 2.1.29
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: Mon, 17 Jan 2022 14:51:46 -0000

On Sun, Jan 16, 2022 at 04:03:12AM -0500, David Noveck wrote:
> It seems to me that, given the absence, of an append-write in the NFSv4
> protocol, APPEND_WRITE belongs in the same bucket as SYNCHRONIZE and I am
> planning to draft -05 on that basis.
> 
> Looking forward to -06, I'd like to get away from the text which makes each
> mask bit its own optional feature,. Clearly READ_DATA, WRITE _DATA, and
> EXECUTE should be mandatory but what about the others?  Should any of these
> be mandatory?  If not, why isn't it implemented? Are there
> applications/clients that rely on it?

Again, I don't agree that it's desirable to specify this level of
detail.

NFS has always been a protocol which allows exporting filesystems with
semantics that vary somewhat.

I'd recommend instead thinking hard about what's essential to do in this
document and looking for ways to reduce its scope and length.

We've got limited resources, and the attempt to produce a really
detailed synthesis of unix and Windows permissions models is an
ambitious project.

--b.

> 
> On Fri, Jan 14, 2022, 6:48 PM Rick Macklem <rmacklem@uoguelph.ca> wrote:
> 
> > J. Bruce Fields wrote:
> > > On Sun, Jan 09, 2022 at 11:15:34PM +0000, Rick Macklem wrote:
> > > > From: David Noveck wrote:
> > > > > If I understand correctly, you are intending to accept an acl that
> > APPEND_DATA and not
> > > > > WRITE_DATA  and then not let the user open the file for write.   I
> > don't know about your
> > > > > users but I would certainly feel that was a "weird, irritating
> > inconsistency".
> > > > Yes, but it is consistent with local behaviour on FreeBSD.
> > > > A file with APPEND_DATA, but not WRITE_DATA cannot be open'd with a
> > POSIX
> > > >   open("foo", O_APPEND | O_WRONLY, 0)
> > > > either locally nor over NFS.
> > > > (O_APPEND is a modifier and cannot be specified by itself.)
> > >
> > > How would an NFS client write to it, anyway?  Do you just tell people
> > > they need to use O_SYNC for such files?
> > When a file is POSIX open(...O_APPEND..)'d in FreeBSD on an NFS mount
> > point, each write is pushed through to the server (with an exclusive lock
> > held on the vnode) FILESYNC.
> > The result maintains ordering, but is very slow compared to doing the
> > same on local file systems. For a test case doing 10,000 writes, it
> > takes 13sec over NFS vs 0.3sec locally for UFS (even slower for ZFS,
> > takes 2minutes for ZFS with sync enabled and no ZIL log).
> >
> > > Otherwise writes are likely to get reordered, and then the writer gets
> > > random EACCES (and random unfillable holes, if you allow writes at
> > > offsets past EOF).  Seems like a bit of a foot-gun.
> > Yep, it forces O_SYNC basically.
> >
> > > Oh well, out of scope here, I suppose.
> > Not really. If another client writes to the file, it could still get
> > "random"
> > EACCES failures.
> > As I mentioned, the FreeBSD server stores APPEND_DATA, but ignores it.
> > I recall Robert Watson (who designed the FreeBSD NFSv4 ACL stuff)
> > stating as the reason "because it's such a pita".
> > For FreeBSD, this is also true of ZFS. (The ACL enforcing part of ZFS
> > is in the port specific code, so I don't know what Linux/Solaris does
> > w.r.t. APPEND_DATA for ZFS.)
> >
> > rick
> >
> > --b.
> >
> >