Re: [nfsv4] NFS over TLS for laptops

Benjamin Kaduk <kaduk@mit.edu> Tue, 29 December 2020 19:02 UTC

Return-Path: <kaduk@mit.edu>
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 A00243A086D for <nfsv4@ietfa.amsl.com>; Tue, 29 Dec 2020 11:02:20 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.898
X-Spam-Level:
X-Spam-Status: No, score=-1.898 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 mSHh1Cm4Enqj for <nfsv4@ietfa.amsl.com>; Tue, 29 Dec 2020 11:02:19 -0800 (PST)
Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) (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 8B2633A091A for <nfsv4@ietf.org>; Tue, 29 Dec 2020 11:02:17 -0800 (PST)
Received: from kduck.mit.edu ([24.16.140.251]) (authenticated bits=56) (User authenticated as kaduk@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 0BTJ2B4O021248 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 29 Dec 2020 14:02:16 -0500
Date: Tue, 29 Dec 2020 11:02:11 -0800
From: Benjamin Kaduk <kaduk@mit.edu>
To: Rick Macklem <rmacklem@uoguelph.ca>
Cc: "nfsv4@ietf.org" <nfsv4@ietf.org>
Message-ID: <20201229190211.GA89068@kduck.mit.edu>
References: <YQXPR0101MB0968F7BF5A6D7E97F39CC739DDC90@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM> <20201221073456.GC64351@kduck.mit.edu> <YQXPR0101MB09683679D8333568D6B6F552DDDD0@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <YQXPR0101MB09683679D8333568D6B6F552DDDD0@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM>
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/WMyXmddIP0TcAENwcsSaoG7jtus>
Subject: Re: [nfsv4] NFS over TLS for laptops
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, 29 Dec 2020 19:02:27 -0000

Hi Rick,

On Thu, Dec 24, 2020 at 11:41:19PM +0000, Rick Macklem wrote:
> Benjamin Kaduk wrote:
> [stuff snipped]
> >(I agree with Chuck that we should be careful about conflating host and
> >user authentication, and that some sort of "squash", or rather,
> >constraining the allowed users from a given host/certificate, will be
> >useful.)
>  Ok. I'd agree. Of course, "careful" can mean just about anything.

This is true :)

> Here's a simple analogy:
> - I have a mobile phone#.
> - I have a mobile device called a smartphone in my backpack.
> Does the phone# refer to me, as the user, or the device/host in
> my backpack?
> I'd say "both".

Sure, there are senses in which it refers to both.  OTOH, the device has
some credentials, perhaps in the SIM card, that to me clearly address the
device but not the user.  Though these credentials are used for
authentication/authorization decisions (not least, granting access to the
mobile network!), they can only be tied to you as the user with the
addition of a separate lookup database in the mobile operator.  (And, lest
we forget, mobile phone numbers are terrible credentials.)

> -->So, yes, I'd say that you need to be careful, when multiple users
>      share a host/device.
>      When a single user uses a device, I do not see any need for a
>      distinction between "user" and "host".
> This is the last time I will try and argue this.;-)
> 
> [more stuff snipped]
> >>
> >>         Also, this would require the KDC be accessible from "the world", which
> >>         sounds pretty scary to me.
> >
> >It shouldn't -- the protocol is designed for it, the software is designed
> >for it, and lots of sites do it.
> My concern would be that it can facilitate a brute force attack on
> passwords.
> 
> Correct me if I am wrong, but, with a KDC open to the world, I thought
> that all an attacker would need to get an encrypted TGT was a valid
> principal name.

Any kind of vaguely modern deployment should be setting the "requires
preauth" flag on password-based keys, so that you have to prove you know
the key (e.g., by sending an encrypted timestamp) before a ticket will be
issued that can be used as a brute-force target.  (IIRC this is the default
behavior for new installations.)  An observer on the network path would
still be able to obtain such a thing, of course, though there are many
additional options for avoiding that -- we recently implemented a
PAKE-based scheme that performs a zero-knowledge proof of the password as
part of the key-agreement process, which is very nice from a cryptographic
perspective, and you have had the option for years of using a FAST (RFC
6113) tunnel to protect the password-derived exchange, as well as the
option of using certificate-based PKINIT in lieu of passwords entirely.

> --> Then they can brute force attack the password that maps to the
>       principal's private key for that TGT at their leisure.
> You could, correctly I believe, argue that this is really a concern w.r.t.
> crappy passwords and not Kerberos.

Yes, I would also argue that :)
My passwords are created by `dd bs=1 count=18 if=/dev/random | openssl
base64`, and you would have a hard time brute-forcing them...

> If there is something in Kerberos to prevent the above brute force
> password attack, please let me know.
> [yet more snipped]
> 
> >>        a database of certificates for different users. A compromised
> >>        client system would compromise all those users, etc and so on.
> >>        --> For this we have Kerberos and it works. Doing RPCSEC_GSS
> >>              with X509 mechanism would require a lot of implementation work
> >>              and the result would be less secure and as much effort to manage
> >>              as using Kerberos, I think.
> >
> >"Much effort" seems likely; "less secure" is not so clear -- I think it
> >would have somewhat different security properties but which one is better
> >or worse would depend on the deployment conditions.
> My comment w.r.t. "less secure" came from the fact that the private keys
> for the certificates would need to be known to the clients.
> For Kerberos, the private keys remain locally on the KDC.
> It just seems that distributing the private keys would introduce some
> fundamental element of "risk" to the design?

In order for a certificate to be usable on a client, the private key
associated with the public key in the certificate needs to be available to
the client (though could be wrapped in secure hardware such as a smart
card), yes.  But, you do not have to use the same private key on all
clients that will act on behalf of the same identity, and you can revoke
the certificate when it is compromised.  With a (possibly password-derived)
kerberos key, all users of the key have to know the same one, and you can't
revoke one copy without revoking all of them.  So, I stand by my assertion
that the security properties are different, and not straightforwardly
orderable into more or less secure.

-Ben