Re: [nfsv4] AD review of draft-ietf-nfsv4-rpc-tls

Chuck Lever <chuck.lever@oracle.com> Tue, 21 April 2020 15:24 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 633C73A0E27 for <nfsv4@ietfa.amsl.com>; Tue, 21 Apr 2020 08:24:52 -0700 (PDT)
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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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 hLFXwLnlG1cF for <nfsv4@ietfa.amsl.com>; Tue, 21 Apr 2020 08:24:48 -0700 (PDT)
Received: from aserp2120.oracle.com (aserp2120.oracle.com [141.146.126.78]) by ietfa.amsl.com (Postfix) with ESMTP id B3CF83A0E41 for <nfsv4@ietf.org>; Tue, 21 Apr 2020 08:18:22 -0700 (PDT)
Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 03LFCnZL018283; Tue, 21 Apr 2020 15:15:30 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-2020-01-29; bh=nYkHWD9KlaPV4V8/lSccoLIc+jok6+6FD/xPubS0Aqo=; b=dyJG4xOYIzrusWrZfX1ioBOEX9SXDJXVlYLAPpbyc6HxbcMZ6uzX5LeQ394EvxBbC9oj qNEG5V9Yodto/hUSV+b+O6bgz0P+psRr3Gz8rVKKEIbRBFhIRPA35NTNBMXXFVmf6gI3 dHn3xaO77BQ7G/6HDkrRmVJsB0L0Q9hIYpzwQEP8xun8uLwSQZBOBJEZ4ifWBN5Smorj Q3adnowhVJXqqoEbaNMvCZ9kdTVqnMXNBP0Lt2oRy/pxRNLIF/NvE8YupzCe8RktbaOX LtjLOK181uATiC9EIgPP8m2ej026Fbv34o590K7ul2lY9/BAX9wVY1VkUSGBhvahwLOw wg==
Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by aserp2120.oracle.com with ESMTP id 30fsgkwkx6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 21 Apr 2020 15:15:30 +0000
Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 03LFCVBW147727; Tue, 21 Apr 2020 15:15:29 GMT
Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserp3020.oracle.com with ESMTP id 30gbbe2gww-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 21 Apr 2020 15:15:29 +0000
Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 03LFFSC6011013; Tue, 21 Apr 2020 15:15:28 GMT
Received: from anon-dhcp-153.1015granger.net (/68.61.232.219) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 21 Apr 2020 08:15:28 -0700
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\))
From: Chuck Lever <chuck.lever@oracle.com>
In-Reply-To: <7833b21f09aaffdb35e1a578e2a07b533002d318.camel@ericsson.com>
Date: Tue, 21 Apr 2020 11:15:25 -0400
Cc: "nfsv4@ietf.org" <nfsv4@ietf.org>, Trond Myklebust <trondmy@gmail.com>
Content-Transfer-Encoding: quoted-printable
Message-Id: <7B26B15B-DE0C-4B6C-BBB0-D8F7B00EF328@oracle.com>
References: <VI1PR0702MB3775838FD12AB8A89392C17B95C90@VI1PR0702MB3775.eurprd07.prod.outlook.com> <FA2D661E-A787-4772-8F9D-A7594AE82F38@oracle.com> <CADaq8jciLWhL_FMmPcsdrVVS=9Gee8SYAsqi36H5v9iuNo7Pgw@mail.gmail.com> <E414F060-532B-4017-AC7E-5869884B2153@oracle.com> <e5796752c6204ffdd78503b1a9c9045cfd761e52.camel@gmail.com> <F9AC44CE-750E-416A-944D-E2382524020E@oracle.com> <19d2513b1093fc71223e361afca90d1a1ad6183a.camel@gmail.com> <E8D24949-C2A3-463A-953F-FAE7F46D4D23@oracle.com> <4e7912c6c55680f50b05aaa2cdc98f59733cd5b2.camel@ericsson.com> <C89BF8F3-7F65-4995-9CDB-CC1673E01463@oracle.com> <7833b21f09aaffdb35e1a578e2a07b533002d318.camel@ericsson.com>
To: Magnus Westerlund <magnus.westerlund@ericsson.com>
X-Mailer: Apple Mail (2.3445.104.11)
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9598 signatures=668686
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 malwarescore=0 suspectscore=0 mlxlogscore=999 adultscore=0 mlxscore=0 phishscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004210120
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9598 signatures=668686
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 priorityscore=1501 lowpriorityscore=0 mlxlogscore=999 malwarescore=0 clxscore=1015 spamscore=0 bulkscore=0 phishscore=0 suspectscore=0 impostorscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004210120
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/Q8A2I44b6kDDZdxHTtEZCbPKVKQ>
Subject: Re: [nfsv4] AD review of draft-ietf-nfsv4-rpc-tls
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: Tue, 21 Apr 2020 15:24:53 -0000


