From nobody Mon Jul 03 01:29:49 2023 X-Original-To: freebsd-fs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QvSyw45xBz4lxsP for ; Mon, 3 Jul 2023 01:30:00 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Received: from mail-qk1-x72a.google.com (mail-qk1-x72a.google.com [IPv6:2607:f8b0:4864:20::72a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QvSyv3R18z4N1R; Mon, 3 Jul 2023 01:29:59 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20221208 header.b=M+zrMVDU; spf=pass (mx1.freebsd.org: domain of rick.macklem@gmail.com designates 2607:f8b0:4864:20::72a as permitted sender) smtp.mailfrom=rick.macklem@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-qk1-x72a.google.com with SMTP id af79cd13be357-76595a7b111so337390085a.2; Sun, 02 Jul 2023 18:29:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688347798; x=1690939798; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=kdXT/yJRneXl5hxOCLMfZboN+EdNxo+AAUxuMwezMAw=; b=M+zrMVDUQeQ5gLRODb/r79e4k00rJXfaoNUW9bE2A/eV1cjp6F965tlKBAAMFWk8zX RJWrIRbSJ/NrSa2ZWlNhp7hBsoe00ai15lLPlXPRUkODzW50yTZ/MYgvvUibG3kVIcBw gRe7WpMUWPtrWVjoqJlzR9hhSRRp+CWfU6ygQxa09gWPEY9ymFCwOPEs+hepvQiS3v50 CSTb0kiepBcnYpPCdluTxQabp2kR7S85J8BT87KslWl96DeCXFMMXHGN0AnFbIOND0KT 8+iepqOcD/knjsjRUH0QlEnCxIUc41Xj64EZKuDUjrsEmhm0TXoVib6pS5OrRTfdbSXh HHwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688347798; x=1690939798; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kdXT/yJRneXl5hxOCLMfZboN+EdNxo+AAUxuMwezMAw=; b=HP6Iu8dynrFnHzJxEsg7R10RZSGrdU1hzvNlm7DOEGKjgdWAM2qGawsCAsB6YfIwTl DRZWmoY+u09JIKG1yOL64hpkeAS8th8aRK/BPwY74akN77MghzDXa5qL1IUxhUGMFhOy ilr0WYtyHTuFELXauM3hyXEY0vLpfZvYJuPgRlPayr6w1l697/Vuck60zAIsKopDsZ73 h5FHnPkIIkNRqand2r0SPyDkKUsPgOr1qOPJevniCRpKRTJM2yJPAbHl5mGLc1JEHR4N E01UzVE+t7eklcZqjSqZYd/yImOVjT6PFHjYNIND6n6t2wJxSIbZbrHVbROyPq2UgJJ7 aJIg== X-Gm-Message-State: AC+VfDxKOn8kvTICfm9QqkBg8H9iifMPTlr27Orj40vAUzcmdTqt2zdM zr68LtI8Zyv49r9wvhTxvo2B9e2PmT6oXOISuomzTVQ= X-Google-Smtp-Source: ACHHUZ42M9oK4vqBnSyrz4PHyihNbJ+ELtJeqU32J2NxVqQVX//Pje+inD+EKY2gSTmb01e49F8PcVmKYSnroOsf0dA= X-Received: by 2002:a05:620a:460e:b0:767:2e5a:b5 with SMTP id br14-20020a05620a460e00b007672e5a00b5mr11657097qkb.37.1688347798534; Sun, 02 Jul 2023 18:29:58 -0700 (PDT) List-Id: Filesystems List-Archive: https://lists.freebsd.org/archives/freebsd-fs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-fs@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Rick Macklem Date: Sun, 2 Jul 2023 18:29:49 -0700 Message-ID: Subject: Re: Diskless NFS over TLS To: Peter Jeremy Cc: freebsd-fs@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Result: default: False [-0.08 / 15.00]; NEURAL_SPAM_LONG(0.99)[0.990]; NEURAL_HAM_SHORT(-0.99)[-0.987]; NEURAL_SPAM_MEDIUM(0.92)[0.917]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20221208]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[freebsd-fs@freebsd.org]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::72a:from]; DKIM_TRACE(0.00)[gmail.com:+]; TAGGED_FROM(0.00)[]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_FROM(0.00)[gmail.com]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4QvSyv3R18z4N1R X-Spamd-Bar: / X-ThisMailContainsUnwantedMimeParts: N On Tue, Jun 27, 2023 at 3:17=E2=80=AFAM Peter Jeremy w= rote: > > On 2023-Jun-24 06:40:34 -0700, Rick Macklem wrot= e: > >On Sat, Jun 24, 2023 at 6:15=E2=80=AFAM Rick Macklem wrote: > >> > >> On Sat, Jun 24, 2023 at 2:24=E2=80=AFAM Peter Jeremy wrote: > >> > I am contemplating whether it's possible to use secure NFS for at le= ast > >> > the root mount[*]. The problem is that NFS-over-TLS relies on > >> > rpc.tlsclntd to perform the STARTTLS and that needs a functional > >> > userland to run it. > >> At this point, I do not think the "tls" option can be added via "mount= -u". > >> I had assumed that users would want "on the wire encryption, etc" to > >> be done right away, before any non-encrypted data travels across the > >> wire. > > That would be ideal but I agree it would be be difficult to implement. > In particular, it would mean the boot loader would need to perform > the TLS handshake. > > >Btw, to make this work for your case would be non-trivial, since the > >old (non-TLS) > >TCP connection would need to continue to work until the TLS handshake up= call > >to the daemon is completed. And the, the TCP connection used for NFS RP= Cs > >would need to be switched to use the new TLS/TCP connection. This is not= how > >the krpc works now, so I am not exactly volunteering to do this, even if= others > >think it is a good idea. > > Thanks for that. I'll consider it infeasible for now. Yep. The Linux folk put the TLS handshake in the kernel, but I do not see FreeBSD doing that (it has to be maintained, among other reasons it is a bit scary to do). > > >> Can you put all the data that needs to be secured on a separate volume= and > >> mount that from /etc/fstab? (I'm sure you have thought of this, but...= ) > >> Note that there is overhead in using NFS-over-TLS (mostly CPU overhead= , > >> assuming you do not have hardware offload), so you only want to use it > >> when there is data that needs to be secured. > > I was thinking more of relying on TLS for better protection against > network issues and also trying to move towards a zero-trust network. > The main problem is that one of the pieces of data needing to be > secured is the NFS TLS keys needed to mount the secure volume. > > Thinking more, I'm not sure how much value NFS-over-TLS provides unless > I can secure the boot process (DHCP and TFTP) as well. I'm about as unknowledgible w.r.t. security as they come, but something lik= e Intel's SGX might work? rick > > Thank you for your input. > -- > Peter Jeremy