[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
global authinfo mechanism in Emacs, Gnus, Tramp (was: mail-source.el pat
global authinfo mechanism in Emacs, Gnus, Tramp (was: mail-source.el patch to use netrc-parse)
Thu, 28 Feb 2008 09:38:50 -0600
Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux)
Reiner Steib wrote:
> On Tue, Feb 05 2008, Ted Zlatanov wrote:
> > Also, I think instead of the current variables
> > (setq
> > nnimap-authinfo-file "~/.authinfo.enc"
> > nntp-authinfo-file "~/.authinfo.enc"
> > mail-source-authinfo-file "~/.authinfo.enc"
> > smtpmail-auth-credentials "~/.authinfo.enc")
> > Gnus should have a single specification:
> `smtpmail.el', (pop3.el) and `mail-source.el' are not Gnus specific.
> So it should be a general Emacs facility. So please include
> emacs-devel in further discussions. As all ~/.authinfo parsing is
> done via `netrc.el', it might make sense to define it therein?
> > (setq
> > authinfo-files '(('nnimap "~/.imap-authinfo.enc")
> > (t "~/.authinfo.enc")))
> Maybe a simple value "~/.authinfo" should be equivalent
> to '((t "~/.authinfo")).
Agreed. Note also I want to transition netrc.el to use EasyPG instead
of encrypt.el, so changes are coming there anyhow.
> > Then we can derive each of those variables at runtime, if they are not
> > set:
> > (setq nnimap-authinfo-file
> > (or nnimap-authinfo-file (gnus-get-authinfo-file 'nnimap)))
> > WDYT?
I'd deprecate the special variables, personally, and make
gnus-get-authinfo-file respect them but use the global authinfo
otherwise. Also, the global authinfo could have non-file sources,
e.g. hard-coded strings or shell commands. I think that's valuable.
I'm tired of specifying special variables for authentication everywhere
in Emacs and in Gnus. I see a *lot* of questions about setting those
up in Gnus, as well, so I think we can do better.
With a single specification we could also extend it to specify EasyPG
encryption and other things. Right now, specifying IMAP vs. POP
vs. SMTP (TLS and regular) authentication information is annoying.
Tramp could also use this mechanism. I've cc-ed emacs-devel and
Logically the structure of the global authinfo would be:
protocol-or-purpose: ['pop, 'imap, 'imaps, 'ssh, t]
hardcoded: (:user "me" :password 'ask :cache 60)
file: (:name "/a/b/c" :epg-parameters () :other-parameters ())
command: (:program "/bin/true" :parameters ())
This is an initial idea, so don't get hung up on the format. I
intentionally didn't specify it in Customize format.
If something like this already exists in Emacs, please let me know.
- global authinfo mechanism in Emacs, Gnus, Tramp (was: mail-source.el patch to use netrc-parse),
Ted Zlatanov <=