Re: [nfsv4] NFS over TLS for laptops

Rick Macklem <rmacklem@uoguelph.ca> Sun, 20 December 2020 22:48 UTC

Return-Path: <rmacklem@uoguelph.ca>
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 978C13A033F for <nfsv4@ietfa.amsl.com>; Sun, 20 Dec 2020 14:48:46 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.101
X-Spam-Level:
X-Spam-Status: No, score=-2.101 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-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=uoguelph.ca
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 n748MZShhlX8 for <nfsv4@ietfa.amsl.com>; Sun, 20 Dec 2020 14:48:44 -0800 (PST)
Received: from CAN01-QB1-obe.outbound.protection.outlook.com (mail-eopbgr660056.outbound.protection.outlook.com [40.107.66.56]) (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 D4E4B3A0332 for <nfsv4@ietf.org>; Sun, 20 Dec 2020 14:48:43 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FWp3WZ1Xry6QdFGOPY+pEmmLTBNjvCln/SXSMFLrT+F2Cr5IDOyQ8DzD1BAIhwJ7CjOyOjB6LqYvb6r2zWPVB4pWRfurOOB78l6ZlaTJoKluz6Rt1czELyhSO3bcUKALfYEykqYZVTQiV8art1PrvEDobAcMtQveCyncQuv9fT2HSuVK/bT/wnxzAMh3iu7eBEuXEdYOpTbwZUCrmcBM6KXd+TQtwMre/2ZfUPhK52ZAOq5wQR1JB1v9u6MkDAupd/3M29Mc8xWjC3pgynW6pcGCF9Zy1OIhuiQa8jvEnAHSqgpmKYlSUNMcqmaBBnwVzS+wVQ90IIpjKuIJWwUMXQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NfpZIzrKfszMwH+j7phthBP6aMnwThQLN3/pw6dpsXE=; b=NKbQtjMnEKXab5dejitEjSKkCEn+Lxz8fHEjfa9gbDe0Qt/ChCcKNPTiwCGGMCxXmbkdJqJBgI8nF2vKAmawGWR4l+nS+6XfPxEhi71lULuyc2cL2Ma63r4KfU0BfN6Ss2Dk+WKSwWDUyaEsEMKIHBLITlCfprsPkiAq7Cf6WUkoHY2Lnj6z4HxKfOTxpm5ZmYYL6Z59rihIXWwk9es57hO4uYaGFQW4eHz59+kFlU9NKsVOIq5sl1rm2O5SUmaRK3QR/TZGfEzzxDsYqrHh3CF07cYnMCasyiwagQj2JkHiXccXy5FdUxii8EbicMgCDeox4Ph3ua4waqKs6foftw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=uoguelph.ca; dmarc=pass action=none header.from=uoguelph.ca; dkim=pass header.d=uoguelph.ca; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uoguelph.ca; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NfpZIzrKfszMwH+j7phthBP6aMnwThQLN3/pw6dpsXE=; b=R3aFj5JnregDyKRwW9O6L4lTJtOr6yoYAQaAoq/43c27uVPAJXdO0fkQE4wowiL8jGi4vuHr6Vbczxoj2/h+ipih2CXCzjVsI/bHRcocFqcHZe+rF/gx3D3cfGdWiRGqOoiIlR3D20WyYO2pPuN8ecDBUH/dEwxzZyxd7TssgXcOsSNrEq6MGVVD3BGoxsIwnSojItwaw1ZaEhCZAtxhV5wKRvnccC/C3Nik6Q4lIXvMqdjqWpDzCmo163HqNWW38D2tSkT7YpQt5xOWgFy5iQ0DdvwqpNLFfzvl49+o2tAb0Td0QHrjF4VZroTRhikD+A8blmz5Y6LDwP2+IykU7Q==
Received: from YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c00:19::29) by QB1PR01MB3683.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c00:3d::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3676.33; Sun, 20 Dec 2020 22:48:41 +0000
Received: from YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM ([fe80::7d6b:aa68:78f4:5d94]) by YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM ([fe80::7d6b:aa68:78f4:5d94%7]) with mapi id 15.20.3676.025; Sun, 20 Dec 2020 22:48:41 +0000
From: Rick Macklem <rmacklem@uoguelph.ca>
To: Chuck Lever <chuck.lever@oracle.com>
CC: "nfsv4@ietf.org" <nfsv4@ietf.org>
Thread-Topic: [nfsv4] NFS over TLS for laptops
Thread-Index: AQHW0NppAc3uZqIjgEq2ArIQwELbLqn2yyYAgACS67yAAO+9eYAAHOsAgAN9YtuAAviagIAAMFYUgAGN13M=
Date: Sun, 20 Dec 2020 22:48:41 +0000
Message-ID: <YQXPR0101MB09687759005C97725CFC1AFCDDC10@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM>
References: <YQXPR0101MB0968F7BF5A6D7E97F39CC739DDC90@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM> <A7175D1C-BEBB-4557-8123-FA78C9393E72@oracle.com> <YQXPR0101MB096816C0EA985F65FE6562E5DDC60@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM> <YQXPR0101MB0968AA3A97C80B8140BFC845DDC60@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM> <8B3A77F6-15DE-4F4B-B246-385DD447C743@oracle.com> <YQXPR0101MB09680BC1A27265F81C5B5671DDC40@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM>, <DEBCFB38-9A1A-43BB-A8DF-0C64792AF30F@oracle.com>, <YQXPR0101MB09689564C0543291E25FB274DDC20@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM>
In-Reply-To: <YQXPR0101MB09689564C0543291E25FB274DDC20@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: oracle.com; dkim=none (message not signed) header.d=none;oracle.com; dmarc=none action=none header.from=uoguelph.ca;
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 69271586-669d-4aa8-dfb2-08d8a5396614
x-ms-traffictypediagnostic: QB1PR01MB3683:
x-microsoft-antispam-prvs: <QB1PR01MB3683DA79E0600CD58C1E7E22DDC10@QB1PR01MB3683.CANPRD01.PROD.OUTLOOK.COM>
x-ms-oob-tlc-oobclassifiers: OLM:6108;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: EOwqP++hlQFradvYhQOEQ3S0/ZWPu6UumIXkw8/8N8ssQxUtIZPNxyPKcxwCa8l86QCGNdG2+NrR5W9d1jbb1gU/jev5Fco1WyzqEPouoAHxEFNnZSWqDOMPQYedOJX1L0EYh6GznR5SrlAhi021bG7/sxLZdNz1t7gJ94JX6rE6I0pXyzJ+kxFz9MMQrAJgHZ5mz9wY6N32qKfhZ81zVF7nWOopbaddlXeSFOcxQSocVPqk9vy8Wg0lX0ekX6nSDhEE3k5XDYKgwidPPFQmD+l/CJqYAcMk18amScQobdv6qwE+VDBcJO8Vn6bYI/1rluhu4l5qmHUXDmpYISkNpK6/nbudJgOhUTQtRbOObJMNnhOdkYptLRmKzMUBmiehTrNTA8E6LS83rIMOWKIeVyi1QtJx7ltvslZveZEg47aZjRfKkRPgTzUcTRTyP5Pyo9KIpbHQn2ce8AMbec7C3wjCbD/UBrrzCV1wPnQ7mkm49ILRDprnR5/WP6zEVOHwmBqyqOLMV30IsZJ4RW2k4g==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(136003)(39850400004)(396003)(376002)(366004)(346002)(33656002)(966005)(66446008)(4326008)(186003)(83380400001)(55016002)(52536014)(19627235002)(9686003)(478600001)(6506007)(316002)(86362001)(6916009)(7696005)(786003)(66556008)(64756008)(2906002)(71200400001)(91956017)(8676002)(66476007)(30864003)(76116006)(66946007)(5660300002)(8936002)(21314003); DIR:OUT; SFP:1101;
x-ms-exchange-antispam-messagedata: doJI6u+Ua3OmB3iJhHV9qSKjKTxSj1yUz5hIJtBnUQETiWacf57TINJk4sY5IMROn3jeWi4l0MULyLMnBKkHS9xMvnpWbt4+9FF5lF/KZeHacyhE7wCtMVWiEf4USGsu1gLl0+wvI+1bnQ2+gZ2gAkkK0ZjlVujXu/wY0184P8QRRgKhWldWdZZXs/FYRlDk0HkkeiKlKZBCTsrpPiQSWfmagoLzc7vQagEJQDFXjiwuJWov3ToB1UTo8T09TDDWDqUNpmEoLDSo7FaZYQSO4f3RihIvUPkp43IzkQCMiCFUfk0LyLloZj24SLQUDS06+EZY3dpOxeOXOYq4KqPn9EKqjw1vcMShhrWaPVLI1om1CKsIyPLanvMFrnfR1SSsUKEtjkebcpimOZgVj5gy5+viSUtkOoupfNQqX0ubMD0D3YotxLqci5W74hzd8J1Bls1SLaYh+YpmXWrJDpKbcJM9j2eEaJORa/5JM08qPedG8M/QN7HEQO2J1Juj4NnzcOJ0n6TYR95v+TP+JGd/BeJVNcr5lyh2UBM4UDNkgDK2QmP9/NVvU3m1/H/YCf9d6qxF+wYwusvLoDX5ClImuQlKWeF58G7iMXZqGmPfv0xB23/PJAX8ask13GiqBsyfEHjwOo/KvUFfz48MWvYVTPePdVbgroN9jmKZxcNdWP3nfXjKAkZ1NzP+QWmPFeLUrjaIwtbaBJuxtH3j9s+K9Z4ShtG6ttbu2RRWQh9Te5HKntNChJQKHRZrSvfNiBJ7V7QwLqySKHxIlxYD1o+U8E9lyL9KQhRrk7W6kLm6CnPs0HIe21J04KqrRWfwV9CXd3DG3BS40wxO7GOq0yN15CnLSQMycJNF7mHr1bmKocn0vH+07+BXD1lYOoDXV3nAh6YuGx6oqm2iDXvFrRB+dKd+rTb5SfnS9pGkwJEwqSZY6YQw+cCLPn9zW8mU0JdOeWnIOesgu7R+YCp3NLG+aeieXjSEiDwcjLp4pyB4ackTQsNd8ZrbYQcjEhsJvgsbh7vVL/woNjXDVq1qq364YsJRD5B52X9/AXJfLP+G3WQ=
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: uoguelph.ca
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM
X-MS-Exchange-CrossTenant-Network-Message-Id: 69271586-669d-4aa8-dfb2-08d8a5396614
X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Dec 2020 22:48:41.6328 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: SK/gQln34LfE4OtWZHrjFf9d8HSnp+u829Bg1do2uZ3W3LWjGifHUGyonogTmMDQAiAJr2ZgEEJJSf93LvGlfg==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: QB1PR01MB3683
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/yNHFlUwXjF2ZkF_klHVKHOdSnd4>
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: Sun, 20 Dec 2020 22:48:47 -0000

