All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Tagliamonte <paultag@debian.org>
To: Stephen Smalley <stephen.smalley.work@gmail.com>
Cc: Mike Palmiotto <mike.palmiotto@crunchydata.com>,
	SElinux list <selinux@vger.kernel.org>
Subject: Re: Configuring MLS with a daemon operating at multiple sensitivities
Date: Thu, 14 May 2020 10:57:07 -0400	[thread overview]
Message-ID: <CAO6P2QS0ze4e7qRfZBkemZTaM9QQUwUwhNs2bG4gfTkenwcsiA@mail.gmail.com> (raw)
In-Reply-To: <CAEjxPJ4ePzeuhiRdLndM3U7sybjG8QUO8xhd5RuFNH-YB8NB1w@mail.gmail.com>

> Was computing the MLS label the only part you needed?  With respect to
> having the daemon run in the same label as the peer (or the label
> derived from the intersection of the peer and the daemon), you may
> wish to have a look at mod_selinux for Apache and/or the old xinetd
> LABELED option, although neither of those would have included the new
> glblub support so you'll have to integrate that yourself.

Ah, really helpful pointers, thank you very much!

> Or your daemon can just use setcon(3) directly if allowed by policy.

My assumption was that I can use the greatest lower bound, and then
preform a `setexeccon` and `exec` to transition to the new security
context provided I can pass the open fd according to policy (for
now -- at least until I can find a better way to restrict a thread -- I'll
do some reading in mod_selinux / xinetd). Is this the case, or am
I going to wind up in a world of hurt?

The use-case here is to allow an RPC server to listen to network
traffic, and when properly authenticated, raise the sensitivity level
and category as required, both so the RPC server can logically
handle access controls (not shocked the crunchy folks hit this first)
as well as a system level protection in case there's a slip up and
the server attempts to read a secure file (less urgent but still
very nice to have!).

I'm very much still learning the MLS ropes here, so if someone
sees me hurtling to the edge of a cliff, do let me know!


-- 
:wq

  reply	other threads:[~2020-05-14 14:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-14 12:45 Configuring MLS with a daemon operating at multiple sensitivities Paul Tagliamonte
2020-05-14 13:55 ` Mike Palmiotto
2020-05-14 14:00   ` Paul Tagliamonte
2020-05-14 14:50     ` Stephen Smalley
2020-05-14 14:57       ` Paul Tagliamonte [this message]
2020-05-14 15:29         ` Stephen Smalley
2020-05-15  0:33           ` Paul Moore

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=CAO6P2QS0ze4e7qRfZBkemZTaM9QQUwUwhNs2bG4gfTkenwcsiA@mail.gmail.com \
    --to=paultag@debian.org \
    --cc=mike.palmiotto@crunchydata.com \
    --cc=selinux@vger.kernel.org \
    --cc=stephen.smalley.work@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.