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

Chuck Lever <chuck.lever@oracle.com> Sun, 19 April 2020 15:40 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 E58BF3A0C15 for <nfsv4@ietfa.amsl.com>; Sun, 19 Apr 2020 08:40:48 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.2
X-Spam-Level:
X-Spam-Status: No, score=-0.2 tagged_above=-999 required=5 tests=[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 LwFL7ucyPsVF for <nfsv4@ietfa.amsl.com>; Sun, 19 Apr 2020 08:40:47 -0700 (PDT)
Received: from userp2120.oracle.com (userp2120.oracle.com [156.151.31.85]) (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 6149B3A0C14 for <nfsv4@ietf.org>; Sun, 19 Apr 2020 08:40:47 -0700 (PDT)
Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 03JFcI9r089157; Sun, 19 Apr 2020 15:40:42 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=laf77N5KdJggfTvsZI8BsRBLCAq16QH/RO7xqZ7cAvQ=; b=jm70c9YngB/Tku3g6sD14SStSgxJz7HJ/uCjKT2U6nGLpnknhG+tVFiD+AwkVdyyb0wg 2YmYEv3E6xf8nkAHPaMlWmQZSnS7oio+KF+Zdg2whC5zvImgJmFVb4jGo8JS0YEP4kt8 SvSXr15sPDOrRFKtGJ9UKJWtXVeCFYzh+5gLVp/mEINSkrI58pSrElU3l1gEl7bXGi4v VhX8J07hXRuKwjzNWxghukxXgHJQ6QZdTzme4XWgR4MGEfUUn1PfcgNiTvp7nBhyG4Kj OY0PwDdSMwze2pyDVbuwRhOAzHl9TZswxotzcIAywCHssEGqAN7lkHTvrnTrB7CgBoV4 wg==
Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2120.oracle.com with ESMTP id 30ft6muk3a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 19 Apr 2020 15:40:42 +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 03JFcSEB133521; Sun, 19 Apr 2020 15:40:41 GMT
Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserp3020.oracle.com with ESMTP id 30gbb7cacn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 19 Apr 2020 15:40:41 +0000
Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 03JFed5c024911; Sun, 19 Apr 2020 15:40:39 GMT
Received: from anon-dhcp-153.1015granger.net (/68.61.232.219) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 19 Apr 2020 08:40:39 -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: <4e7912c6c55680f50b05aaa2cdc98f59733cd5b2.camel@ericsson.com>
Date: Sun, 19 Apr 2020 11:40:37 -0400
Cc: Trond Myklebust <trondmy@gmail.com>, "nfsv4@ietf.org" <nfsv4@ietf.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <C89BF8F3-7F65-4995-9CDB-CC1673E01463@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>
To: Magnus Westerlund <magnus.westerlund@ericsson.com>
X-Mailer: Apple Mail (2.3445.104.11)
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9596 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-2004190139
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9596 signatures=668686
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 bulkscore=0 priorityscore=1501 impostorscore=0 adultscore=0 phishscore=0 lowpriorityscore=0 malwarescore=0 clxscore=1015 mlxlogscore=999 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004190139
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/0gA1xLSLCIt-EdwJnrUf3govS_Q>
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: Sun, 19 Apr 2020 15:40:49 -0000

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.


> 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.


If this text is still inadequate, I can reach out to the authors of
I-D.ietf-tls-dtls-connection-id for further guidance.


--
Chuck Lever