Rick Macklem wrote:
>Chuck Level wrote:
>[stuff snipped]
>>The certificate has a unique identity other than the CN. I was
>>thinking that unique identity was going to be the key for the
>>squashing mapping.
>Not sure what field(s) of a certificate you are referring to?
I took a look at a CRL and it appears to use SerialNumber to
refer to s revoked certificate, so I'm guessing that is what
you are referring to?

Since the serial number is per issuer and I would expect some
NFS servers will want to handle certificates from multiple issuers,
I think that the issuerName will be needed in the database key,
as well.

For the below certificate, the database key would be:
Issuer: C = CA, ST = Alberta, L = Jasper, O = MMM, OU = XXX, CN = democa.home.rick, emailAddress = rmacklem@uoguelph.ca
Serial Number: 2 (0x2)

Of course, as I think you noted, there is no guarantee that the
certificates will be correctly generated, to result in the above
referring uniquely to one certificate.

Still seems to be an Administrative Hassle to me, rick

Here is the entire certificate I created using the openssl command,
as displayed by "openssl x509 -in cert.pem -noout -text":
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number: 2 (0x2)
        Signature Algorithm: sha256WithRSAEncryption
        Issuer: C = CA, ST = Alberta, L = Jasper, O = MMM, OU = XXX, CN = democa.home.rick, emailAddress = rmacklem@uoguelph.ca
        Validity
            Not Before: Dec 17 05:08:33 2020 GMT
            Not After : Dec 17 05:08:33 2021 GMT
        Subject: C = CA, ST = Alberta, O = MMM, OU = XXX, CN = nfsv4-new3.home.rick, emailAddress = rmacklem@uoguelph.ca
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
                RSA Public-Key: (2048 bit)
                Modulus:
                    00:b4:f4:44:35:ce:73:3d:76:59:ed:ec:37:51:2a:
                    37:db:3c:98:81:b9:9d:58:90:4e:86:06:14:14:58:
                    39:60:2b:c3:37:2f:fc:7d:a7:62:bf:2a:a4:dc:46:
                    16:43:c9:6e:93:7a:35:4f:31:e3:19:1b:52:c5:ea:
                    77:d5:b9:df:da:34:25:6f:b8:ce:84:a1:80:20:14:
                    d2:62:48:4d:a3:22:54:75:25:04:ab:47:09:86:83:
                    4a:b4:5d:f8:20:11:18:23:20:1a:50:10:c7:72:9c:
                    2c:9f:1c:cf:28:fe:52:84:b6:60:f3:30:d9:32:fd:
                    5b:00:85:49:7d:32:18:6c:d9:88:2e:48:e9:69:4a:
                    ea:6a:dd:a0:5a:2a:ae:b1:10:82:34:6d:37:df:3f:
                    f9:0d:5e:a5:df:b1:6c:47:c0:bc:92:9e:de:d0:c0:
                    2e:3a:85:e3:e7:7a:7e:2c:bd:b9:3f:49:3c:0e:5f:
                    a3:32:22:7b:2a:5a:45:07:49:f3:41:93:0d:bf:eb:
                    eb:bb:c4:ca:e5:cf:d3:2c:9e:f9:9e:65:09:f6:ff:
                    05:c6:10:31:b3:27:6b:a1:62:70:23:95:7c:24:72:
                    29:14:ec:38:7a:a7:6d:63:fa:38:52:45:3e:a6:8a:
                    76:13:3a:ad:db:27:75:d5:90:e3:c4:4d:e9:1f:45:
                    bb:e7
                Exponent: 65537 (0x10001)
        X509v3 extensions:
            X509v3 Basic Constraints:
                CA:FALSE
            Netscape Comment:
                OpenSSL Generated Certificate
            X509v3 Subject Key Identifier:
                25:80:CA:0F:CD:13:23:4B:5D:57:3D:7E:AF:8C:AE:E9:78:36:4C:84
            X509v3 Authority Key Identifier:
                keyid:38:92:2D:6C:DC:83:1B:37:6F:C0:9C:8C:FE:D8:54:76:91:F6:BC:70

            X509v3 Subject Alternative Name:
                othername:<unsupported>
    Signature Algorithm: sha256WithRSAEncryption
         6c:85:34:12:32:6d:dc:54:64:51:e6:6c:7a:61:cf:19:8d:2e:
         7a:88:46:c4:d5:fd:85:53:54:a9:7d:ca:ef:81:06:99:a4:a9:
         ee:7c:c5:da:b6:63:3b:50:33:ac:7d:d5:d2:71:da:5f:6c:ec:
         d3:bf:2d:53:f3:49:03:34:3c:3e:1e:b8:7e:46:eb:8e:af:45:
         38:f8:88:86:95:43:45:34:07:bc:3d:b9:27:33:41:7c:cb:4e:
         1c:4a:8d:49:0c:22:5d:40:f0:70:15:d6:6a:1d:7a:34:44:de:
         54:62:ed:22:0c:78:9c:80:98:1d:0b:36:08:d8:2b:2e:ab:42:
         e3:bb:71:67:da:33:29:43:52:76:6a:5a:8e:02:93:f6:f3:bc:
         f1:dc:a8:40:90:3b:81:0e:f5:7b:d2:be:69:48:74:63:3f:0c:
         d7:bc:98:7a:68:bf:e3:22:d0:38:bb:fe:35:ca:bd:06:af:d0:
         ed:c3:3f:5f:5f:01:f1:aa:c5:7f:cc:de:7f:f9:32:85:87:e7:
         08:af:d0:c2:4c:78:a3:75:3d:0f:d6:36:ba:02:4c:a2:8a:bf:
         0d:15:ac:b3:92:35:09:f5:61:36:0b:f6:2f:5f:cb:f6:96:37:
         3b:98:6b:38:93:ef:82:2c:0d:21:ad:d9:4e:c7:4b:59:e5:ba:
         b0:45:d2:07


