Gnus development mailing list
 help / color / mirror / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
To: ding@gnus.org
Cc: Tramp Development List <tramp-devel@gnu.org>,
	Emacs developers <emacs-devel@gnu.org>
Subject: global authinfo mechanism in Emacs, Gnus, Tramp (was: mail-source.el patch to use netrc-parse)
Date: Thu, 28 Feb 2008 09:38:50 -0600	[thread overview]
Message-ID: <86bq61m6ph.fsf_-_@lifelogs.com> (raw)
In-Reply-To: <v93arsk0ey.fsf@marauder.physik.uni-ulm.de> (Reiner Steib's message of "Sat, 16 Feb 2008 23:21:25 +0100")

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
tramp-devel.

Logically the structure of the global authinfo would be:

entry:
 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.

Ted




  parent reply	other threads:[~2008-02-28 15:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-05 20:37 mail-source.el patch to use netrc-parse Ted Zlatanov
2008-02-16 22:21 ` Reiner Steib
2008-02-28 15:38   ` Ted Zlatanov
2008-04-25 18:52     ` Ted Zlatanov
2008-02-28 15:38   ` Ted Zlatanov [this message]
2008-02-28 16:12     ` global authinfo mechanism in Emacs, Gnus, Tramp Tom Tromey
2008-02-28 18:03       ` Ted Zlatanov
2008-02-28 17:48         ` Tom Tromey
2008-03-06 22:36     ` Ted Zlatanov

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

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

  git send-email \
    --in-reply-to=86bq61m6ph.fsf_-_@lifelogs.com \
    --to=tzz@lifelogs.com \
    --cc=ding@gnus.org \
    --cc=emacs-devel@gnu.org \
    --cc=tramp-devel@gnu.org \
    /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.
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 NNTP newsgroup(s).