GNU bug report logs - #58985
29.0.50; Have auth-source-pass behave more like other back ends

Previous Next

Package: emacs;

Reported by: "J.P." <jp <at> neverwas.me>

Date: Thu, 3 Nov 2022 13:52:02 UTC

Severity: wishlist

Tags: patch

Found in version 29.0.50

Done: "J.P." <jp <at> neverwas.me>

Bug is archived. No further changes may be made.

Full log


Message #94 received at 58985 <at> debbugs.gnu.org (full text, mbox):

From: "J.P." <jp <at> neverwas.me>
To: Akib Azmain Turja <akib <at> disroot.org>
Cc: Damien Cassou <damien <at> cassou.me>,
 Björn Bidar <bjorn.bidar <at> thaodan.de>, emacs-erc <at> gnu.org,
 Michael Albinus <michael.albinus <at> gmx.de>, 58985 <at> debbugs.gnu.org
Subject: Re: bug#58985: 29.0.50; Have auth-source-pass behave more like
 other back ends
Date: Mon, 14 Nov 2022 07:12:39 -0800
[Message part 1 (text/plain, inline)]
Akib Azmain Turja <akib <at> disroot.org> writes:

> "J.P." <jp <at> neverwas.me> writes:
>
>> 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 <at> HOST".

That's the effect, right. I think `directory-files-recursively'
basically determines the ordering in which the entries are considered.

> I created the password store entry "foo.com/bar.org".  Then I evaluated:
> (warning: manually typed with hands)
>
> (auth-source-search :host "bar.org")
> ;; => nil
>
> (auth-source-search :host "foo.com")
> ;; => ((:host "foo.com" :user "bar.org" :secret ...))
>
> I created another entry "bar.org <at> 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 <at> 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.

I have tried tweaking things in that direction. But as far as
deprecating the /user form officially: that seems more like a group
decision. And then there's the question of how to express such a policy.
Should we emit a warning? At the very least, it would need to be
documented somewhere.

Anyway, this is useful analysis. Thanks again for all your help.

[0000-v6-v7.diff (text/x-patch, attachment)]
[0001-POC-Make-auth-source-pass-behave-more-like-other-bac.patch (text/x-patch, attachment)]
[0002-POC-Support-auth-source-pass-in-ERC.patch (text/x-patch, attachment)]

This bug report was last modified 2 years and 223 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.