>Using the unique ID in the certificate solves that problem. These
>are like UUIDs, so they should "never" collide, for some value of
>never.
So, what in the above certificate are you referring to when
you say "unique ID"?

>IMO you are ginning up a "hassle." All of this is easily hidden
>behind a single tool or wrapper GUI. I don't see that the server
>implementation is much simpler, and neither is the protocol on
>the wire, with otherName compared with some other mechanism.
We are probably just going to agree to disagree on this.

>> But, if the otherName field is done as it is for the above certificate,
>> the information (ie ricktst@home.rick) is right in the certificate.
>> --> No database needed.
>
>How does the server map that user@domain string to a UID?
For FreeBSD, it is:
- string compare @domain with the server's and strip it off
- call getpwnam() with "user" as argument
Yes, there is a passwd database (often in an LDAP service),
but that is already there. (Needed for the gssd daemon and
id mapper that translates the Owner and Owner_group
attributes daemon, among other things.)

>The server has to be notified of new users. This step is
>avoided by otherName only if ricktst@home.rick is already
>known to the server. But, that's a separate administrative
>step, isn't it?
New users get added to the passwd database. This is
inevitable and "ricktst" would normally already be in the database
by the time Rick has a laptop that wants to mount the
NFS server and access it. "ricktst" is just a user name in
the passwd database like any other.
(There is no administrative step beyond new user creation.)
[more stuff snipped]
>What prevents that person from generating the same CN for
>multiple clients? This approach is Not Scalable for more
>than a few client certificates, unless there is a directory
>or database (or a flat file) to keep track of them.
To me, this is an argument for the otherName component.
A user name will be maintained as a unique name in a passwd database
and then there is no concern w.r.t uniqueness for the rest of
the certificate.

