From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Akib Azmain Turja via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#58985: 29.0.50; Have auth-source-pass behave more like other back ends Date: Mon, 14 Nov 2022 12:50:46 +0600 Message-ID: <87mt8uvxkp.fsf__21752.9603208945$1668475796$gmane$org@disroot.org> References: <87wn8cb0ym.fsf@neverwas.me> <874jvdardn.fsf__3771.40490324877$1667692584$gmane$org@neverwas.me> <87pme09vis.fsf@gmx.de> <87a653z7dl.fsf@neverwas.me> <878rkjl1vd.fsf@disroot.org> <877d026uym.fsf@neverwas.me> <87tu35eehq.fsf@disroot.org> <87bkpcu74w.fsf@neverwas.me> <875yfkdwlm.fsf@disroot.org> <874jv3nwmc.fsf@disroot.org> <875yfiq3d8.fsf@neverwas.me> Reply-To: Akib Azmain Turja Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38695"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Damien Cassou , =?UTF-8?Q?Bj=C3=B6rn?= Bidar , emacs-erc@gnu.org, Michael Albinus , 58985@debbugs.gnu.org To: "J.P." Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 15 02:29:48 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ouklo-0009rb-OJ for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 15 Nov 2022 02:29:48 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ouipo-0002TT-LM; Mon, 14 Nov 2022 18:25:48 -0500 Original-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 1ouih2-0006Ib-8e for bug-gnu-emacs@gnu.org; Mon, 14 Nov 2022 18:16:44 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ouUTi-0005si-Q9 for bug-gnu-emacs@gnu.org; Mon, 14 Nov 2022 03:06:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ouUTi-0001xe-Fy for bug-gnu-emacs@gnu.org; Mon, 14 Nov 2022 03:06:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Akib Azmain Turja Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 14 Nov 2022 08:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58985 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 58985-submit@debbugs.gnu.org id=B58985.16684131347502 (code B ref 58985); Mon, 14 Nov 2022 08:06:02 +0000 Original-Received: (at 58985) by debbugs.gnu.org; 14 Nov 2022 08:05:34 +0000 Original-Received: from localhost ([127.0.0.1]:48860 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ouUTG-0001wv-3B for submit@debbugs.gnu.org; Mon, 14 Nov 2022 03:05:34 -0500 Original-Received: from knopi.disroot.org ([178.21.23.139]:48136) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ouUTD-0001wn-Lf for 58985@debbugs.gnu.org; Mon, 14 Nov 2022 03:05:32 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 0977F40E25; Mon, 14 Nov 2022 09:05:31 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Original-Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id odtvpM2gI9qh; Mon, 14 Nov 2022 09:05:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1668413129; bh=5EG0GAAF98phwINPsiLQcIOZKHPMwdHJM2IYQH66lDY=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=CDwWCo66Z/6ZNv3MQMW07HvW/EgqeiHz+abWaGacY9cdAe0id4T4t8zJVQqNiTZta FXQ4xxP7LVAuTZLf2LMymLnU5MhDD8WjXF4oe2gzVgX02sdTHPiq+92WdUVHbB0x01 ydjmgR2158tkpJ6Pnl3YO/NVKC2MZXlDOzYCYjKZZBIxheltwTc3mf7l/KYKHMPpGN M0wAtxdYgkYbNponiwtXmFFN/W9KvDug2dpuMXaVKF87Sx4/vtWsh4XsVx1kxsf7oi lNcf4+6LQBmbyAbMtvmVwcg0dgSLvKdlO/K1dwRWkU+U1Hb7BPYPnNZp2iIXW/015N dxNAT3+OKICcg== In-Reply-To: <875yfiq3d8.fsf@neverwas.me> (J. P.'s message of "Sun, 13 Nov 2022 07:29:55 -0800") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:247890 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable "J.P." writes: > Akib Azmain Turja writes: > >> Akib Azmain Turja via "Bug reports for GNU Emacs, the Swiss army knife >> of text editors" writes: >> >>> "J.P." writes: >>> >>>> While I certainly welcome the assiduous scrutinizing of Emacs lisp >>>> mechanics and technique (truly), I was mainly hoping that, as an avid >>>> pass user, you would also help flesh out the precise effects of the >>>> behavior introduced by these changes and hopefully share some insights >>>> into how they might impact day-to-day usage for the typical pass user. >>>> Granted, that necessarily involves applying these patches atop your >>>> daily driver and living with them for a spell and, ideally, investing >>>> some thought into imagining common usage patterns beyond your own (plus >>>> any potentially problematic edge cases). If you have the energy to >>>> devote to (perhaps just some of) these areas, it would really help move >>>> this bug report forward. Thanks. >>> >>> Actually, I'm not very brave, and any damage to my password-store would >>> be an absolute disaster. >>> >>> However, I have made a backup and add the encrypted passwords to a Git >>> repository, and since the patch looks safe, I'm going to apply and test >>> it. >> >> I have applied the patch the on top commit f8c11b5a, and it works fine. >> >> I did some basic testing (manually) of auth-source-pass and the >> dependent packages I use, password-store and pass, and they all seem to >> be unaffected when the new option enabled. So I guess we can enable it >> by default. I didn't felt the need of test with the new feature >> disabled, since the patch doesn't touch any old code. > > Awesome. Thanks for all the work. I know it's kind of a hassle. > >> And I also found that, auth-source finds the entry "akib@disroot.org" >> correctly with (auth-source-search :host "disroot.org") when the new >> user option is set to t. > > Yeah, it's sometimes tricky to tell if the new code is even running, so > it's great that you checked that. I'm pretty sure the new code was running, since I set auth-source-do-cache to nil to disable cache prior doing the tests. > >> However, I haven't still installed the Emacs build with the patch >> applied as my daily driver, I'm working on that. The tests were >> performed on Emacs build without GUI. > > OK, nice. > > You mentioned previously some potentially surprising ambiguities > surrounding the trailing /user syntax. If any realistic scenarios > present themselves, perhaps we can try to improve the situation if it's > not too far out of scope (or just document the behavior, maybe in a unit > test). Thanks again. I think it's good enough to install on master. Then more people can test and report about it. However, observed some behavior of the new code, here are my findings: The new searching code seems to prefer "HOST/USER" over "USER@HOST". I created the password store entry "foo.com/bar.org". Then I evaluated: (warning: manually typed with hands) (auth-source-search :host "bar.org") ;; =3D> nil (auth-source-search :host "foo.com") ;; =3D> ((:host "foo.com" :user "bar.org" :secret ...)) I created another entry "bar.org@foo.com". But it returns the password in "foo.com/bar.org". I deleted "foo.com/bar.org", now it return the password of "bar.org@foo.com". I created "foo.com/bar.org" again, and "foo.com/bar.org" is preferred again. I suggest to prefer the "@" syntax over "/user" syntax. =2D-=20 Akib Azmain Turja, GPG key: 70018CE5819F17A3BBA666AFE74F0EFA922AE7F5 Fediverse: akib@hostux.social Codeberg: akib emailselfdefense.fsf.org | "Nothing can be secure without encryption." --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEyVTKmrtL6kNBe3FRVTX89U2IYWsFAmNx5UYACgkQVTX89U2I YWuVrQ//TJfbcaxnR+p3V+ImNrSGd26Nhu3AnQw7ByFQXIYnbqo+qbcHVOR5dGqr doPPvDqrSkMUMkqiytL3KMEqmiut5Dg1VmFzoB9LfAxRtoGWdPjmetUlT7NqEADy MKjZeBBtgOqwNIhSG3YQQIsVcmN0DC1YC15ADJMGW1VQLYd3p21cjtf2XE8CY5/3 cvs+EHFGW0x/98KQxSAOKK8gWaQ/ZwqBUuTfW6LZgQLuoK8IGsHOEFwLd3QwOykK ug9zQkhYkr1JX0g6b/DGjS1xQsAM/2ADQKF2XkorfsqEfBhdoopp8+/S1RWfT6ot /C2bGy8bx8d6WhP/IZZSRcj1vZWs/OmywR7+mE3VWYSllOpn5LNsqRFMlfb3E3II s8G5yR4hRZaHCBtq52ECIv9tAWKwZLfR4hgyLK4TWP2ITsnmWfpsVmMPfbHBr22b LKF3wrBO1tgBbEaQBeJAVYvrHBSx51Fp2D3x1d/Rj2dY2In4wugVMVhHRtCcMyZP lPsEsUBREFIczZisIroKPSF+cy+LlV086o9khWESKVYlpOspqGU+GFONyETFyLtG al69lxGRsVZUtL1RRP3VroX6fLysPD86ScbklOOuJgqD+BTfQTQgtEkqmgjHAT/y 3U1pyWzKY622sJ41cDanuh3OXw+yXCI6s39Uka+MdZwK9Wg9mFU= =sfqN -----END PGP SIGNATURE----- --=-=-=--