From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id tBjOKpRy115AfAAA0tVLHw (envelope-from ) for ; Wed, 03 Jun 2020 09:51:16 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 8DpZJpRy1172QQAAB5/wlQ (envelope-from ) for ; Wed, 03 Jun 2020 09:51:16 +0000 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 048B99402D1 for ; Wed, 3 Jun 2020 09:51:16 +0000 (UTC) Received: from localhost ([::1]:53192 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jgQ3G-000174-5y for larch@yhetil.org; Wed, 03 Jun 2020 05:51:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51512) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jgQ35-00016x-Ef for bug-guix@gnu.org; Wed, 03 Jun 2020 05:51:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58695) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jgQ34-0002lr-Bc for bug-guix@gnu.org; Wed, 03 Jun 2020 05:51:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jgQ34-0002CW-9o; Wed, 03 Jun 2020 05:51:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#22883: Channel introductions Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 03 Jun 2020 09:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22883 X-GNU-PR-Package: guix X-GNU-PR-Keywords: security To: zimoun Received: via spool by 22883-submit@debbugs.gnu.org id=B22883.15911778288417 (code B ref 22883); Wed, 03 Jun 2020 09:51:02 +0000 Received: (at 22883) by debbugs.gnu.org; 3 Jun 2020 09:50:28 +0000 Received: from localhost ([127.0.0.1]:42008 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jgQ2Q-0002Bb-WD for submit@debbugs.gnu.org; Wed, 03 Jun 2020 05:50:28 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38574) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jgQ2P-0002BL-5j for 22883@debbugs.gnu.org; Wed, 03 Jun 2020 05:50:21 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:38638) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jgQ2J-0002Vv-SY; Wed, 03 Jun 2020 05:50:15 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=40714 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jgQ2J-0005F6-4P; Wed, 03 Jun 2020 05:50:15 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87io14sqoa.fsf@dustycloud.org> <87h9ep8gxk.fsf@gnu.org> <20160426001359.GA23088@jasmine> <874majg0z8.fsf@gnu.org> <87bn3iz1xc.fsf_-_@gnu.org> <87wpket748.fsf@gnu.org> <87bmkwm8ed.fsf@gnu.org> <87png9o8i2.fsf@elephly.net> <87fth4bj6y.fsf@gnu.org> <87bln9oupo.fsf@gnu.org> <87wo5vfuxi.fsf@gnu.org> <87o8qjekt7.fsf@gnu.org> <87v9kanalz.fsf_-_@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 16 Prairial an 228 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Wed, 03 Jun 2020 11:50:13 +0200 In-Reply-To: (zimoun's message of "Wed, 3 Jun 2020 01:45:13 +0200") Message-ID: <875zc8pjfu.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 22883@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: -1.01 X-TUID: IzhSrgI+1iSQ Hi, zimoun skribis: > On Mon, 1 Jun 2020 at 16:08, Ludovic Court=C3=A8s wrote: > >> I think we need a way to =E2=80=9Cintroduce=E2=80=9D a channel to its us= ers that goes >> beyond a mere URL. > > Just to be sure to well understand, will the good ol' > ~/.config/guix/channels.scm > > ;; Tell 'guix pull' to use my own repo. > (list (channel > (name 'guix) > (url "https://example.org/my-guix.git") > (branch "super-hacks"))) > > still work as it is now? i.e., using the current "unauthorized" > mechanism. Or will a new keyword be added to this channel description > to say "this channel does not use authorized machinery but it is > fine"? Yeah, we have to keep it working. So I guess in that case it would just emit a warning saying this channel is not authenticated, and that=E2=80=99s= it. >> If that information were stored in =E2=80=98.guix-channel=E2=80=99,= it would be >> trivial for an attacker to fork the project (or push a new commit) >> and pretend the authentication process must not take previous >> commits into account. > > What will happen to recursive '.guix-channel'? The '.guix-channel' of > channel A contains the reference to the channel B where the > '.guix-channel' contains the reference to the channel C, etc. I=E2=80=99m not sure I understand. (The sentence above is about *not* stor= ing info in =E2=80=98.guix-channel=E2=80=99.) >> 4. When publishing a fork of a channel, one emits a new channel >> introduction. Users switching to the fork have to explicitly allow >> that new channel via its introduction; flipping the URL won=E2=80= =99t be >> enough because =E2=80=98guix pull=E2=80=99 would report unauthorize= d commits. > > I am a bit afraid by this... and I hope that a fork of a channel will > still work without emitting a new channel introduction. No, when publishing a fork of an authenticated channel, you=E2=80=99ll have= to publish its introduction alongside its URL. I think it=E2=80=99s unavoidable: we want to be able to distinguish between= a mirror that has been tampered with and a fork. >> 5. The channel URL is not included in the introduction. However, the >> official URL is an important piece of information: it tells users >> this is where they=E2=80=99ll get the latest updates. It should be >> possible to create mirrors, but by default users should go to the >> official URL. They should be aware that mirrors can be outdated. > > I do not understand this paragraph. The aim of mirrors is to avoid > the users to go to the official URL, isn't it? And the mirrors do not > have by design the latest updates (time to propagate, etc.). > > >> I think the official URL can be stored in =E2=80=98.guix-channel=E2= =80=99 in the >> repo (which is subject to the authentication machinery). That way, >> =E2=80=98guix pull=E2=80=99 can let the user know if they=E2=80=99r= e talking to a mirror >> rather than to the official channel. > > Why does it matter? The user should authenticate the downloaded > content whatever the URL serving it, isn't it? > And can 'guix pull' already let the users know to who they are talking? You=E2=80=99re right: ideally the URL wouldn=E2=80=99t matter at all. Howe= ver, from a security perspective, we not only want to make sure users get genuine commits, we also want to know they=E2=80=99re not talking to a possibly out= dated mirror. Since there=E2=80=99s no way to answer the question =E2=80=9Cis this the la= test commit?=E2=80=9D in a general way, the best we can do, I think, is to detect whether we=E2=80=99re talking to the =E2=80=9Cofficial=E2=80=9D Git repo. Thanks for your feedback! Ludo=E2=80=99.