Obviously I like the otherName approach and have implemented
it for FreeBSD. I am not bothered by the fact that a "machine
certificate" also conveys a user to squash AUTH_SYS uids to
and I think that is a simpler approach than a database in the
server.
You obviously feel otherwise. Again, I believe we are at the
agree to disagree stage.

Only time will tell if other server implementors find this useful
as well.

It was fairly well received when discussed on a FreeBSD mailing
list some months ago.
[more stuff snipped]
>An alternate approach would be TOFU. On the very first contact,
>the server would validate an unfamiliar client's certificate
>and then create a user mapping using the first user@domain
>or UID that the client presents. After that, the server
>squashes all RPC users from that client to that initial user.
Isn't this trusting the client to do the right thing on the first
RPC?
--> Sounds like an easy way for a malicious client to get squashing
      set to the user the client would prefer?
[more stuff snipped]

>That analogy is exactly what the MUST NOT in rpc-tls is seeking
>to avoid. TLS is a transport layer mechanism that knows only
>about hosts. RPC user identity is never the concern of the TLS
>layer.
I do not care about overloading the X.509 certificate, if that is
convenient.
Are NFSv4.1 Sessions really an NFS specific tool or actually a
way to implement "exactly once" RPC semantics and manage
RPC transport?

>I'm not arguing against the idea of TLS identity squashing.
>The usage scenario is an obvious and common one.
>
>What I'm struggling with is why the WG should sanction an
>approach to addressing this scenario that is specifically _not_
>compliant with the spec, particularly when there are other
>ways to implement this behavior that are based on mechanisms
>that many servers already have implemented.
Well, I posted because David Noveck asked about this.
I was not looking for this to be sanctioned.

