All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris PeBenito <pebenito@ieee.org>
To: Paul Moore <paul@paul-moore.com>, Daniel Jurgens <danielj@mellanox.com>
Cc: selinux@tycho.nsa.gov, honli@redhat.com, refpolicy@oss.tresys.com
Subject: Re: [PATCH 1/1] networkmanager: Grant access to unlabeled PKeys
Date: Tue, 28 Nov 2017 20:25:05 -0500	[thread overview]
Message-ID: <163e0282-3638-1655-e726-6820265bad19@ieee.org> (raw)
In-Reply-To: <CAHC9VhSTR250fQvNs61VbftsLOX=Lxt5t-CoH1BzXjWRJw2xDw@mail.gmail.com>

On 11/27/2017 05:50 PM, Paul Moore wrote:
> On Mon, Nov 27, 2017 at 3:04 PM, Daniel Jurgens <danielj@mellanox.com> wrote:
>> On 11/27/2017 10:19 AM, Paul Moore wrote:
>>> On Mon, Nov 27, 2017 at 9:03 AM, Dan Jurgens <danielj@mellanox.com> wrote:
>>>> From: Daniel Jurgens <danielj@mellanox.com>
>>>>
>>>> For controlling IPoIB VLANs
>>>>
>>>> Reported-by: Honggang LI <honli@redhat.com>
>>>> Signed-off-by: Daniel Jurgens <danielj@mellanox.com>
>>>> Tested-by: Honggang LI <honli@redhat.com>
>>>> ---
>>>>   networkmanager.te |    2 ++
>>>>   1 files changed, 2 insertions(+), 0 deletions(-)
>>> [NOTE: resending due to a typo in the refpol mailing list address]
>>>
>>> We obviously need something like this now so we don't break IPoIB, but
>>> I wonder if we should make the IB access controls dynamic like the
>>> per-packet network access controls.  We could key off the presence of
>>> the IB pkey and endport definitions: if there are any objects defined
>>> in the loaded policy we enable the controls, otherwise we disable
>>> them.
>>
>> I think I understand what you're saying Paul, but I'm not clear on the mechanism.  Are you referring to the netlabel/IPSEC enable checks? They are wrapped up in selinux_peerlbl_enabled.
> 
> Basically, yes.  We could add a new variable/function that gates the
> access control checks in selinux_ib_pkey_access() and
> selinux_ib_endport_manage_subnet(); the checks would be enabled when
> there was Infiniband configuration loaded with the policy.  Without
> the IB config loaded, all the checks would end up being just a domain
> check against unlabeled_t, which isn't very interesting, so we would
> just drop the checks.

As long as it also respects policycap always_check_network, it works for me.

-- 
Chris PeBenito

WARNING: multiple messages have this Message-ID (diff)
From: pebenito@ieee.org (Chris PeBenito)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] [PATCH 1/1] networkmanager: Grant access to unlabeled PKeys
Date: Tue, 28 Nov 2017 20:25:05 -0500	[thread overview]
Message-ID: <163e0282-3638-1655-e726-6820265bad19@ieee.org> (raw)
In-Reply-To: <CAHC9VhSTR250fQvNs61VbftsLOX=Lxt5t-CoH1BzXjWRJw2xDw@mail.gmail.com>

On 11/27/2017 05:50 PM, Paul Moore wrote:
> On Mon, Nov 27, 2017 at 3:04 PM, Daniel Jurgens <danielj@mellanox.com> wrote:
>> On 11/27/2017 10:19 AM, Paul Moore wrote:
>>> On Mon, Nov 27, 2017 at 9:03 AM, Dan Jurgens <danielj@mellanox.com> wrote:
>>>> From: Daniel Jurgens <danielj@mellanox.com>
>>>>
>>>> For controlling IPoIB VLANs
>>>>
>>>> Reported-by: Honggang LI <honli@redhat.com>
>>>> Signed-off-by: Daniel Jurgens <danielj@mellanox.com>
>>>> Tested-by: Honggang LI <honli@redhat.com>
>>>> ---
>>>>   networkmanager.te |    2 ++
>>>>   1 files changed, 2 insertions(+), 0 deletions(-)
>>> [NOTE: resending due to a typo in the refpol mailing list address]
>>>
>>> We obviously need something like this now so we don't break IPoIB, but
>>> I wonder if we should make the IB access controls dynamic like the
>>> per-packet network access controls.  We could key off the presence of
>>> the IB pkey and endport definitions: if there are any objects defined
>>> in the loaded policy we enable the controls, otherwise we disable
>>> them.
>>
>> I think I understand what you're saying Paul, but I'm not clear on the mechanism.  Are you referring to the netlabel/IPSEC enable checks? They are wrapped up in selinux_peerlbl_enabled.
> 
> Basically, yes.  We could add a new variable/function that gates the
> access control checks in selinux_ib_pkey_access() and
> selinux_ib_endport_manage_subnet(); the checks would be enabled when
> there was Infiniband configuration loaded with the policy.  Without
> the IB config loaded, all the checks would end up being just a domain
> check against unlabeled_t, which isn't very interesting, so we would
> just drop the checks.

As long as it also respects policycap always_check_network, it works for me.

-- 
Chris PeBenito

  reply	other threads:[~2017-11-29  1:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1511791439-15957-1-git-send-email-danielj@mellanox.com>
2017-11-27 16:17 ` [PATCH 1/1] networkmanager: Grant access to unlabeled PKeys Paul Moore
2017-11-27 16:19 ` Paul Moore
2017-11-27 16:19   ` [refpolicy] " Paul Moore
2017-11-27 20:04   ` Daniel Jurgens
2017-11-27 20:04     ` [refpolicy] " Daniel Jurgens
2017-11-27 22:50     ` Paul Moore
2017-11-27 22:50       ` [refpolicy] " Paul Moore
2017-11-29  1:25       ` Chris PeBenito [this message]
2017-11-29  1:25         ` Chris PeBenito

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=163e0282-3638-1655-e726-6820265bad19@ieee.org \
    --to=pebenito@ieee.org \
    --cc=danielj@mellanox.com \
    --cc=honli@redhat.com \
    --cc=paul@paul-moore.com \
    --cc=refpolicy@oss.tresys.com \
    --cc=selinux@tycho.nsa.gov \
    /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.