From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 6GUeG9Bh2GZ7/gAAqHPOHw:P1 (envelope-from ) for ; Wed, 04 Sep 2024 13:34:08 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id 6GUeG9Bh2GZ7/gAAqHPOHw (envelope-from ) for ; Wed, 04 Sep 2024 15:34:08 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=WyI0oiDf; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=NeNc2Piu; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1725456848; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=YRO6vWmc+185h2AFgdYqqCAbIg09naLxHAt75B+HK94=; b=JtpfXuJyNlgFK6eW8g9oIfdxf7g5iHTy5jA5+iEdEyQta/ytDLV5rsf5Ov/N+6jUK3i87E u1EJXfFPBVt4YXg/NmnKKKfl3rwlldz2yhv9TuY2+aRWvK551uCWLip7d0ppTK+/MmhR1e EZgnww+U1eA2RL5Vyp6VPjSHT14ZsnMzLalJR9XF1twaUAQr0PtKtCvqA35tVpiciydlaS FAIlwVdVd7aS8hitYL9peUb8Bkb9bwVrviPM8jjAB+hoX18dR6Qc5HXrT5j0/UNW7G3+lQ HbFJI+le9yWUMhEzlFDJK+PCMEaN84Zszzikc44j8Hh1pj4sFvTxTzLwuRdQ1g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1725456848; a=rsa-sha256; cv=none; b=VG8FmZa0FrtMxhAeXJA+tfQN3Qsqz0LPKjoR0942UIK88BFMGnh2gocAhQmhbyAYauLuea WDjhNyB6scpO6/NkoejeKuF3CbENZQQr14cAMs39fOyszUg4+hg/nk1kfSGJL8TXrHlQ5P s3RixG7nPnsklCmZPyxe7Y2aLpQmPBhpkKfawGuMRlWC0Sfda65Rf3XMpVXJPA9Kcj0jts n+z/ASlDrPTcuI3zNugl62WKnfiaklmobVhhDQO9HL24F51WcGdES8WXvGQjfZWDKShCV0 ax+b6aQ/mZ/8/Ekl9yJfIiDN8Z6tALq9qjHEzoyRWMKD6CCNvB25OwsrkIcUfg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=WyI0oiDf; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=NeNc2Piu; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3326F624DA for ; Wed, 04 Sep 2024 15:34:08 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1slq91-0006VE-Nd; Wed, 04 Sep 2024 09:33:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1slq90-0006V0-HX for guix-patches@gnu.org; Wed, 04 Sep 2024 09:33:58 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1slq90-0003Gr-8X for guix-patches@gnu.org; Wed, 04 Sep 2024 09:33:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=YRO6vWmc+185h2AFgdYqqCAbIg09naLxHAt75B+HK94=; b=WyI0oiDfHyjPs0KVv3jwa5suIsZTy4qhLSgxRzk6Zvamo/cpNG+IEfVPb8yV5rulKhDmz0vpZypU1ZlonW7KhouacGeRuVMF5M4t//wcKGKlXL0w/xb7ldxKdBdyoDwox2ytPTpJafJSskEA3zlATwD+7URLbs1JUGckLJWu3YQjm5XNqR4LE7xpHCO+ifDhWg592WcazGmFH/YQuuBjAKo0zpL/P4NBODk3crY7lNYD4KOgjTOJXJ1Wuv5aJierGYiVskBlKh1h6tNHl88JtdvhZ/fzoAgA2iuHOlV27mBBUL/3EOZDMQXidg7gvd2+ZIl5qPEq8VkQh4gU5FP4qA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1slqA1-0001ga-RQ for guix-patches@gnu.org; Wed, 04 Sep 2024 09:35:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70314] [PATCH] guix: scripts: environment: add tls certs to networked containers Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 04 Sep 2024 13:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70314 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Richard Sent Cc: Josselin Poiret , Simon Tournier , Mathieu Othacehe , Tobias Geerinckx-Rice , Ricardo Wurmus , Christopher Baines , 70314@debbugs.gnu.org Received: via spool by 70314-submit@debbugs.gnu.org id=B70314.17254568886445 (code B ref 70314); Wed, 04 Sep 2024 13:35:01 +0000 Received: (at 70314) by debbugs.gnu.org; 4 Sep 2024 13:34:48 +0000 Received: from localhost ([127.0.0.1]:33894 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1slq9o-0001fs-D8 for submit@debbugs.gnu.org; Wed, 04 Sep 2024 09:34:48 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54876) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1slq9m-0001fU-7Z for 70314@debbugs.gnu.org; Wed, 04 Sep 2024 09:34:46 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1slq8e-0003A4-De; Wed, 04 Sep 2024 09:33:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=YRO6vWmc+185h2AFgdYqqCAbIg09naLxHAt75B+HK94=; b=NeNc2PiuonM/WSYnqAV3 V5y41VpMo4JQA/zrw17gXk/u1rzAOi5YuILPuXl5TGr/b3KuM57i2I9CcnjrNdmFgX0xS0v8IoJKi qgaai+74CsJbWgmCPvQaf/ZH6lUmNDCIZ1LjqidZEru3xHVU14zZLQE92b+AxY8+K1MK877HCXDOg 8pZQknFik5nFc/gA27NT1dx3TQ3ot0xBQ0bBcnDP9DZ+51QHuqny0pBOfG50+Jh61XmHv5jmXDE1L AIgroVZnE1aS2yzJ9GEluFunlN1W0a36qUrdziCRtY/wUToASBiZtAkWkDa30pT/RWffHA3m3xmXW 1ljIuzWNCsvMzg==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: <82121e1e6f3144f54d4a8e6d4276bb4581b627d2.1712689529.git.richard@freakingpenguin.com> (Richard Sent's message of "Tue, 9 Apr 2024 15:05:29 -0400") References: <82121e1e6f3144f54d4a8e6d4276bb4581b627d2.1712689529.git.richard@freakingpenguin.com> Date: Wed, 04 Sep 2024 15:33:30 +0200 Message-ID: <87jzfree6t.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -4.58 X-Spam-Score: -4.58 X-Migadu-Queue-Id: 3326F624DA X-Migadu-Scanner: mx11.migadu.com X-TUID: L+v5h0y2JOdP Hi Richard, Richard Sent skribis: > * guix/scripts/environment.scm: Add --no-tls flag. By default when starti= ng a > container with -N, add nss-certs package and set SSL_CERT_DIR and > SSL_CERT_FILE environment variables. When --no-tls is passed, default to = old > behavior. > * doc/guix.texi: Document it. > > Change-Id: I3d222522fa9785fbf589f15efd14e6d6d072bfa7 Apparently this patch fell through the cracks, despite the long Cc: list. > Given the discussion on IRC and guix-devel [1] recently about making > nss-certs easier to use, this patch modifies guix environment (and > thus guix shell) to automatically add nss-certs to the profile when > sharing the network namespace, as well as setting the > mostly-standardized SSL_CERT_DIR and SSL_CERT_FILE environment > variables. > > This behavior can be reverted with the --no-tls flag. Since presumably > the majority of shell users want TLS to work out of the box, adding > TLS by default makes sense to me. [...] > + (('network? . #t) > + (if (assoc-ref opts 'no-tls?) > + '() > + (manifest-entries > + (packages->manifest %default-tls-certs)))) Instead of adding the =E2=80=98nss-certs=E2=80=99 package, I would rather e= xpose /etc/ssl/certs (when it exists), for two reasons: (1) the system-chosen certificates will be used, and (2) it=E2=80=99s less expensive than having = to compute the derivation of =E2=80=98nss-certs=E2=80=99. Users who definitely want Guix=E2=80=99s =E2=80=98nss-certs=E2=80=99 can al= ways add it to the shell and it will take precedence over /etc/ssl/certs, assuming SSL_CERT_{FILE,DIR} is defined. WDYT? Thanks, Ludo=E2=80=99.