From owner-freebsd-current@freebsd.org Fri Mar 6 02:09:08 2020 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 062ED253147 for ; Fri, 6 Mar 2020 02:09:08 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-QB1-obe.outbound.protection.outlook.com (mail-eopbgr660074.outbound.protection.outlook.com [40.107.66.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "GlobalSign Organization Validation CA - SHA256 - G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48YWJK6ZxJz4TfG for ; Fri, 6 Mar 2020 02:09:05 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BKPXf44bCDrREiHavGthOazR2ua4MRWZqLo4npKsODA2vBKUiBHbwG2VRI5azIacBr60omSeIUVdP2DNMbzZTMF8dV7mz2QG9evfUkDpteDw7ZR1zu9bpsmwC8XyEHuVNlBdeIPUR1xjfDng4P00gFthDzanzBrl/wZSSznydFEbwxb0tnXj8jGuFfNwHCphG0k3c3UYB1utcV7xxsF/pnhgKTmAnsDuHC6qzKS8GFqZlXDEAko4Ok8B155SveYu7zGVozXDgILiqN1SXWro3RitTze1hvCALkcVSD7uN0p+F+bz099aCv+pGZeS/KTlrfIGirRtOJj7WdLlCv319g== 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=4wMX5T0r9DZX8fWSxvN1HF1Ev2KgIOmWoEzwXBU2EH8=; b=X1y3z+c4E4e/NlFtrzOXO8RsDb6ctaa/mt5ZJOm2+3d8c8Ru4+kB6CWTYUeF8xGIXIxHv/Q5H+Y2h5cSBrhQHeBsxM5Pu3ivA/tVC7/J5gmUSpFoh9vq3pK0w9+7PYopQzkfniPLXnkUssgUYhfJUOS6S9U+Jc+zwW/vGe/WRRKefnvTrnmyT4J/i41zCxTYtBe3cAHmR17rZTocETPIo+Up8/rXlNaMbIl79WOtQwGrsccSkltm8lqiixyxoUAaSXt304yspewMQJakx0mWOESfJjfje5CCjTpvA0RRUSnZmVZGPCeyZ/BYKPJ6HoWhlqVNf4XGMKhtZIMXGLwLPA== 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 Received: from YTBPR01MB3374.CANPRD01.PROD.OUTLOOK.COM (10.255.46.82) by YTBPR01MB2623.CANPRD01.PROD.OUTLOOK.COM (10.255.46.207) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2772.15; Fri, 6 Mar 2020 02:09:03 +0000 Received: from YTBPR01MB3374.CANPRD01.PROD.OUTLOOK.COM ([fe80::a50d:6237:4074:f9c4]) by YTBPR01MB3374.CANPRD01.PROD.OUTLOOK.COM ([fe80::a50d:6237:4074:f9c4%6]) with mapi id 15.20.2772.019; Fri, 6 Mar 2020 02:09:03 +0000 From: Rick Macklem To: Benjamin Kaduk CC: "freebsd-current@FreeBSD.org" Subject: Re: TLS certificates for NFS-over-TLS floating client Thread-Topic: TLS certificates for NFS-over-TLS floating client Thread-Index: AQHV8dDjD29GK4BL2kGnxfg+gW2rAag3xKkAgALVOQyAADejLQ== Date: Fri, 6 Mar 2020 02:09:03 +0000 Message-ID: References: , <20200304032234.GY98042@kduck.mit.edu>, In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ccc2089f-f28d-4026-5666-08d7c1735810 x-ms-traffictypediagnostic: YTBPR01MB2623: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-forefront-prvs: 0334223192 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(376002)(346002)(39860400002)(366004)(136003)(189003)(199004)(52536014)(4326008)(186003)(2906002)(33656002)(8936002)(71200400001)(478600001)(86362001)(316002)(81166006)(66556008)(786003)(66476007)(66946007)(76116006)(55016002)(66446008)(9686003)(81156014)(8676002)(64756008)(7696005)(6916009)(5660300002)(966005)(6506007); DIR:OUT; SFP:1101; SCL:1; SRVR:YTBPR01MB2623; H:YTBPR01MB3374.CANPRD01.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: uoguelph.ca does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Z906F6PFIsvWXoOHo4iNjKGYOfu0uAZ5+wDzVhYPFqhMgoED+MCxnhBsZiEe+v95uHNNNi4yiNZ7Zh1d+EoLcqYew6XFoF9c92xHoB49Y9td6RRx+AULtO1azMhrA+7KipmN5XSr5kxeN/wTrPgUuBn7SkWDxIJsb1qqC0wdgbJUVjXV+Sc7T5Fh7xHGwZMTarl3cq3KQDczob6suRV8SBouGp9tKejNtMWMI0id9QZ0MBN8MjW9bhlNhyDeTIP+UgLODvSprqJ0ll3hRTdWApclbHB1qdmgMqI4IulgidoPzN0cXChFgxIa5maE7AuCo0pwZQyqOmf/I4+68DvxB5ENtyDwwGSlj3CGq124Cty/sp9Yqsi1HCNnmoqBTRlgYIcEQLVzfChWvf+Y74hnfCXtVZizqljbNzfrG482DpZ6xWyEOkRXJVI6jLoa98wloL3nj7TaILztmIow2aAgosJ5o0SaerH6QwQjFz2RBm8aY/q39OaTgYU2f8OLphfm9Yt/JagZczoFPHES+4HvSw== x-ms-exchange-antispam-messagedata: EuXr9u6lMTDROlx6Uu4QmidQUraZ5927hI0pJ4T3Z2XA3c6s76IDEL0XYQu0/f5HFBDJKHneOG+l6n3KpXS+YPndF+BeJQP2lAbuMnVJUQUyJgMigplQIxQ/ffvMQV6MOqrsNYDhCat9lH6YUvqOuo86slUXb9pXtJO9L/jVHqEJ7VdnHxqYDKiTC112DadTNwTbwpUwqp3xtEqkG9Stgg== 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-Network-Message-Id: ccc2089f-f28d-4026-5666-08d7c1735810 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Mar 2020 02:09:03.7730 (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: osk+2E2E1vZVNnR+gAW0tJ/kPhnckMw1fgrRevo0S1x3Z9oTrTkEOLoYu3DhdII1nwD4u2i6Mw1QM6v3nJI2qw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: YTBPR01MB2623 X-Rspamd-Queue-Id: 48YWJK6ZxJz4TfG X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of rmacklem@uoguelph.ca designates 40.107.66.74 as permitted sender) smtp.mailfrom=rmacklem@uoguelph.ca X-Spamd-Result: default: False [-4.68 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:40.107.0.0/16]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[uoguelph.ca]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[74.66.107.40.list.dnswl.org : 127.0.3.0]; IP_SCORE(-1.39)[ipnet: 40.64.0.0/10(-3.80), asn: 8075(-3.09), country: US(-0.05)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:8075, ipnet:40.64.0.0/10, country:US]; ARC_ALLOW(-1.00)[i=1] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2020 02:09:08 -0000 Rick Macklem wrote:=0A= >Benjamin Kaduk wrote:=0A= >>Rick Macklem wrote:=0A= [stuff snipped]=0A= >>> A typical client mounting from outside of the subnet might be my laptop= ,=0A= >>> which is using wifi and has no fixed IP/DNS name.=0A= >>> --> How do you create a certificate that the laptop can use, which the = NFS=0A= >>> server can trust enough to allow the mount?=0A= >>=0A= >>You can give your laptop a certificate for an arbitrary name, provided th= at=0A= >>the NFS server knows to "validate" that name in an appropriate fashion. = (I=0A= >>don't remember what draft-ietf-nfsv4-rpc-tls says about this validation.)= =0A= The draft seems to just refer to RFC5280 and it seems to allow a local CA= =0A= (Page 12, 2nd (a) section on page). It does not seem to specify details w.r= .t.=0A= validation beyond that.=0A= =0A= >As you note below, creating a site local CA is probably appropriate and th= e=0A= >server should be able to check that the certificates were signed by this.= =0A= >(I haven't quite figured out how to do this yet. I think I've created the = CA=0A= >and used to sign a client certificate, but haven't yet gotten the server d= aemon=0A= >to verify it. (Playing with SSL_set_verify_locations() to try to get it to= work.;-)=0A= Just fyi, I got this working. My mistake yesterday was that I created a cer= tificate=0A= for the client that had a SubjectName identical to the IssuerName. It happe= ned=0A= because I test on one machine (client and server) and I used the hostname a= s=0A= the CN.=0A= --> This resulted in SSL_get_verify_results() returning "self-signed".=0A= =0A= Once I created a client certificate with a different CN in the SubjectName,= it=0A= validated ok.=0A= =0A= Thanks everyone for your help sofar, rick=0A= =0A= >> My thinking is that a "secret" value can be put in the certificate that = the NFS=0A= >> server can check for.=0A= >> The simplest way would be a fairly long list of random characters in the= =0A= >> organizationName and/or organizationUnitName field(s) of the subject nam= e.=0A= >> Alternately, it could be a newly defined extension for X509v3, I think?= =0A= >=0A= >It would be better to just make a site-local CA and trust everything it=0A= >issues (which, admittedly, is not the greatest option itself.)=0A= I had thought this would be too much work, but it seems fairly straightforw= ard,=0A= so this is what I am now working on.=0A= =0A= >> Now, I'm not sure, but I don't think this certificate can be created via= =0A= >> a trust authority such that it would "verify". However, the server can= =0A= >> look for the "secret" in the certificate and allow the mount based on th= at.=0A= >>=0A= >> Does this sound reasonable?=0A= >=0A= >I'm not sure what goal you're trying to achieve by this "security through= =0A= >obscurity".=0A= Yes. I now see it is the CA stuff that can stay secret.=0A= =0A= >> Also, even if the NFS client/server have fixed IP addresses with well kn= own=0A= >> DNS names, it isn't obvious to me how signed certificates can be acquire= d=0A= >> for them?=0A= >> (Lets Encrypt expects the Acme protocol to work and that seems to be=0A= >> web site/http specific?)=0A= >=0A= >RFC 8738 specifies the ACME protocol for validating IP addresses.=0A= I had looked at an older RFC, where it seemed to be web site specific.=0A= Since none of my stuff has fixed well known DNS names, I'm not going to=0A= worry about using an established CA for now.=0A= =0A= Thanks to everyone for their comments.=0A= I may respond to some of the other posts, but I'm figuring things out for n= ow.=0A= =0A= rick=0A= =0A= -Ben=0A= _______________________________________________=0A= freebsd-current@freebsd.org mailing list=0A= https://lists.freebsd.org/mailman/listinfo/freebsd-current=0A= To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"= =0A=