From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.devel Subject: Re: auth-source-search regex/fuzzy/partial match Date: Sun, 12 Jul 2020 20:56:50 +0000 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32855"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Pierre Penninckx Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jul 12 22:57:26 2020 Return-path: Envelope-to: ged-emacs-devel@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 1juj2M-0008SU-Gs for ged-emacs-devel@m.gmane-mx.org; Sun, 12 Jul 2020 22:57:26 +0200 Original-Received: from localhost ([::1]:53942 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1juj2L-00024s-HF for ged-emacs-devel@m.gmane-mx.org; Sun, 12 Jul 2020 16:57:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36430) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1juj1r-0001do-DY for emacs-devel@gnu.org; Sun, 12 Jul 2020 16:56:55 -0400 Original-Received: from mail-qk1-x72f.google.com ([2607:f8b0:4864:20::72f]:43930) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1juj1p-0001r1-Q5 for emacs-devel@gnu.org; Sun, 12 Jul 2020 16:56:55 -0400 Original-Received: by mail-qk1-x72f.google.com with SMTP id c30so10395717qka.10 for ; Sun, 12 Jul 2020 13:56:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lifelogs.com; s=google; h=from:to:cc:subject:organization:references:mail-copies-to:date :in-reply-to:message-id:user-agent:mime-version; bh=idH1ZsT/WyC8kzWS4C9GhH/wITQupytpn/pUlCzvRdo=; b=dDZ3Q/kR2nBvuCZSr83HK5oewffVeBT6oyTzIAz0TsNBgDoSP6bPjNmWAi5uVNXD+D CRHXhKdN6YbIjLQx4RRO/sJdSxgiziIEoA+TC0dfS95w5mlNl2CfFJJAfoFNBinDW+6L G2AIipsfReF/srikif9nKwzt4h5+T4bnjQi7M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:organization:references :mail-copies-to:date:in-reply-to:message-id:user-agent:mime-version; bh=idH1ZsT/WyC8kzWS4C9GhH/wITQupytpn/pUlCzvRdo=; b=lCv2AfIzeNeuyLLLOI6nZ1nQ51yEBDWNQuUQiNHdS1YT/EEAtXTZabt6M+eI2ZDxR3 Iz8xkiadhGX+wkuUVDMchcao1d0uzP6J0k6p5OP4HCapVn/ziyYdkUlMGRDw3iK8z2cH W0DEGMGI90PQlqYGlA/see2eo9saEweSVzO1ZMd7HLM0ZTDJ72vVYRC/gHrGpTHhMXS1 6sTB2U35zXs1hkAO1p8f0WCs2JZWkF3k8g26I7GPBTge/loOF/jcvwOvSfTrg3RWIduj Mx/T3TgOdJhOrnb0qgNHlfKhqJIlLSokEu+AkBtEX5Wea39RKAMjuSxh2EVdWsuczJRf Bt8Q== X-Gm-Message-State: AOAM532bnEWXvyBFG1dmhys/8uRjfP+hLQABEBcqao+swzxsS7D9/cai tOTIxALOJnxHNpEc7BLXNYvzGH0hfL047Q== X-Google-Smtp-Source: ABdhPJxDbar0T4PgvBtA/CN+MqEJQHXVSbRsmLdT7XREaVvDXXk763lAMd2hBA4jW5hZsXXtCYl60A== X-Received: by 2002:a37:6d4:: with SMTP id 203mr77057685qkg.62.1594587412385; Sun, 12 Jul 2020 13:56:52 -0700 (PDT) Original-Received: from flea (c-76-28-41-155.hsd1.ma.comcast.net. [76.28.41.155]) by smtp.gmail.com with ESMTPSA id j24sm15340551qkl.79.2020.07.12.13.56.51 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 12 Jul 2020 13:56:51 -0700 (PDT) X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Mail-Copies-To: never In-Reply-To: (Pierre Penninckx's message of "Fri, 21 Jun 2019 21:41:06 -0700") Received-SPF: none client-ip=2607:f8b0:4864:20::72f; envelope-from=tzz@lifelogs.com; helo=mail-qk1-x72f.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:252891 Archived-At: On Fri, 21 Jun 2019 21:41:06 -0700 Pierre Penninckx 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