mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
To: David Herrmann <dh.herrmann@gmail.com>
Cc: Andy Lutomirski <luto@amacapital.net>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Arnd Bergmann <arnd@arndb.de>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Tom Gundersen <teg@jklm.no>, Jiri Kosina <jkosina@suse.cz>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Daniel Mack <daniel@zonque.org>,
	Djalal Harouni <tixxdz@opendz.org>
Subject: Re: Sharing credentials in general (Re: [GIT PULL] kdbus for 4.1-rc1)
Date: Mon, 27 Apr 2015 15:57:32 +0100	[thread overview]
Message-ID: <20150427155732.7e2fdbd4@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <CANq1E4T8h5p=Ryd0dR8VPqnpDi73qLAJuLhjOTtoP343SMJJ1g@mail.gmail.com>

> But this is not how authorization with polkit works (or anything
> similar to polkit). The authorization-framework is totally separated

Thats a detail which is changeable

> from the client that accesses a service. The client asks a service
> provider to perform an action. The service provider then asks the
> authorization-framework, whether the client is authorized to run the
> action. 

This is not good design IMHO. The client should always be indicating it
intends to pass on the credentials it has. That stops privileges leaking
or programs being tricked into things.

> The authorization-framework is explicitly separated from
> credential-passing. It has a separate configuration that is neither
> controlled by the client nor the service-provider (the default is
> usually provided by the latter, though). Therefore, credentials that
> are passed are not associated with an action, but rather with the
> identity of the client. If a client does not want to run an operation
> as its current identity, it better does not call it.

You still want such a usage to involve a client sending a message flag
which says "and this message is an authority to use the following
credential". Given the daemon the other end already has the rights to
perform the action the daemon can presumably be trusted to remember to
check.

> Without LSM, we don't have such a unique identifier. Therefore, we
> send the UIDs+GIDs+CAPs+NAMEs combination. Those we pass on to the
> authorization framework, to decide on whether the peer is privileged.
> And we believe those should be mandatory, not optional, just like the
> seclabel we send if an LSM is active.

The mashed up caps and names really ought to be replaced by something
better. Especially the names. Would it make sense to put some kind of
security label on the executable and pass that instead ? So instead of
all the caps and names crap you label the executable itself as having
"kbus:awesomerebootpower" or whatever so the kernel can see that cleanly
as a label that's basically a kbus namespace capability ?

Alan

  reply	other threads:[~2015-04-27 14:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-23 19:41 Andy Lutomirski
2015-04-23 21:05 ` Linus Torvalds
2015-04-23 22:08   ` Andy Lutomirski
2015-04-27  8:17     ` David Herrmann
2015-04-27 14:57       ` One Thousand Gnomes [this message]
2015-04-27 15:50         ` David Herrmann
2015-04-27 16:13           ` Andy Lutomirski
2015-04-27 16:33             ` David Herrmann
2015-05-02  1:48               ` Andy Lutomirski
2015-05-03 19:43                 ` Havoc Pennington
2015-04-27 13:01 ` Djalal Harouni
2015-04-27  5:38 George Spelvin

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=20150427155732.7e2fdbd4@lxorguk.ukuu.org.uk \
    --to=gnomes@lxorguk.ukuu.org.uk \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=daniel@zonque.org \
    --cc=dh.herrmann@gmail.com \
    --cc=ebiederm@xmission.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jkosina@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=teg@jklm.no \
    --cc=tixxdz@opendz.org \
    --cc=torvalds@linux-foundation.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

all inboxes | Powered by JetHome®