ksummit.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: David Howells <dhowells@redhat.com>
Cc: ikent@redhat.com,
	James Bottomley <James.Bottomley@HansenPartnership.com>,
	oleg@redhat.com, ksummit-discuss@lists.linuxfoundation.org
Subject: Re: [Ksummit-discuss] [TECH TOPIC] Containerisation, namespaces and keyrings
Date: Sat, 30 Jul 2016 12:50:19 -0500	[thread overview]
Message-ID: <87y44j582s.fsf@x220.int.ebiederm.org> (raw)
In-Reply-To: <15842.1469185302@warthog.procyon.org.uk> (David Howells's message of "Fri, 22 Jul 2016 12:01:42 +0100")

David Howells <dhowells@redhat.com> writes:

> I'm not sure this is the right venue for this, but keyrings will need to be
> namespaced/containerised at some point.
>
> The problem is that it's an icky problem given that different key types really
> want to live in different namespaces, and upcalls may want to done in
> different containers, depending on the key type.

I definitely think there are some techinical details going over with a
fine tooth comb.  Ordinary keys and keyrings that are used for purposes
such as authorization to use files on nfs I long ago put in the user
namespace.   Because they largely serve the same purpose as uids,
and the user namespace is where we have identifiers for security things
stashed away.

My analysis at the time suggested that there were not identifiers that
needed to be preserved over checkpoint/restart (and I was lazy) so the
user namespace only filters these identifiers.

Upcalls and the caching of the results of upcalls are definitely a
problem.  Several years when I was looking at things I found the upcall
code unusable because I could not invalidate cached results.  And of
course we have the long running question of how do we make upcalls
work from a container.

> For example, DNS resolver keys - should they be in the network, the filesystem
> namespace or neither?  Should the upcall be in the current container or the
> root container?
>
> Authentication keys, such as used by kafs and AF_RXRPC - should they be in the
> filesystem namespace (kafs is an fs), the network namespace (AF_RXRPC is a net
> protocol) or the user namespace?
>
> Should crypto keys, such as the asymmetric key type, be in the user namespace?
> What about use by module signing?  Should key operations in the current
> container have access to a blacklist in the root container?  Should key
> verification in the current container have access to system keyrings?  The
> TPM?
>
> This might actually be right for a hallway track.

Hallway track/hackathon.  The solutions to the practical problems will
only come of the right people sitting down with the code and looking at
the issues.  Most of the problems I am aware of are not so much
placement in a namespace but rather technical plumbing issues necessary
to make the things people should work actually work.

Eric

      parent reply	other threads:[~2016-07-30 18:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-22 11:01 David Howells
2016-07-22 13:29 ` Rik van Riel
2016-07-22 14:51 ` James Bottomley
2016-07-26 13:30   ` Serge E. Hallyn
2016-07-26 13:38   ` Laurent Pinchart
2016-07-26 14:16     ` James Bottomley
2016-07-27 19:47 ` Mimi Zohar
2016-07-30 17:50 ` Eric W. Biederman [this message]

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=87y44j582s.fsf@x220.int.ebiederm.org \
    --to=ebiederm@xmission.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=dhowells@redhat.com \
    --cc=ikent@redhat.com \
    --cc=ksummit-discuss@lists.linuxfoundation.org \
    --cc=oleg@redhat.com \
    /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