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: Loading credentials from login keyring Date: Thu, 31 Dec 2020 10:14:31 +0000 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16790"; 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: Thomas Hisch , Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Dec 31 11:15:11 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 1kuuz9-0004Gs-9N for ged-emacs-devel@m.gmane-mx.org; Thu, 31 Dec 2020 11:15:11 +0100 Original-Received: from localhost ([::1]:56468 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kuuz8-0003DJ-AQ for ged-emacs-devel@m.gmane-mx.org; Thu, 31 Dec 2020 05:15:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38852) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kuuya-0002lc-CT for emacs-devel@gnu.org; Thu, 31 Dec 2020 05:14:36 -0500 Original-Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:34543) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kuuyY-0003u1-VI for emacs-devel@gnu.org; Thu, 31 Dec 2020 05:14:36 -0500 Original-Received: by mail-wr1-x432.google.com with SMTP id q18so19759850wrn.1 for ; Thu, 31 Dec 2020 02:14:34 -0800 (PST) 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 :content-transfer-encoding; bh=60jzyTWxnFwXZVX8ek59OAQE3zeENpKhkvZwqQuv7yY=; b=RtQlv+4n5sTzMbHdmsTzpAwO4HQxFz9Xlk4P8k5myNH2BuvvH2sQ/q4kKJTzjsDIaX MXIBCLPJOlPN01bfkm2peqAPAZeAhzQ5DngBwWjYfKXyn4yDIich5cQCpJbpMXKsF3VQ +jjxLc8CtMS+fGAIG5WLkd5E3MONoB9Ut26gk= 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 :content-transfer-encoding; bh=60jzyTWxnFwXZVX8ek59OAQE3zeENpKhkvZwqQuv7yY=; b=OkkuH+drjDi+pAWZ3PYolQ7z0bpCvDE03Dtv4x56bGMwHxxQGQolxMp1Oby5CnA8/H X4Y5nZjxL8pYZfnBBIhYYP5LrbSrC10hHS/r/gOXyTpYvtPSKqWp4XdZPsc4hTGmwQb/ mN+X9Et9NFQMB/rYY7wVU2hgifYiJYxhELkSIJofYhdiwUln1mSAU7AkAz+s8wJyS7gF 60jYijsOd8oDd/UtADH5ciOQPWDos91vGxqLqwn3E8/vzfuzhmyo+fSRXJCnM/d0/8VB xJXd+DFtw7lhZdAoRor45Qcqb3e7SEeQ5TuvGjAATWnN+3q6jnu+cOhCY7SAsGYBBDw1 XCNw== X-Gm-Message-State: AOAM533XT9f2ZT0qtjh5NSIK5NHHQXCIgAJ0+McCii8AAs8mEY+Dp/0N h0nXhmxuoZELKuMP8Fxd1OmYGElCOQVwtiB/ X-Google-Smtp-Source: ABdhPJwayce8+WkGmJBPiBqsWkotOEVKtMd6g6w7PSND8jw2+cqHymxKSsp5d+x1UwTod9x1JbSF8g== X-Received: by 2002:adf:9cca:: with SMTP id h10mr63986232wre.77.1609409672777; Thu, 31 Dec 2020 02:14:32 -0800 (PST) Original-Received: from flea ([90.213.192.26]) by smtp.gmail.com with ESMTPSA id l8sm11885978wmf.35.2020.12.31.02.14.31 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 31 Dec 2020 02:14:31 -0800 (PST) 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: (Thomas Hisch's message of "Tue, 29 Dec 2020 20:33:13 +0100") Received-SPF: none client-ip=2a00:1450:4864:20::432; envelope-from=tzz@lifelogs.com; helo=mail-wr1-x432.google.com 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 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:262148 Archived-At: On Tue, 29 Dec 2020 20:33:13 +0100 Thomas Hisch wrote:= =20 TH> I created the credentials using the python-keyring [2] pkg using the co= mmand TH> `keyring set hostname username` TH> The above command creates an entry in the Login keyring that has the TH> following schema (output of `M-x secrets-show-secrets`) TH> `-[-] Password for =E2=80=99thomas.hisch=E2=80=99 on =E2=80=99hostname= =E2=80=99 TH> |- password: ********** [Show password] TH> |- application: Python keyring library TH> |- service: hostname TH> |- username: thomas.hisch TH> `- xdg:schema: org.freedesktop.Secret.Generic TH> The problem now is that `auth-source-user-and-password` doesn't find the TH> credentials in the "Login" keyring, i.e., TH> (let ((auth-sources '("secrets:Login"))) TH> (auth-source-user-and-password "hostname")) TH> returns nil. The reason for this is that `auth-source-user-and-password` TH> searches for an entry with a plist key :host and not with the key :serv= ice. If there will never be a :host in the Login keyring, I have no objection to mapping :service to :host on the backend or specifically in `auth-source-user-and-password`. But I don't know if that will break any existing use cases. Michael, WDYT? Thanks Ted