Gnus development mailing list
 help / color / mirror / Atom feed
* Password protection
@ 2010-09-28 14:17 Lars Magne Ingebrigtsen
  2010-09-28 14:43 ` Richard Riley
                   ` (4 more replies)
  0 siblings, 5 replies; 40+ messages in thread
From: Lars Magne Ingebrigtsen @ 2010-09-28 14:17 UTC (permalink / raw)
  To: ding

I find it sort of puzzling that we have to jump through all these hoops
to get at credentials.  I mean, Firefox users don't have to set up a gpg
agent or type their passwords a gazillion times, so why should users?

But then I thought about it, and it is rather complicated.  It's
acceptable to store the passwords in memory (that's what Firefox does),
but it's not acceptable that any Lisp phrase can say
(get-stored-password ...), and then get the password.  That's too
unsafe.

So here's my thought:  If there was a C-level function that would slurp
in your ~/.authinfo.gpg data, and then let you use it, but without
actually ever letting a Lisp-level function see the passwords --
wouldn't that be nice?

Here's how I see it working:

1) Gnus calls (authinfo-store-tokens "~/.authinfo.gpg"), and the user is
(probably) prompted for a password.

2) The data is stored in the C layer, probably obfuscated in some way.

3) A new C function is added:

(process-send-auth process "LOGIN larsi %p\n\r"
                   '((:hosts ("imap.gmail.com"))
                     (:ports ("imaps" "imap" 443))
                     (:user ("larsi"))))

This function would then work just like `process-send-string', only that
it roots out the first matching password from the auth info first, and
expand the string sent.

That way the Lisp application layer will never actually see the
password, but it will be able to control what's otherwise being sent,
and what credentials to use in a flexible manner.

This should be as safe as the Firefox model.  That is, if you read
/proc/mem, you can get at the passwords, but it's not trivially
available from the Lisp layer.  Well, unless you set up a loopback
server or a proxy or something, but the same is the case with Firefox.

Am I missing something obvious here?

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




^ permalink raw reply	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2011-03-07 17:27 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-28 14:17 Password protection Lars Magne Ingebrigtsen
2010-09-28 14:43 ` Richard Riley
2010-09-29 14:01   ` Lars Magne Ingebrigtsen
2010-09-28 14:46 ` Julien Danjou
2010-09-28 14:50   ` Ted Zlatanov
2010-09-29 14:04   ` Lars Magne Ingebrigtsen
2010-09-28 14:47 ` Ted Zlatanov
2010-09-29 14:07   ` Lars Magne Ingebrigtsen
2010-09-29 16:56     ` Charles Philip Chan
2010-09-29 17:15     ` Ted Zlatanov
2010-09-29 19:27       ` Lars Magne Ingebrigtsen
2010-09-29 19:51         ` Ted Zlatanov
2010-09-29 20:35           ` Michael Albinus
2010-09-29 20:58             ` Ted Zlatanov
2010-09-30  3:32               ` Michael Albinus
2010-09-30 15:46                 ` Ted Zlatanov
2010-09-30 17:19                   ` Michael Albinus
2010-09-30 16:25                 ` Lars Magne Ingebrigtsen
2010-09-30 16:43                   ` Ted Zlatanov
2010-09-30 16:47                     ` Lars Magne Ingebrigtsen
2010-09-30 17:07                       ` Ted Zlatanov
2010-09-30 17:17                         ` Lars Magne Ingebrigtsen
2010-09-30 17:45                           ` Ted Zlatanov
2010-09-30 17:51                             ` Lars Magne Ingebrigtsen
2010-09-30 19:11                               ` Michael Albinus
2010-09-30 17:13                       ` Michael Albinus
2010-09-30 17:16                     ` Michael Albinus
2010-09-29 21:38           ` Lars Magne Ingebrigtsen
2011-02-25 22:18             ` Ted Zlatanov
2011-03-05 11:53               ` Lars Magne Ingebrigtsen
2011-03-07 17:27                 ` Ted Zlatanov
2010-09-28 15:02 ` David Engster
2010-09-29  2:28 ` Daniel Pittman
2010-09-29  4:39   ` Richard Riley
2010-09-29  5:58     ` Daniel Pittman
2010-09-29  6:42       ` Richard Riley
2010-09-29  8:54   ` Gijs Hillenius
2010-09-29  9:07     ` Richard Riley
2010-09-29 10:23       ` Gijs Hillenius
2010-09-29  9:51     ` Tassilo Horn

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).