public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@warthog.cambridge.redhat.com>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: David Howells <dhowells@cambridge.redhat.com>,
	Dean Anderson <dean@av8.com>,
	Trond Myklebust <trond.myklebust@fys.uio.no>,
	Garance A Drosihn <drosih@rpi.edu>,
	Jan Harkes <jaharkes@cs.cmu.edu>,
	David Howells <dhowells@redhat.com>,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [OpenAFS-devel] Re: [PATCH] PAG support, try #2
Date: Fri, 16 May 2003 13:12:45 +0100	[thread overview]
Message-ID: <12957.1053087165@warthog.warthog> (raw)
In-Reply-To: <Pine.LNX.4.44.0305150959230.4512-100000@home.transmeta.com>


> My take on this is that I'm personally totally uninterested in AFS and
> Kerberos.

A lot of people though are interested in network filesystems (of which AFS is
but one example) and authenticating them (Kerberos is not unusual for this).

AFS itself doesn't really give a rat's backside about PAGs. They exist solely
within the client's deranged imagination as a means of coordinating sessions
between the kernel and userspace AFAICT and they are also used as a basis for
selecting cached credentials.

> What I _am_ interested in is things like per-user VPN keys, and things
> like keeping my local harddisk encrypted.

Anything that can be used for network fs's (with distributed authority
services) ought to be useful for purely local token management (where the
authority is trivial).

> So myt background is that unless the credentials are useful for something
> like that, then they aren't useful AT ALL.

I concur.

> With a local encryption, what I'm perfectly willing to do is to go through
> a "strong authentication" once, but once I've done that, I don't want to
> do it again every time I log in to that machine.

Are you requiring that the tokens be retained when you fully log out from a
machine?

> I use ssh all the time, and I have a few machines I trust, so when I come in
> from such a trusted machine, and the strong authentication session is
> already in progress, I don't want to see a password or anything like
> that. It should "just work".

I take it you're _not_ talking about transferring tokens from one machine to
another as part of the ssh login.

> And most importantly, it should "just work" _without_ having to have some
> central service have to know about it. I'm a big believer in _not_ having
> deamons that keep track of something and having to connect to them. I'm ok
> with a "ssh-agent", but I absolutely _abhor_ linkages, and if that ssh
> agent has to know about some "super-agent", and that "super-agent" has to
> talk to my "disk-agent", then you have a total disaster on your hands.

So you copy /etc/passwd around by hand every time you change your password
rather than using NIS, YP, Kerberos, SMB or whatever?

OTOH, with a large organisation with lots and lots of computers, by using
something like this a user should be able to log in anywhere, change their
password anywhere, etc without running the sysadmins ragged.

Or am I misunderstanding you? Are you talking about local daemons for keeping
hold of the tickets you've been granted by remote authorities? If that's the
case, then yes, I agree with you, but I haven't suggested such a thing is
necessary. I don't believe Kerberos, for instance, needs such a thing, but I
may be wrong.

> So I think I should be able to write a small PAM agent that automatically
> joins me with the right keys when I log in. This is my requirement. And
> part of that requirement is that my PAM agent should _not_ have to know
> about _other_ agents that may also be adding and removing keys. There
> should be no "linkages" between different key spaces, yet they should be
> able to use the same basic kernel infrastructure to maintain them.

Sort of like login reads /etc/groups to find out which groups you're in and
then calls setgroups() to load them into the kernel?

Actually, what you're describing sounds like it may have a race, but probably
not one that's significant. What happens if two login sessions for the same
user try to happen simultaneously and both immediately see that the default
keyring for that doesn't yet exist?

> And this is where naming becomes important. Because there should be no
> linkages, I think the ad-hoc naming is a bug.  My PAM module shouldn't
> have to ask somebody else what key ID's to use. It knows who I am, it
> should know where to add my keys. And it should be able to add my keys
> _without_ being in the way of somebody else adding keys.

Sounds like keyrings need names and ACLs (at the very least an owner UID).

> And when I add a key in one window, I want that key to be available in the
> other windows that were opened with independent SSH sessions. Again,
> without having to go through some super-agent to figure things out. The
> kernel _is_ the agent, and if we're adding key knowledge, we should do it
> right.

Fair enough... mostly. You still have to be able to prevent it from been added
under some circumstances.

