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

Chuck Lever <chuck.lever@oracle.com> Thu, 08 November 2018 16:53 UTC

Return-Path: <chuck.lever@oracle.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 0486D128BCC for <nfsv4@ietfa.amsl.com>; Thu, 8 Nov 2018 08:53:53 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.769
X-Spam-Level:
X-Spam-Status: No, score=-4.769 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.47, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, UNPARSEABLE_RELAY=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=oracle.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 8XoYr81dGpMc for <nfsv4@ietfa.amsl.com>; Thu, 8 Nov 2018 08:53:50 -0800 (PST)
Received: from aserp2120.oracle.com (aserp2120.oracle.com [141.146.126.78]) (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 D6154123FFD for <nfsv4@ietf.org>; Thu, 8 Nov 2018 08:53:49 -0800 (PST)
Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id wA8GrTL8001230; Thu, 8 Nov 2018 16:53:48 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=content-type : mime-version : subject : from : in-reply-to : date : cc : content-transfer-encoding : message-id : references : to; s=corp-2018-07-02; bh=jvjaY1FqynjHHuA4swB6D19KXaPmCQiuO5QA3q4I0g8=; b=A01aMY4d8rlYefyw4otIJgbLDQWwpOOv5p3Nxt3N9cJytTGHdBKUjI1n3nt6T6C6RPPL pMU/jffWCKxwamJd3eCk5gyQ4CxOSOWmmhnbaI62XJ8HyJFI0NcTSoXBsXoja+iUaFhF zE2yEtC1GfCGDjrg7qfqG/Wpiojm5qnyJ5oeTU1gWu+NgjazydZGuCgKZpx0I5iwDHcK FCO/x3SivuY/OJlMJUUlbi5PbvcX7yqhCVFjQcsz+b7yUCkMXoynGl2VfvMyfyaQ19Vq Me+fQ66FssAkjN7sxw+VFHJ3UgsT9e9Zt035pgiSaCpZMsjFrGAdB1Yku0VrFtslV7kX 1Q==
Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp2120.oracle.com with ESMTP id 2nh3mq2mrn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 08 Nov 2018 16:53:48 +0000
Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id wA8GrglA030707 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 8 Nov 2018 16:53:42 GMT
Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id wA8GrghT019710; Thu, 8 Nov 2018 16:53:42 GMT
Received: from anon-dhcp-171.1015granger.net (/68.61.232.219) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 08 Nov 2018 08:53:42 -0800
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\))
From: Chuck Lever <chuck.lever@oracle.com>
In-Reply-To: <578769FE-6C12-4003-A579-7FB461D99A8A@netapp.com>
Date: Thu, 08 Nov 2018 11:53:40 -0500
Cc: NFSv4 <nfsv4@ietf.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <32BFC3DE-BF20-4A3B-88AC-FAF2C19F714D@oracle.com>
References: <154160412218.26446.11676556173331817093@ietfa.amsl.com> <74E10D08-6181-49C8-B994-6554C72C4B7D@oracle.com> <BBC9F2E1-4E81-4FE4-99D0-A0B23F33AAD4@netapp.com> <D1E8642B-9A07-4812-82E0-982EDC6EF73E@oracle.com> <578769FE-6C12-4003-A579-7FB461D99A8A@netapp.com>
To: "Everhart, Craig" <Craig.Everhart@netapp.com>
X-Mailer: Apple Mail (2.3445.9.1)
X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9071 signatures=668683
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1811080143
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/I9u_HMuh2dGbVxxeAseF-y4SbC4>
Subject: Re: [nfsv4] Fwd: I-D Action: draft-ietf-nfsv4-integrity-measurement-03.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: Thu, 08 Nov 2018 16:53:53 -0000


> On Nov 8, 2018, at 11:14 AM, Everhart, Craig <Craig.Everhart@netapp.com> wrote:
> 
> Hi Chuck.   Comments in-line.
> 		Craig
> 
> On 11/8/18, 10:44 AM, "Chuck Lever" <chuck.lever@oracle.com> wrote:
> 
>    Hi Craig-
> 
>> On Nov 7, 2018, at 12:18 PM, Everhart, Craig <Craig.Everhart@netapp.com> wrote:
>> 
>> Hi Chuck,
>> 
>> Thanks for the update.
>> 
>> At the end of the introduction (1), you add "Unlike traditional integrity management schemes, the hash is not replaced every time a file is copied.  Instead, the signed checksum is copied along with file content and presented whenever the content is about to be used."  You're alluding to a practice with which I'm not familiar, even when you're describing traditional schemes.  Copied for reading or for writing?  What would have replaced the hash every time the file is copied--a storage system?  (I want to understand this so that I can understand how the mechanism that you're proposing will replace and modify the existing mechanism.)
> 
>    The traditional scheme I'm thinking of is the mechanism that
>    generates and writes a checksum during media block writes.
>    When a file is copied, each newly allocated and written block
>    gets a freshly generated checksum.
> 
>    This checksum is based on the data as presented to the storage
>    media, so it cannot protect against unwanted changes due to
>    software bugs or malicious acts during the file copy operation.
> 
> I thought that your "traditional" scheme was to refer to how "traditional provenance" schemes worked.  Referring to this internal, unexposed checksum inside a storage system as a "traditional integrity management" scheme seems to be a strained parallel.  Perhaps "Unlike an integrity management scheme based solely on file content as seen on the file storage device"?
> 
>    Unlike that scheme, FPI follows without change the file's data
>    content. Or to put it another way, FPI is copied along with
>    the file's content to its destination. 
> 
> By one of those special tools, again?  What copying mechanism will know about provenance?