> On Apr 21, 2020, at 3:46 AM, Magnus Westerlund <magnus.westerlund@ericsson.com> wrote:
> 
> Hi,
> 
> See inline. 
> 
> On Sun, 2020-04-19 at 11:40 -0400, Chuck Lever wrote:
>> Hi Magnus-
>> 
>> Regarding closure on the remaining AD comments:
>> 
>> 
>>> On Apr 16, 2020, at 4:30 PM, Magnus Westerlund <
>>> magnus.westerlund@ericsson.com> wrote:
>>> 
>>> Hi, 
>>> 
>>> I have reviewed the text proposal and have this comment. 
>>> 
>>> On Tue, 2020-04-14 at 11:39 -0400, Chuck Lever wrote:
>>>>  o  If a client uses an ephemeral source port for a TCP connection and
>>>>     does not present authentication material to initiate TLS host
>>>>     authentication, the server MUST abort the TLS handshake with a
>>>>     handshake_failure alert.
>>> 
>>> So what is this paragraph trying to say really. Is this a mix of OS/Socket
>>> level
>>> concerns with the transport protocol level. Becasue from my perspective, I
>>> don't
>>> see why it would matter if the NFS client use a single arbitrary source port
>>> for
>>> its TCP connection to the server, where it determines that it has reached
>>> the
>>> server with a requested SNI. After the TCP connection has been established
>>> it
>>> will have a specific 5-tuple. Then the client use RPC level authentication
>>> to
>>> prove to the server which user it is. Yes, that has certain weakness in that
>>> it
>>> doesn't identify the client host system, however for cases where one don't
>>> require that.
>> 
>> I've concluded that because...
>> 
>> • It is widely recognized these days that the source port is no realistic
>> indication of any degree of authority on the client,
>> • The new requirement was proposed well after the end of WGLC for rpc-tls,
>> • The use of a privileged port is discussed in RFC 5531 as implementation
>> guidance, not as a normative requirement,
>> • There seems to be an ongoing lack of consensus about what exactly should be
>> said,
>> 
>> ... I will drop this new text entirely.
>> 
>> Dave Noveck pointed out to me that Appendix A of rpc-tls already quotes the
>> final paragraph of RFC 5531 Appendix A, which suggested the use of the source
>> port.
>> 
>> IMHO Appendix A of rpc-tls really ought to make some kind of statement about
>> how weak it is to use the client's source port, as the purpose of the source
>> port test is to mitigate the weaknesses of AUTH_SYS that are discussed in that
>> section. However, given how late it is, I leave that discussion to subsequent
>> documents. The source port test can remain an implementation quality issue for
>> the time being.
> 
> Okay, I think that is fine. 
> 
>> 
>> 
>>> So related to my AD reveiw comment:
>>> 
>>>> 6. Section 5.1.1:
>>>>  After establishing a TLS session, an RPC server MUST reject with a
>>>>  reject_stat of AUTH_ERROR any subsequent RPC requests over a TLS-
>>>>  protected connection that are outside of a TLS session.
>>>> 
>>>> I assume this is actually bound to a host or a user identity? Because
>>>> reading
>>>> the above sentence immediately made me ask how can the RPC server
>>>> determine
>>>> that the RPC request is coming from an entity that already has an TLS
>>>> session?
>>>> Can you please clarify this question?
>>> 
>>> For TCP I think the new text addresses this to simply stating the fact that
>>> once
>>> the TLS connection is established over the TCP connection it is impossible
>>> to
>>> use it in an non-secured way. 
>>> 
>>> However, for UDP I think an aspect of this question remains. 
>>> 
>>>>  Once an RPC client establishes a DTLS session for an RPC program, the
>>>>  RPC server MUST reject UDP-transported Calls in that RPC prgram from
>>>>  that RPC client that are not protected by the established DTLS
>>>>  session.
>>>> 
>>> 
>>> Is this on a per 5-tuple level? Can you make that explicit. If not can you
>>> please specify in which way the server will make the deterination that they
>>> should be in some other 5-tuple an the associated DTLS association? 
>>> 
>>> 
>>> My understanding of DTSL is that over UDP for incoming packets it will look
>>> at
>>> the 5-tuple, The destination port for which DTLS server/client that receives
>>> the
>>> packet. And the source port + address for determining security context.
>>> After an
>>> DTLS association has been created on a 5-tuple incoming UDP datagram
>>> payloads
>>> needs to contain either DTLSplaintext or DTLS cipher text (see Section 4.1
>>> of 
>>> https://datatracker.ietf.org/doc/draft-ietf-tls-dtls13/). If it doesn't
>>> match or
>>> succesfully deprotects then the paylaod is rejected. Thus it will not be on
>>> the
>>> same 5-tuple possible to receive any unprotected datagrams.
>> 
>> I've tried to resolve this issue in the following ways:
>> 
>> - I've removed the problematic rejection requirement.
>> - I've introduced discussion of the use of a CID or 5-tuple to identify the
>> participating endpoints.
>> 
>> Here's the new text:
>> 
>> 5.1.2.  RPC-on-TLS Operation on UDP
>> 
>>   RPC over UDP is protected using the Datagram Transport Layer Security
>>   (DTLS) protocol [I-D.ietf-tls-dtls13].
>> 
>>   Using DTLS does not introduce reliable or in-order semantics to RPC
>>   on UDP.  Each RPC message MUST fit in a single DTLS record.  DTLS
>>   encapsulation has overhead, which reduces the effective Path MTU
>>   (PMTU) and thus the maximum RPC payload size.  The use of DTLS record
>>   replay protection is REQUIRED when transporting RPC traffic.
>> 
>>   As soon as a client initializes a UDP socket for use with an RPC
>>   server, it uses the mechanism described in Section 4.1 to discover
>>   DTLS support for an RPC program on a particular port.  It then
>>   negotiates a DTLS session.
>> 
>>   When using connectionless operation, each DTLS session endpoint is
>>   identified by its 5-tuple -- the source and destination IP address
>>   and port numbers, along with the UDP transport protocol number (17).
>>   When using connected operation, the DTLS session endpoints are
>>   identified by connection ID (CID), as described in
>>   [I-D.ietf-tls-dtls-connection-id].  Connected operation is strongly
>>   RECOMMENDED.
>> 
>>   Sending a TLS Closure Alert terminates a DTLS session.  Subsequent
>>   RPC messages exchanged between the RPC client and server are no
>>   longer protected until a new DTLS session is established.
>> 
> 
> I think this is clear. I don't think I can provide better guidance. I think we
> will get feedback on this when we go to IETF last call if it is insufficient. 
> 
> I hope the WG memeber can also check this also.

Thanks, Magnus.

I've pushed all of these updates to the rpc-tls github repo:

Editor's copy: https://chucklever.github.io/i-d-rpc-tls/draft-ietf-nfsv4-rpc-tls.html

rfcdiff with -06: https://tools.ietf.org/rfcdiff?url1=https://tools.ietf.org/id/draft-ietf-nfsv4-rpc-tls.txt&url2=https://chucklever.github.io/i-d-rpc-tls/draft-ietf-nfsv4-rpc-tls.txt

Commit log with individual changes: https://github.com/chucklever/i-d-rpc-tls/commits/master


Dave has added a 10-minute slot to tomorrow's meeting for a final walk through
to discuss any remaining open controversies before I submit -07. Everyone,
please review the material at the above links so we can have firm closure on
this review process.

Thanks for everyone's time!


--
Chuck Lever