From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/66384 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.devel,gmane.emacs.gnus.general 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 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <86bq61m6ph.fsf_-_@lifelogs.com> References: <86ejbrrvg3.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1204213065 25383 80.91.229.12 (28 Feb 2008 15:37:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 Feb 2008 15:37:45 +0000 (UTC) Cc: Tramp Development List , Emacs developers To: ding@gnus.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 28 16:38:01 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JUkp4-0003oG-Lb for ged-emacs-devel@m.gmane.org; Thu, 28 Feb 2008 16:37:26 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JUkoY-00051u-8i for ged-emacs-devel@m.gmane.org; Thu, 28 Feb 2008 10:36:54 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JUkoT-00051L-Cr for emacs-devel@gnu.org; Thu, 28 Feb 2008 10:36:49 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JUkoS-00050v-Lz for emacs-devel@gnu.org; Thu, 28 Feb 2008 10:36:49 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JUkoS-00050k-Dr; Thu, 28 Feb 2008 10:36:48 -0500 Original-Received: from mail.blockstar.com ([170.224.69.95]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JUkoS-0006td-Ah; Thu, 28 Feb 2008 10:36:48 -0500 Original-Received: from tzlatanov-ubuntu-desktop.jumptrading.com (unknown [38.98.147.130]) by mail.blockstar.com (Postfix) with ESMTP id C83683E8083; Thu, 28 Feb 2008 07:37:59 -0800 (PST) X-Hashcash: 1:20:080228:emacs-devel@gnu.org::deHRkbGmZpc+sC+6:000000000000000000000000000000000000000000AXF6 X-Hashcash: 1:20:080228:tramp-devel@gnu.org::bkArJpwel04Bu1g9:0000000000000000000000000000000000000000006Lg1 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" X-Hashcash: 1:20:080228:ding@gnus.org::e01NF8+IVG4HV6F+:00008P56 In-Reply-To: (Reiner Steib's message of "Sat, 16 Feb 2008 23:21:25 +0100") User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:90724 gmane.emacs.gnus.general:66384 Archived-At: 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