Honestly, I am not sure the working group needs to be telling
NFS server implementors how to do TLS squashing.
--> Suggesting that TLS squashing is a useful tool for improving
      security when NFS is done via RPC over TLS may be as far
      as the working group should go.
--> There is also the suggestion of using a passphrase on the
       private key for a client's certificate to reduce the risk of
       the certificate being used after being stolen.

rick


>>>> - For NFSv4, there's a separate authentication for SETCLIENTID /
>>>> EXCHANGE_ID, which must present consistent authentication material
>>>> across client reboots. Usually that's the client's root user,
>>>> though that could also be rmacklem in this case. Which is your
>>>> implementation doing?
>>> rmacklem. The FreeBSD server implementation will optionally not allow
>>> non-NULL RPCs to be done from a client without TLS being enabled on
>>> the TCP connection and that option would always be used for this case.
>>> --> All compounds, including the EXCHANGE_ID etc will be done as the
>>>     squashed user.
>>> Btw, although not widely adopted as far as I am aware, FreeBSD does allow the
>>> NFSv4 client mount to be done using Kerberos, but where all RPCs including
>>> EXCHANGE_ID etc use the Kerberos user principal's TGT, avoiding the
>>> need for a host based credential in a keytab on the client.
>>> --> rmacklem would do EXCHANGE_ID etc for this case as well.
>>
>> Sure, just as long as the same "principal" is presented to the
>> server when the client needs to recover its lease state, that
>> should work fine.
>>
>>>> This is an area that might be tackled by
>>>> an NFSv4-on-TLS document that can in fact require that an NFS
>>>> server map the client's identity to a particular lease.
>>> Not sure what you mean here?
>>> My understanding of the NFSv4 RFCs is that the same user that does
>>> the EXCHANGE_ID/SET_CLIENT_ID must be used for the others like
>>> DESTROY_CLIENTID/RENEW.
>>>
>>> --> For 4.0 there is Renew, but for 4.1/4.2 anyone doing Sequence is
>>>      sufficient. Were you thinking of Renew for 4.0?
>>
>> So I was thinking of enabling a server to use the client cert instead
>> of the GSS or AUTH_SYS RPC credentials for authenticating all of
>> these operations.
>>
>> Dave Noveck suggested we might add this to the EXCHANGE_ID operation
>> as a new state_protect_4a value, or simply some additional language
>> in RFC 5661bis explaining how to use the client certificate with an
>> existing state_protect_4a value.
> Why would the client need to present the certificate again, after TLS
> handshake?

