From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id wE0rHKAfn2a1RwAA62LTzQ:P1 (envelope-from ) for ; Tue, 23 Jul 2024 03:12:32 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id wE0rHKAfn2a1RwAA62LTzQ (envelope-from ) for ; Tue, 23 Jul 2024 05:12:32 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=retrospec.tv header.s=fm2 header.b=oroLO9S2; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm3 header.b=ka92SNoP; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1721704352; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=1B9I0fJSLPBjnYWn28xK1Dj4/OEtsqDWxR+cPaZ1D0g=; b=bGNwcYwwoC+91le4F0cFYuRuV9hMF4v8+jtS2m7Euksvjb5Tt0a4ePey455B9MhbSQs9yw cF2pfMCM1xe70Yoxf4+0Y7BKcCH6k01/RTJ3/+0HLBJRGhT8bQxxvwMDDDkpdJHhFO4cV5 qs99WZnFydU1pARh3OceUegbyVWmRKXqXcF+DpG2oJElwuQoH8AT0PiHmYRHbUhGQcfEXH QXP0+9wVzun+DB5fbiu0HFmC9ZHG8G6T3wrDEj1Q75AO4dFXAjsvZ/pS3tZJzxofLxFgI0 PLwE3Chc4rWeb0nsANpovbvGiS3/RGRAKa5VSa6XXPfWe5RatRpcZ63wEF3slA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1721704352; a=rsa-sha256; cv=none; b=HZ03MqLy4NVGRhKHtWUArj1G95xECb9fSjGq9Hh0+YdeiF+ROpJ65D7pXW+6Gx3on61bf2 ep2HhzVvcXO+cWOSfA6HRjKd05CM4ZErPEw7d0JssgwNJvfcocms7G7gxOXbJ8e56kCcKQ sh8F8/fur/jLuXI9uM6yoDcc0kSySdZ969tp86b5MsSPxmbr/MxBQMhUlroNpfbWMfaJ6Z 3+q9w/Yv7ZeRy1QDFvAtTKUf+cFgZwB7ThZAuUluTZea7DpwUHhgdpiavwRcxBJVvTylzn ktlsuVauCirj6KytVeuuhlFy7wFCTFNvk49B4x7zwf5DzpmK7UmlV/PYUeQ9cQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=retrospec.tv header.s=fm2 header.b=oroLO9S2; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm3 header.b=ka92SNoP; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-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 32F9363705 for ; Tue, 23 Jul 2024 05:12:31 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sW5wV-0007GJ-QH; Mon, 22 Jul 2024 23:11: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 1sW5wU-0007Fz-AM for bug-guix@gnu.org; Mon, 22 Jul 2024 23:11: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 1sW5wU-00065M-1j for bug-guix@gnu.org; Mon, 22 Jul 2024 23:11:58 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sW5wX-0007nD-Rm for bug-guix@gnu.org; Mon, 22 Jul 2024 23:12:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#72248: home-gpg-agent `ssh-support?' breaks SSH agent forwarding Resent-From: Ian Eure Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 23 Jul 2024 03:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 72248 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 72248@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.172170431729943 (code B ref -1); Tue, 23 Jul 2024 03:12:01 +0000 Received: (at submit) by debbugs.gnu.org; 23 Jul 2024 03:11:57 +0000 Received: from localhost ([127.0.0.1]:58867 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sW5wT-0007ms-1o for submit@debbugs.gnu.org; Mon, 22 Jul 2024 23:11:57 -0400 Received: from lists.gnu.org ([209.51.188.17]:43322) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sW5wQ-0007mk-R8 for submit@debbugs.gnu.org; Mon, 22 Jul 2024 23:11:55 -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 1sW5wM-0007FM-MJ for bug-guix@gnu.org; Mon, 22 Jul 2024 23:11:50 -0400 Received: from fhigh6-smtp.messagingengine.com ([103.168.172.157]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sW5wJ-00061B-U4 for bug-guix@gnu.org; Mon, 22 Jul 2024 23:11:50 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 2AFDB11401C5 for ; Mon, 22 Jul 2024 23:11:45 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 22 Jul 2024 23:11:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=retrospec.tv; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:message-id:mime-version:reply-to:subject :subject:to:to; s=fm2; t=1721704305; x=1721790705; bh=1B9I0fJSLP BjnYWn28xK1Dj4/OEtsqDWxR+cPaZ1D0g=; b=oroLO9S2zY/5UedHBE42fkmDa/ PuwsySVypzJXWx0qeBcc0HIQdqoKyBKQ0qgpe/3Qf53go2tiZ/HASpbymAd6/KKS hQJ5Ufi5IqNB+WeuOhxo/do/s/SCf8nXZwTQ3qpNyArUKR7hUVfieac581Qyp8XF jUmvD/1FXSsrCEp3vpY4O0tEQ2HoI6ceUeqSsX6J3GF0BsbHt4zQxk2qY9Y3XqBL HLXWaFe5rBmexfRUnis0LTfHQH2pGTZm7Pld9SQ63ccoQLGKPJjbjuv0UisPl51a 0BqA4bmUfOD7PGroojJ72NEMO8mjy/JROvUTqk2s6KDZOtlXxtY7qcDhTgtA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1721704305; x=1721790705; bh=1B9I0fJSLPBjnYWn28xK1Dj4/OEt sqDWxR+cPaZ1D0g=; b=ka92SNoPlkW1VxEGFQQP980LJc7zNlwtcxPU+dGugyOh 35kTzYSqHN0DDc5gMxdQmZ0guwmqiOgC1spGhHNTZJlE5JfYm7baHh/ePX80Pxvn zyRjltYwZYwhXXDW85Uq82k8b8+FAqbdt1pvX+KpjFPSRG6rj8yxcYkzb9taSh7p 4O4ksmXgnd4Zi7XfDPiSBc+3MyGdX9IFhvo5LrQIhnDOq3F8Opf0rUx2itl7aZMw rsqZJ2ifaOwBCLGsY1U3kYZXBqSECMSuq0EuB/DVxGm0UMCJAZg8mJxYsnZktn2h PrhGXj64suyc2HhoBlJMZpSURJkIZViRuqOhRUseng== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrheekgdeilecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepfgfhvffufffkgggtgfesthhqredttd erjeenucfhrhhomhepkfgrnhcugfhurhgvuceoihgrnhesrhgvthhrohhsphgvtgdrthhv qeenucggtffrrghtthgvrhhnpeekieeggeffhfelhffgieffveejjeehvdejffeiieefie etleevudeuleejheehjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpehirghnsehrvghtrhhoshhpvggtrdhtvhdpnhgspghrtghpthhtoheptd X-ME-Proxy: Feedback-ID: id9014242:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Mon, 22 Jul 2024 23:11:44 -0400 (EDT) User-agent: mu4e 1.8.13; emacs 28.2 From: Ian Eure Date: Mon, 22 Jul 2024 19:13:44 -0700 Message-ID: <87h6cgu7io.fsf@meson> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=103.168.172.157; envelope-from=ian@retrospec.tv; helo=fhigh6-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 32F9363705 X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -5.21 X-Spam-Score: -5.21 X-TUID: S2XJnskuV4E9 I have a fairly standard agent setup for using a hardware token=20 for SSH and GPG. On my local (Debian, currently) machine, gpg-agent=E2=80=99s configuration= =20 has `enable-ssh-support', and my shell dotfiles set SSH_AUTH_SOCK=20 to the gpg-agent socket, which allows SSH to access the=20 authentication key on my token. Additionally, my SSH config has=20 `ForwardAgent yes', which allows the remote system to talk to the=20 local gpg-agent, enabling things like logging into a remote=20 machine and running `git pull' for repos accessed over SSH. For this to work requires /conditionally/ setting SSH_AUTH_SOCK:=20 on the local host, it needs to be set to the local GPG agent; but=20 on a remote host, it needs to be the forwarded SSH agent. The=20 SSH_AUTH_SOCK variable is set by SSH when setting up the=20 connection, so all that=E2=80=99s needed is to check $SSH_CONNECTION, and=20 leave SSH_AUTH_SOCK untouched -- this is what my shell dotfiles=20 do. Unfortunately, this breaks when logging into a remote system which=20 uses Guix Home=E2=80=99s `home-gpg-agent-service-type'. I initially=20 thought this was an issue converting my homegrown dotfile setup to=20 Guix Home, but after troubleshooting, this appears to be a Guix=20 Home bug. Specifically, the issue is the=20 `home-gpg-agent-environment-variables' procedure in (gnu home=20 services gnupg), which, if `ssh-support?' is enabled in=20 home-gpg-agent-configuration, *unconditionally* sets SSH_AUTH_SOCK=20 to the GPG agent socket. This works for the local host -- I can=20 log into remote systems from a Guix Home machine -- but breaks=20 when SSH=E2=80=99ing to a remote system using Guix Home. I=E2=80=99m not sure how to fix this; home-gpg-agent-environment-variables= =20 returns a list of variables to set, with no facility for=20 conditional logic. Use of bash config files would break for=20 anyone using a different shell -- and how would=20 `home-gpg-agent-service-type' know what shell the user has chosen? If I unset `ssh-support?', it disables both the bad behavior, but=20 also the gpg-agent configuration which enables SSH agent support. Right now, the only thing that seems like it might work is adding=20 another home-environment-variables-service-type which saves the=20 value of SSH_AUTH_SOCK to another variable, which my shell init=20 files can look at later in the process. This feels like a=20 graceless hack (and the base stuff to make this all work already=20 feels overly complex), and would require further hackery for the=20 same dotfiles to work on non-Guix Home systems, which at least=20 some of my configs still do. The other option is to quit using `home-gpg-agent-service-type' at=20 all, and handle all this stuff manually. I don=E2=80=99t love it, but it=20 seems like probably the best option. Thoughts? Thanks, =E2=80=94 Ian