> If I want just _one_ session to get some special powers (let's say that I
> do the equivalent of "su", except I do it by adding the proper credentials
> to my session instead of by changign to root user), then I should be able
> to just do
>
> 	new-session	/* creates a new local keyring at the top of the
> 			   credentials stack */
> 	add-key xxxx	/* adds a new key to the top keyring - and because
> 			   the top keyring now isn't my default one, other
> 			   ssh sessions won't be seeing this key */
>
> but if I do _just_ the
>
> 	add-key xxxx
>
> then I want that key to show up in all my other sessions too, because now
> I'll be adding a key to my "default session". And it also shows up in the
> window where I have even _more_ capabilities - the "new-session" didn't
> drop my old capabilities, it just created a space to hold even more
> (independent) keys.

Hmmm... Do you envision a strict stack? Or a manipulatable sequence? Take a
SUID program for instance, do you want the SUID credentials to override the
pre-exec credentials until discarded (at which point there's no way to
retrieve them)? Or do you envision the following "commands":

 (*) new-session <name> [<ACL>]

     Create a new private keyring or session, potentially with ACL governing
     joining, modification, etc. by users and/or groups.

 (*) list-sessions <name>

     List keyrings available to this process

 (*) list-keys <name>

     List keys in the available session

 (*) upgrade-session <name>

     Move session to front of sequence. Becomes provider of UID/GID for
     this process.

 (*) add-key [--session <name>] <data>

     Add a key to the primary or named session.

David

  reply	other threads:[~2003-05-16 12:00 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-14 10:43 [PATCH] PAG support, try #2 David Howells
2003-05-14 10:56 ` Christoph Hellwig
2003-05-14 11:56   ` David Howells
2003-05-14 12:35     ` Christoph Hellwig
2003-05-14 12:45     ` William Lee Irwin III
2003-05-14 12:57     ` Jeff Garzik
2003-05-14 11:49 ` Matthew Wilcox
2003-05-14 12:03   ` David Howells
2003-05-14 16:49 ` Linus Torvalds
2003-05-14 17:37   ` David Howells
2003-05-15 11:18     ` Ingo Oeser
2003-05-18 14:51       ` Trond Myklebust
2003-05-14 19:28   ` H. Peter Anvin
2003-05-14 16:58 ` Jan Harkes
2003-05-14 17:11   ` Jan Harkes
2003-05-14 20:45   ` [OpenAFS-devel] " Harald Barth
2003-05-15  0:14   ` Garance A Drosihn
2003-05-15  0:57     ` Linus Torvalds
2003-05-15  1:34       ` Trond Myklebust
2003-05-15  2:30         ` Linus Torvalds
2003-05-15 14:04           ` Dean Anderson
2003-05-15 16:20             ` Linus Torvalds
2003-05-15 16:41               ` David Howells
2003-05-15 17:23                 ` Linus Torvalds
2003-05-16 12:12                   ` David Howells [this message]
2003-05-15 23:00           ` Garance A Drosihn
2003-05-15 23:21             ` QM_MODULES Function not implemented John Shillinglaw
2003-05-16  0:53             ` [OpenAFS-devel] Re: [PATCH] PAG support, try #2 Nathan Neulinger
2003-05-15  4:26       ` Russ Allbery
2003-05-15  4:59         ` Linus Torvalds
2003-05-15 15:34           ` Booker Bense
2003-05-15 13:12       ` Garance A Drosihn
2003-05-15 15:55         ` Douglas E. Engert
2003-05-15 13:35       ` David Howells
2003-05-15 13:55         ` chas williams
     [not found] <BKEGKPICNAKILKJKMHCAKEDODAAA.Riley@Williams.Name>
2003-05-15 13:26 ` Garance A Drosihn
     [not found] <499763005@toto.iv>
2003-05-15 23:44 ` Peter Chubb
  -- strict thread matches above, loose matches on Subject: below --
2003-05-16 18:05 Dr. Greg Wettstein
2003-05-16 18:28 ` Jesse Pollard

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=12957.1053087165@warthog.warthog \
    --to=dhowells@warthog.cambridge.redhat.com \
    --cc=dean@av8.com \
    --cc=dhowells@cambridge.redhat.com \
    --cc=dhowells@redhat.com \
    --cc=drosih@rpi.edu \
    --cc=jaharkes@cs.cmu.edu \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    --cc=trond.myklebust@fys.uio.no \
    /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