Copying does require some modification of the normal menagerie
of file system utilities like cp, tar, and rsync.


>    This means _any_ change
>    to the content between the time it is generated and the time it
>    is used can be detected.
> 
> And detected by only these special tools.

No, the FPI is evaluated by the provenance assessor before each
access of the file.


>> It sounds like a hash would have been replaced whenever a file was written, but this replacement copies the hash along with file content--presumably by some client-side tool?
> 
>    Yes, when file content is updated, the FPI has to be refreshed.
>    This would be done using a tool, run on a client or on the
>    server, that is capable of re-signing the hash.
> 
>    In it's simplest form, using FPI means that protected files
>    become effectively immutable. That's exactly what we want for
>    things like executables, which change infrequently.
> 
> 
>> Down in 1.1, you likely want to add "only" immediately before the function that it most closely modifies; "NFS acts as only a conduit ..."  rather than "NFS acts only as a conduit...".  (e.g.: I'd hope that NFS acts as more than a conduit!)
>> 
>> In 4.2, can there be multiple FATTR4_FILE_PROVENANCE objects with different fpv_type values?
> 
>    Right now my opinion is that should be allowed.
> 
> The down-side is that they'd need to be enumerated, if such a system were to be backed up, for example.
> 
>> How do I enumerate them?
> 
>    There isn't an explicit mechanism to do that because I don't
>    believe that's going to be needed. The client will ask the
>    server for the particular fpv_values that the client supports.
> 
> Right, as long as it's only the special tools that do the reading.
> 
> 
>> Clearly your description of the treatment of distinct fpv_type values would suggest that there would be multiple instances.  Are there other FATTR4_xxx attributes with multiple values?
> 
>    Security Labels, but only one label can be stored at a time.
> 
> And I'd suggest that the one-at-a-time semantics is important if there's no way of doing enumeration.
> 
> 
>> It's a little odd that fpv_type is not in the fattr4 namespace, but that it represents a sub-type.  How do I specify a fpv_type to GETATTR?
> 
>    struct file_prov4 {
>            uint32_t                 fpv_type;
>            opaque                   fpv_data<>;
>    };
> 
> That's in the GETATTR reply, right--how the NFS server indicates an attribute to the NFS client.  How does an NFS client specify to the GETATTR sent from client to server that it is interested in a specific value of fpv_type and not others?  (Per my reading, GETATTR accepts only the current file handle as a parameter.)  In the security-label regime, as you say, you ask for the security attribute and get back the (only) one that is stored.  Apparently you envision a file system in which many types can be stored simultaneously.  As an NFS client, how do I indicate the fpv_type value of interest to the NFS server?
> 
>    I just copied the security label attribute. I'll have to go back
>    and look at how that works and copy that language to Section 4.3.
> 
> I suspect that it works because there's only one kind of security label.

Agree, I will have to fix this in the document.

Jury is out on one or many, so it might be a little while
before a fresh revision of the document comes along.


>> Again, how do I enumerate all the stored fpv_type values?
>> (It might be easier if there were only one possible FATTR4_FILE_PROVENANCE attribute, so that storing any fpv_type value would replace any other FATTR4_FILE_PROVENANCE attribute.
> 
>    Easier how?
> 
> Principally because you wouldn't have me asking how the existing stored fpv_type values are to be enumerated.
> 
>> Alternatively, you could allow for FATTR4_FILE_PROVENANCE_xxx values, in which the "xxx" extension semantically replaces your suggested fpv_type value.)
> 
>    That means we'd have to extend NFSv4.2 every time we add a new
>    fpv_value. If we use a subtype and an IANA registry, it becomes
>    simple to add a new value -- it does not require any change to
>    the NFSv4 protocol.
> 
> I agree.  It's a flaky idea, but it has the advantage of not requiring a new type enumeration.

--
Chuck Lever