unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
To: Pierre Penninckx <ibizapeanut@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: auth-source-search regex/fuzzy/partial match
Date: Sun, 12 Jul 2020 20:56:50 +0000	[thread overview]
Message-ID: <pn90lael.fsf@lifelogs.com> (raw)
In-Reply-To: <CAMzgWy3RgMpH2vY5sSRV7zPCTb2cTrsW1SOckXw+dxMO+HX==w@mail.gmail.com> (Pierre Penninckx's message of "Fri, 21 Jun 2019 21:41:06 -0700")

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	other threads:[~2020-07-12 20:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-22  4:41 auth-source-search regex/fuzzy/partial match Pierre Penninckx
2020-07-12 20:56 ` Ted Zlatanov [this message]
2020-08-14  6:37   ` Pierre Penninckx

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pn90lael.fsf@lifelogs.com \
    --to=tzz@lifelogs.com \
    --cc=emacs-devel@gnu.org \
    --cc=ibizapeanut@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).