From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id gFQ8Js32a2EB3AAAgWs5BA (envelope-from ) for ; Sun, 17 Oct 2021 12:11:25 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id mKjyIc32a2GVAwAAB5/wlQ (envelope-from ) for ; Sun, 17 Oct 2021 10:11:25 +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 37FC71B8D5 for ; Sun, 17 Oct 2021 12:11:25 +0200 (CEST) Received: from localhost ([::1]:45742 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mc38W-0004rM-BD for larch@yhetil.org; Sun, 17 Oct 2021 06:11:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46860) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mc37C-0003IK-52 for guix-patches@gnu.org; Sun, 17 Oct 2021 06:10:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60300) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mc37B-0001y3-Qz for guix-patches@gnu.org; Sun, 17 Oct 2021 06:10:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mc37B-0006au-LU for guix-patches@gnu.org; Sun, 17 Oct 2021 06:10:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50814] [PATCH] guix: git-authenticate: Also authenticate the channel intro commit. Resent-From: Attila Lendvai Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 17 Oct 2021 10:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50814 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 50814@debbugs.gnu.org Received: via spool by 50814-submit@debbugs.gnu.org id=B50814.163446537625311 (code B ref 50814); Sun, 17 Oct 2021 10:10:01 +0000 Received: (at 50814) by debbugs.gnu.org; 17 Oct 2021 10:09:36 +0000 Received: from localhost ([127.0.0.1]:43613 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mc36m-0006aB-EA for submit@debbugs.gnu.org; Sun, 17 Oct 2021 06:09:36 -0400 Received: from mail-40136.proton.ch ([185.70.40.136]:29402) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mc36j-0006Zw-4z for 50814@debbugs.gnu.org; Sun, 17 Oct 2021 06:09:35 -0400 Date: Sun, 17 Oct 2021 10:09:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lendvai.name; s=protonmail2; t=1634465366; bh=OzxsZWf5Kc06WmW9OxoymrXdagJZnIC61y1n6rzwjsI=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=iSBy50HaoWazjbgPcA/yQf6qrSGvR80+trzUxpsGvaSIIaxRYhs6kT1IPBLRvpDBj Wok0xdznl9tox+p1kdfUUrprNojEhGAbz3raDtyXLrfg89jjCTtyXpouni/3Sbto3c 1rvyMzqcSThfZry4cRhNBNJHqYqTsu2S4Wd760OEQuIU/A+ytJityEIbHahfn/et49 K3P6o2PsO2lyJA/TtxRQAade4HFTfym0JNx+SzmyksEBgbf1M1I0ILMg9Haq7ceke0 PML9g9xb/LeQeVSCbWowa4L2wQqJtoRdFtMQqJZJgUbtR71yNFXRrg/Ek6Ne5nu4a+ Tn/VMprd9qEMg== From: Attila Lendvai Message-ID: In-Reply-To: References: <20210926101928.3877-1-attila@lendvai.name> <878rz2xq23.fsf@gnu.org> 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: , Reply-To: Attila Lendvai Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1634465485; h=from:from:sender:sender:reply-to: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=OzxsZWf5Kc06WmW9OxoymrXdagJZnIC61y1n6rzwjsI=; b=fJOk3FBOqaLXQAtrTz3QNjIQF9GFt7NT9+idm7fw/fcMhyTJmKur4xcmBdVQ2QVk3mP/7N B3RGgoUQSXhifbkKJCNqAfkSDHeIVATqifNyK4U/kYxpHRWq4Y56f2dBzTJttAoLRCGxGe j5c2H04UW2/rbeujAGh1QjWEH9SgyTKMCdMW9GhnXXfM6lHvMd5SmpcODVPGj7Cz5pJDxC jtfRWFt3WcErwMm8G472CliTjpgT+xbapbLEI1vh5ajAooyb3+Ti/vkIElzRWHgZdrznN8 esOFEi0Avd8NzK72418i2iCp5NgohfUFgRENd1DDGj1Z9FcOwnmFBiivIJ00+A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1634465485; a=rsa-sha256; cv=none; b=Toqnn9Eg8XrD4UUVnmGqV/xAoMtAg2T8Eamg7z61ErGovqHMpeddY/42AswuntftDdb+fL sOAprfz9ivfAEK9vbujxYzP1sV5s7qYbn672yhVFRVxFJsHlHBBlomWYXjo7VtVmb8oHt6 9ZlrrReOYVHBnsGD10GRgM38Lwb7hCQTlseLT+zuaSPgpO2u4v2M8o0T9G7pI7FEJteYMC RLe/6g1ecuoU3/PlT+bCv3gdCbeyU7/bVhaL9kXRDZOg1nBq0YbzCfrGEKkCN9ugzy87GF U+fNLQqKGhuIgZSL1pXBLRXwYD4+RQYxi4DTUjq04lDxHnlEGg5wUWJY/OlJRA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lendvai.name header.s=protonmail2 header.b=iSBy50Ha; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.42 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lendvai.name header.s=protonmail2 header.b=iSBy50Ha; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 37FC71B8D5 X-Spam-Score: -1.42 X-Migadu-Scanner: scn0.migadu.com X-TUID: aC6okfFsK3BP > i'll investigate again later by running the test without the fix, and wri= te > up my results here, or better yet, in a better commit message. i ran the test without my fix, and indeed it fails at two points: 1) ;; Should fail because it is signed with key2, not key1 (check-from "commit 3" #:should-fail? #true) 2) ;; It is not very intuitive why commit 1 and 2 should be trusted ;; at this point: commit 4 has previously been used as a channel ;; intro, thus it got marked as trusted in the ~/.cache/. ;; Because commit 1 and 2 are among its parents, it should also ;; be trusted at this point because of the cache. Note that ;; it's debatable whether this semantics is a good idea, but ;; this is how git-authenticate is and has been implemented for ;; a while (modulo failing to update the cache in the past when ;; taking certain code paths). (check-from "commit 1") (check-from "commit 2") note that i have extended the above comments compared to what's in the commits that i have sent previously (and i also fixed the check for the warning). i suspect there are still things to discuss, so i'll wait for any feedback before i resend the patches. i did not touch the test code itself, so you can easily find these points in it. > Yes please. In general, please start by reporting the bug: what you > get, what you expected, and how to reproduce. That makes it easier > to understand and evaluate proposed fixes. understood. the problem is that it all started out as adding a warning, and the rest were just side-quests... :) > Alright. Please next time open one issue per topic: that=E2=80=99s a goo= d > way to maximize the chances that review happens in a timely fashion. > :-) can i mark dependencies between issues/patchsets? because all that i could do here is split this into two sets of commits (because of the dependencies between the commits): 1) the 3 test commits, and 2) the 2 guix commits. i thought that separating the test that is exhibiting the bug, from the fix that fixes it, would only hinder the process. > I understand the behavior was surprising to you, but I=E2=80=99d like to = see > if we can pinpoint why. Can you think of anything that could be > added to the documentation? if we assume that everyone reads and internalizes every page of the documentation of every software that they use, then i guess nothing needs to be added. but if our goal is to maximize the effectiveness of the users, then no amount of static, free-flowing text can compete with a warning that is signalled in close context to the issue. i think the right question to ask here is how often would this warning be superfluous. my assumption is that very rarely, if ever, but i may not be aware of some use-cases. looking forward to any feedback on how to improve this. -- =E2=80=A2 attila lendvai =E2=80=A2 PGP: 963F 5D5F 45C7 DFCD 0A39 -- If the source of fear is the unknown, and fear is the only way to be contro= lled, then knowledge is the only way to be free.