emacs-devel
[Top][All Lists]
Advanced

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

Re: Potential bug/inconsistency in auth-source netrc vs plstore backends


From: Xiyue Deng
Subject: Re: Potential bug/inconsistency in auth-source netrc vs plstore backends
Date: Thu, 07 Nov 2024 13:34:05 -0800
User-agent: Notmuch/0.38.3 (https://notmuchmail.org) Emacs/29.4 (x86_64-pc-linux-gnu)

Soham Gumaste <sohamg2@gmail.com> writes:

> Hello,
>
> I am trying to patch the `oauth2.el` elpa library to better integrate
> with the native auth-sources system so that functions like nnimap and
> smtpmail can use it transparently.
>
> I noticed the following inconsistency while playing with this: As
> shown by [1], the netrc backend does not require :host, :user or :port
> as required keys in matched results, however, the plstore backend
> requires :host, :login: :port and :secret.
>
> This is causing an issue for me as I would like to patch the oauth2.el
> library to store the access token as a secret, but without any port
> associated with it. The oauth2.el library already uses plstore and it
> is the more convenient backend to use.
>
> Please let me know if this is indeed a bug and the possible direction
> for a bugfix patch if that is the case.
>
> Thanks
>
>
> [1]: 
> https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/auth-source.el#n1274
> [2]: 
> https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/auth-source.el#n2112
> -- 
> Soham Gumaste
> sohamg2@gmail.com
>

I have done some recent improvements to `oauth2.el'[1] and provided a
hackish solution to use it with auth-source[2].  I wonder whether you
have tried those out and would like to get your feedback.

I am also interested in what you are adding to/modifying `oauth2.el'.
In case it's related, in the previous bugs I saw people seemed confused
about why `oauth2.el' used a separate storage for storing
refresh_token/access_token/etc. while still keeping the other
credentials (e.g. client_id, client_secret, etc.) in auth-sources.  My
understanding is that the data in the separate plstore are ephemeral,
e.g. they can expire and need to be refreshed, so it makes sense to use
a separate storage.  This also can be helpful in case you want to keep
it in sync among multiple machines.

[1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=72358
[2] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=72992

-- 
Regards,
Xiyue Deng

Attachment: signature.asc
Description: PGP signature


reply via email to

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