linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: NeilBrown <neilb@suse.de>
Cc: Steve Dickson <SteveD@redhat.com>, linux-nfs@vger.kernel.org
Subject: Re: [PATCH 0/3] Various gssd fixes including machine-credential issue.
Date: Wed, 12 Jun 2013 12:01:28 -0400	[thread overview]
Message-ID: <617282A2-6881-47B7-BE8F-752728195AF1@oracle.com> (raw)
In-Reply-To: <20130612161240.59b219b7@notabene.brown>


On Jun 12, 2013, at 2:12 AM, NeilBrown <neilb@suse.de> wrote:

> On Thu, 6 Jun 2013 09:43:36 +1000 NeilBrown <neilb@suse.de> wrote:
> 
>> I've provided a patched kernel to customer.  Hopefully will hear back soon.
> 
> Hi Chuck,
> the patch appears to work exactly as advertised and completely resolves the
> issue - thanks.

Thanks to you and your customer for confirming the approach.

Unfortunately Trond NAK'd a for-3.10 patch that uses RPC_TASK_ROOTCREDS.  I posted a patch Friday that takes a different approach to acquiring the root user's credentials that should behave like the old patch in every way, and be easier to back-port.

> Getting back to the idea of making this sort of thing work seamlessly,
> another possibility to consider is to use the *real* uid  of the process
> which performs the mount do authenticate SETCLIENTID - either as the primary
> authentication or as a fall-back.
> Then the a mountpoint with "users" listed as an option in /etc/fstab can be
> mounted by anyone with appropriate credentials and no credential should be
> needed for root, and not machine credential should be needed either.

Perhaps a more common use case with NFSv4 is secure automounter mounts.  In that case, the server can be configured to allow sec=sys access to it's pseudo-fs, then require Kerberos for its real file systems.

In operation, the client mounts the server's pseudo-fs without needing any GSS context.  When it transitions into a protected file system, the server returns NFS4ERR_WRONGSEC and the client should be able to negotiate up to AUTH_GSS using the user's credential.  (Mind you I haven't tried this, I'm simply hand-waving based on reasonable assumptions).

The key feature of this use case is that the client is not configured for anything but /net.  Mount options like "sec=krb5" or "users" are simply not in the picture.

The question is still whether, if the client doesn't have a keytab, lease management should use the user's credential or AUTH_SYS.  I maintain that AUTH_SYS is a better choice.  The kernel cannot possibly know a priori, without configuration, that this is a single-user client and that it is OK to use a user's Kerberos credential for lease management.

I'll stress that the reason we prefer a machine credential (either AUTH_GSS or AUTH_SYS) is because a client must present a consistent principal and flavor to the server for lease management.

A server can refuse to recognize a SETCLIENTID (for example, after a sudden client reboot) if there is already a lease on the server for using the presented nfs_client_id4.id string that was established using a different security flavor or principal.  Otherwise there would be no point in securing lease management.

-- 
Chuck Lever
chuck[dot]lever[at]oracle[dot]com





  reply	other threads:[~2013-06-12 16:01 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-03  1:00 [PATCH 0/3] Various gssd fixes including machine-credential issue Neil Brown
2013-06-03  1:00 ` [PATCH 1/3] krb5_utils: remove redundant array size Neil Brown
2013-07-01 16:05   ` Steve Dickson
2013-06-03  1:00 ` [PATCH 3/3] gssd: add -N option to use root credentials as machine credentials Neil Brown
2013-07-01 16:23   ` Steve Dickson
2013-07-01 21:35     ` NeilBrown
2013-06-03  1:00 ` [PATCH 2/3] krb5_util: don't give up on machine credential if hostname not available Neil Brown
2013-07-01 16:22   ` Steve Dickson
2013-07-01 21:56     ` NeilBrown
2013-07-02 12:29       ` Steve Dickson
2013-07-02 12:29   ` Steve Dickson
2013-06-03  2:01 ` [PATCH 0/3] Various gssd fixes including machine-credential issue Chuck Lever
2013-06-03  2:23   ` NeilBrown
2013-06-03  2:45     ` Chuck Lever
2013-06-03  3:01       ` NeilBrown
2013-06-03  4:32         ` Chuck Lever
2013-06-03 23:30           ` NeilBrown
2013-06-04  1:13             ` Chuck Lever
2013-06-04 19:16               ` Chuck Lever
2013-06-05  1:26                 ` NeilBrown
2013-06-05 15:37                   ` Chuck Lever
2013-06-05 17:14                     ` Chuck Lever
2013-06-05 23:53                       ` NeilBrown
2013-06-05 23:43                     ` NeilBrown
2013-06-12  6:12                       ` NeilBrown
2013-06-12 16:01                         ` Chuck Lever [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-06-05 14:05 E.G. Keizer
2013-06-05 14:25 ` Myklebust, Trond
2013-06-05 14:48   ` E.G. Keizer
2013-06-05 15:14     ` Myklebust, Trond
2013-06-05 15:19     ` Chuck Lever
2013-06-05 15:23       ` Myklebust, Trond
2013-06-05 15:24         ` Chuck Lever

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=617282A2-6881-47B7-BE8F-752728195AF1@oracle.com \
    --to=chuck.lever@oracle.com \
    --cc=SteveD@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    /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).