The client wouldn't present its certificate again. The text of
rpc-tls already states that the server-side TLS implementation
should make the client's TLS identity available to the RPC
consumer. The new state_protect_4a value might indicate "please
use the client's TLS identity to ensure that another client
cannot mess with the lease I am about to establish."


> If the NFS server applies the following rule for the client:
> - All non-Null RPCs must be done within a TLS session.
> Then any certificate that verifies and was presented during the TLS
> handshake for that session can be used to authenticate these operations.

The point is that we don't want "any" certificate to purge or
alter this client's lease. We want only this client to be able
to alter its own lease.

Another client could send an EXCHANGE_ID using the same
nfs4_client_id string. Unless the first client's lease is
protected, the server might believe that the first client
has rebooted, and purge its lease.


> (ie I do not see a need for the client to resend the certificate.)
> --> Again, I think that a name like ricktst@home.rick from the otherName
>      would be easier to manage than the entire issuerName/subjectName,
>      but either would work, I think?
>
> To be honest, it should be very hard for a malicious
> client (or malicious user on a legitimate client) to generate/inject
> a bogus RPC into an established TLS session/TCP stream.

This is not about injecting lease operations into a TLS
session. It's about protecting against rogue or misconfigured
clients misidentifying themselves on a separate connection
and thus causing the server to purge a legitimate client's
opens and locks. (Ie, CLID_INUSE).

"I'm Brian, and so's my wife!"


> --> If the client is required to present a certificate that verifies during
>       TLS handshake, the malicious case will need access to that
>      certificate.
>      --> If the malicious client has a certificate, it can send it to the
>             server whenever it likes, so sending it again during
>             EXCHANGE_ID is not going to help, I think?
>
>> More discussion is needed here.
> Yes, as above.
>
> Hopefully others will chime in w.r.t all this stuff, rick

--
Chuck Lever





_______________________________________________
nfsv4 mailing list
nfsv4@ietf.org
https://www.ietf.org/mailman/listinfo/nfsv4