From: Andy Adamson <androsadamson@gmail.com>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: NFS list <linux-nfs@vger.kernel.org>, tibbs@math.uh.edu
Subject: Re: RFC: make labeled NFS opt-in
Date: Thu, 12 Jan 2017 11:51:30 -0500 [thread overview]
Message-ID: <CAHVgHyVWUbjLRTdYL+akkVLOGURKO1tFm_02d4P8TO-gQKRWEg@mail.gmail.com> (raw)
In-Reply-To: <20170112161005.GA8589@fieldses.org>
On Thu, Jan 12, 2017 at 11:10 AM, J. Bruce Fields <bfields@fieldses.org> wrote:
> On Thu, Jan 12, 2017 at 10:29:14AM -0500, Andy Adamson wrote:
>> NFSv4.2 labeled NFS provides 'guest mode' Mandatory Access Control
>> (MAC) where the client can enforce labeling and store a label on the
>> server, but the server itself does not enforce the same MAC as the
>> client because the client request thread label is unknown to the
>> server. RPCSEC_GSS version 3 label assertions asserts the client
>> thread label on the NFSD thread handling the request, and so along
>> with LNFS provides Full Mode MAC.
>>
>> AFAICS the only time we want GSS3 label assertions is if LNFS is
>> enabled. Does this sound right to you? If so, I will use this new per
>> export LNFS option to determine when GSS3 label assertions are
>> enabled.
>
> How do you disable or enable this on the server side?
In nfsd_setuser, if the rq_authop has the new set_label operation, and
selinux_is_enabled() then the label is asserted.
>
> I haven't been following the GSS3 development well, apologies. So I
> guess you must do something like:
>
> 1. decode the GSS3 stuff in the RPC layer and store the
> resulting subject label somewhere like rqstp->rq_cred.
> 2. in nfsd_setuser, set the nfsd thread's label to the label
> stored in rq_cred.
Yes, I do both of those tasks.
>
> You probably need to have the processing in step 1 enabled all the time,
> because you don't know which export you're going to be dealing with yet
> at that point.
Yes.
>
> By step 2 you have the export. So I guess you'd use the export option
> to decide whether to silently ignore the label, or apply it to the nfsd
> thread?
yes.
>
> That might make sense.
Good! That is easy to add and is what I am thinking.
I'm building the gss prototype against your latest nfsd-next. Once I
test it, i'll send in version 4.
-->Andy
>
> --b.
prev parent reply other threads:[~2017-01-12 16:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-04 16:56 RFC: make labeled NFS opt-in J. Bruce Fields
2017-01-12 2:17 ` J. Bruce Fields
2017-01-12 15:29 ` Andy Adamson
2017-01-12 16:10 ` J. Bruce Fields
2017-01-12 16:51 ` Andy Adamson [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=CAHVgHyVWUbjLRTdYL+akkVLOGURKO1tFm_02d4P8TO-gQKRWEg@mail.gmail.com \
--to=androsadamson@gmail.com \
--cc=bfields@fieldses.org \
--cc=linux-nfs@vger.kernel.org \
--cc=tibbs@math.uh.edu \
/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;
as well as URLs for NNTP newsgroup(s).