Re: [nfsv4] I-D Action: draft-ietf-nfsv4-integrity-measurement-02.txt

Chuck Lever <chucklever@gmail.com> Mon, 08 October 2018 19:50 UTC

Return-Path: <chucklever@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 7B110130F67 for <nfsv4@ietfa.amsl.com>; Mon, 8 Oct 2018 12:50:18 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-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 SwRqyB5G6FlQ for <nfsv4@ietfa.amsl.com>; Mon, 8 Oct 2018 12:50:15 -0700 (PDT)
Received: from mail-it1-x129.google.com (mail-it1-x129.google.com [IPv6:2607:f8b0:4864:20::129]) (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 3DECE130F49 for <nfsv4@ietf.org>; Mon, 8 Oct 2018 12:50:15 -0700 (PDT)
Received: by mail-it1-x129.google.com with SMTP id p64-v6so13684796itp.0 for <nfsv4@ietf.org>; Mon, 08 Oct 2018 12:50:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=6GxfuXU3JAy9oDUNJhrWAfJWR0dWEwcUXXEQkhfsnWQ=; b=ufn9WbOXRyifwtiVPR5otkNgbQsrAt4xOR+53Z4lESoIBLZD2CWjIHVMwL1SeeqL+m VRsxsS6CrIPYPrg86g0Q21OHynu9kv+6j48Y/CWr7A6+VvOJSgPufwdu+zIWZv7hYp6z uP1ESx/tvqg+px/TXj4creTtH2crChwF2mZ8VCg0h0RbKyLRpxKUg31sj8Kzv4QzG8e4 qoiDH+fhVBhmFKcw4Rj0j0y08yeivev4TBKuc/Z0U2Da1CAP+KeDcj7mIYl4THqR6Vgk 19/OtbU/NtCfRmVnKQHCmrwrgNCxGhS7p4t2rnLtBiSG6ZSdaSEYaRsFsRRZ21rA5/R+ tqDA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=6GxfuXU3JAy9oDUNJhrWAfJWR0dWEwcUXXEQkhfsnWQ=; b=sXNrbzGXGV4MiHwYHmmf9CJ2DdbW3hUrxfU1SCUV1L8uv+NNEa9hSNf6r9/ixYa5D9 slLmOB6xN+rYtTOyeFpIgVT6AcvYFOWf/E6C8vUmEi7PDbPHcWoiU5MUjZjBQLh/xtyV WAXgezAKgtdr1EBPbnGBTacjItSuPU0WA8w5qVj6jdYdgWF1eFdduVPaeu4oI9gFBxBC DxHTDKKr85hSau/F6ksuDWgou+Zav4Bv7OWb7Pdcy966XrNAwsn9lzByV76c1kzJRsZV OfCqCOvI/VrYErmYgnCCea9Ke3BGQmmKTqkwG5dmgdrj8N3jM/1626RBdH1nwAjwJ//w PmRQ==
X-Gm-Message-State: ABuFfohzw4ogSxqLfZydqlLJRFzbugXN+fMuOapg9l52ie2PLrju+Gsm 2OTEQT7Cn1j1Vn5xYVDP+Y/Y5uYj
X-Google-Smtp-Source: ACcGV61NHJGN3Vqte6p2dsha2QNTPx3iePFD8/zQy4Nsi0LOT82y43OJ2G7N8LnObZox1vb47eOk1A==
X-Received: by 2002:a24:da42:: with SMTP id z63-v6mr389708itg.111.1539028214417; Mon, 08 Oct 2018 12:50:14 -0700 (PDT)
Received: from anon-dhcp-171.1015granger.net (c-68-61-232-219.hsd1.mi.comcast.net. [68.61.232.219]) by smtp.gmail.com with ESMTPSA id d8sm575040itk.38.2018.10.08.12.50.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Oct 2018 12:50:13 -0700 (PDT)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\))
From: Chuck Lever <chucklever@gmail.com>
In-Reply-To: <55FF4CA0-BB68-44F1-AFAC-DD1E0F9443C2@netapp.com>
Date: Mon, 08 Oct 2018 15:50:12 -0400
Cc: "nfsv4@ietf.org" <nfsv4@ietf.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <B89BBD1B-C06B-4694-BB78-8BFE3B04EC36@gmail.com>
References: <153901060913.16390.8389561648327812120@ietfa.amsl.com> <23D33FE9-54F9-40CB-AC41-23EC15603E47@netapp.com> <BACFE07D-B843-485F-97EE-4D36ABAB356F@gmail.com> <55FF4CA0-BB68-44F1-AFAC-DD1E0F9443C2@netapp.com>
To: "Everhart, Craig" <Craig.Everhart@netapp.com>
X-Mailer: Apple Mail (2.3445.9.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/GOaZtLsOMxsfSqK0clS72UXJAL8>
Subject: Re: [nfsv4] I-D Action: draft-ietf-nfsv4-integrity-measurement-02.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, 08 Oct 2018 19:50:18 -0000


> On Oct 8, 2018, at 1:40 PM, Everhart, Craig <Craig.Everhart@netapp.com> wrote:
> 
> Hi Chuck, thanks for the quick reply.
> 
> On 10/8/18, 12:43 PM, "nfsv4 on behalf of Chuck Lever" <nfsv4-bounces@ietf.org on behalf of chucklever@gmail.com> wrote:
> 
>    Hi Craig -
> 
>> On Oct 8, 2018, at 11:48 AM, Everhart, Craig <Craig.Everhart@netapp.com> wrote:
>> 
>> In the "1. Introduction", the opaque provenance information is described as including a "keyed hash, such as an HMAC [RFC2104]" without any indication as to the management of the key information.  Must that information, also, be taken on faith?  What's the basis for this claim?  Is it required for all provenance information, or just for some?
> 
>    The Introduction describes that as "out of scope" but suggests key
>    management can be done via another distribution channel and stored
>    locally in a Trusted Platform Module.
> 
>    Section 1.1:
>       A Trusted Platform Module [TPM-SUM] can seal the key material used to
>       sign and verify file content.  Distributing and protecting such key
>       material is outside the scope of the OPTIONAL extension specified in
>       this document.
> 
> Are we talking about a keyed hash or signing/verifying the content (as in encrypting a hash)?  They're similar, but different, kinds of operations.

A TPM can be used on end-points to store public keys that can be
used for provenance assessment. This would be typical for a mobile
device using an IMA-protected root file system, for instance, or
on systems where a strong guarantee that the key material is not
tampered with is required.


>> There's an effort made in this draft to distinguish participating/non-participating clients and servers.  Because this draft really talks about only one kind of provenance information, what is to be done with clients or servers that participate in one but not all kinds of provenance information?
> 
>    The Introduction states that "participating" clients have to agree on
>    using the same provenance assessor.
> 
>    Section 1.1:
>       NFS acts as a conduit by which file provenance information and file
>       content move between storage on an NFS server and the provenance
>       assessor where that content is to be accessed.  NFS peers accessing a
>       set of shared files must all agree on the at-rest file provenance
>       information format.  The format is specified by the provenance
>       assessor and is therefore not described in this document.
> 
> So, NFS, as an interchange protocol, is not being tasked with even the little bit of interoperability necessary to identify which kind of provenance information is in use?

No it is not. FPI interoperability is handled (or not) by the
provenance assessor.


>    The document later states that provenance assessors have to be prepared
>    to encounter unrecognized provenance information.
> 
> Recognized how?

Given that the provenance assessor is responsible for interoperability,
I don't see how that question is relevant to NFS or this document.

If you have a problem with this part of the architecture, that is
really about the provenance assessment mechanism, not about the way
NFS transports the FPI. You should take that up with the IMA
community (or whomever is developing your favorite provenance
assessor).

It's outside of the IETF's purview to maintain a registry of FPI
types, especially because there are no FPI types defined by any
standards.


>    Section 5.3:
>       A provenance assessor on an NFS version 4.2 peer needs to be prepared
>       to deal with file provenance information it does not recognize or
>       cannot parse.  Typically its policy treats this case as a provenance
>       verification failure.
> 
>    Again, I'm struggling to see the purpose of deploying multiple
>    incompatible FPI schemas concurrently. Do you have something specific in
>    mind?
> 
> I bring up the issue because NFS can transit multiple storage domains.  Think of it as having multiple authentication domains.  It's the job of the communication protocol not only to deal with how the happy path works, but what happens when it isn't the happy path.

FPI is end-to-end. It doesn't matter how many different copies of
the file there are or on how many NFS servers a protected file
might have resided before an application on a client sees it. FPI
is not a local at-rest checksum. It is not replaced every time a
fresh copy of a file is written on a new server; it is copied
along with the content.

The provenance information and the content must match before the
content is used by an application or OS, end of story. The file
system, whether it is a local FS like ext4, or one that has lots
of distributed moving parts, like CephFS, does not get a say in
whether the content is usable at its end-point.


>> Apparently, the updating of file content must be done in conjunction with updating of provenance information.  What can be done to make such operations mutually atomic?
> 
>    I don't believe these "race conditions" are consequential, typically.
>    While the provenance information does not match the content, assessors
>    will prevent access to that content.
> 
>    Moreover, attaching FPI is usually a final step before content distri-
>    bution, performed separately via a tool. The tool, not the file system
>    stack, has access to the private signing key.
> 
> 
>> What's to be done with a server that wants to vet provenance information, but notices that the stored provenance information is not correct with respect to the stored file content?  Surely there are other, similar, race-like conditions.
> 
>    NFS servers do not vet the provenance information during remote access
>    of content. A provenance assessor on the server may prevent access only
>    to local accessors.
> 
>    Section 5.3:
>       Note that an NFS version 4.2 server may use a provenance assessor to
>       prevent access by local users to protected files.  To enable NFS
>       version 4.2 clients to do their own assessment, an NFS version 4.2
>       server should never prevent remote access to clients if local
>       provenance assessment fails.
> 
>    If the content and FPI are out of sync, local assessment on the server
>    prevents only local access to that content.
> 
>    Because FPI is meant to be end-to-end protection, the goal here is to
>    perform provenance assessment immediately before the content is to be
>    used. Because it is typically expensive, assessment should be done as
>    few times as needed (once?) to guarantee protection. No point in having
>    the server do it and then the client do it again.
> 
> So, finally, a piece of architecture accidentally falls out: you couldn't have the server do assessment once and for all, for all its clients, for all future uses of a file.

See above: FPI is assessed at point of use, not point of storage. No
part of the storage subsystem or file system plays any part in
provenance assessment decisions.


> You're declaring that kind of interaction to be not well-defined.  Why?

This is precisely because the file system plays no part in provenance
assessment.

If you want the server to do the assessment for all clients that access
it, there's no need to expose FPI via NFS. A trust relationship must
exist between the clients and server, of course, and there would need
to be a strong guarantee that the network between the server and clients
is of very high integrity. Perhaps the use of a GSS integrity service
would be required in such a use case.

I could weaken the statement to "a server should not prevent access to
_participating_ clients."


--
Chuck Lever
chucklever@gmail.com