emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: auth-source-search regex/fuzzy/partial match


From: Ted Zlatanov
Subject: Re: auth-source-search regex/fuzzy/partial match
Date: Sun, 12 Jul 2020 20:56:50 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

On Fri, 21 Jun 2019 21:41:06 -0700 Pierre Penninckx <ibizapeanut@gmail.com> 
wrote: 

PP> I was wondering if some work was done already to allow for
PP> `auth-source-search' to return entries that partially match the given
PP> spec. I didn't find anything on this subject after a some research.

PP> For example, say `(auth-source-search :host "test" :max 10)' finds one 
match.
PP> I'd like `:host "tes"' or `:host "est"' to find that match too.

PP> If a backend provides something like this, it's by using some custom
PP> code circumventing `auth-source-search'.

PP> I'm thinking the best way to add this would be to enhance the `spec'
PP> argument from `auth-source-search' to take an additional `:regex'
PP> property.

PP> Or would adding a new function make more sense?

Hi Pierre. Sorry for the late reply.

We can certainly add this generally, but my concern is that it would
make queries less precise and thus a little more likely to leak
credentials unintentionally.

OTOH I can imagine some use cases for :host regex matching specifically:

* based on the domain name, ignoring the hostname
* based on a hostname pattern without the domain name
* against the whole FQDN

Would that be sufficient for your needs or would you propose other use cases?

Thank you
Ted



reply via email to

[Prev in Thread] Current Thread [Next in Thread]