linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [LSF/MM TOPIC] Unified keys for NFS, CIFS and AFS for security data
@ 2011-01-21 15:34 David Howells
       [not found] ` <3599.1295624067-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: David Howells @ 2011-01-21 15:34 UTC (permalink / raw)
  To: lsf-pc-cunTk1MwBs98uUxBSJOaYoYkZiVZrdSR2LY78lusg7I
  Cc: dhowells-H+wXaHxf7aLQT0dZR+AlfA,
	linux-fsdevel-u79uwXL29TY76Z2rM5mHXA,
	linux-nfs-u79uwXL29TY76Z2rM5mHXA


I'd like to propose a discussion topic for the LSF: how best to implement a
common key type for use by NFS, CIFS and AFS such that, say, a kerberos key
can be encapsulated within one and then be pulled out by various filesystems.

Furthermore, it would be necessary to allow the request_key() upcall mechanism
to perform GSSAPI queries.

David
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LSF/MM TOPIC] Unified keys for NFS, CIFS and AFS for security data
       [not found] ` <3599.1295624067-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2011-02-05 13:03   ` Jeff Layton
       [not found]     ` <20110205080332.4899b352-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Layton @ 2011-02-05 13:03 UTC (permalink / raw)
  To: David Howells
  Cc: lsf-pc-cunTk1MwBs98uUxBSJOaYoYkZiVZrdSR2LY78lusg7I,
	linux-fsdevel-u79uwXL29TY76Z2rM5mHXA,
	linux-nfs-u79uwXL29TY76Z2rM5mHXA,
	linux-cifs-u79uwXL29TY76Z2rM5mHXA

On Fri, 21 Jan 2011 15:34:27 +0000
David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:

> 
> I'd like to propose a discussion topic for the LSF: how best to implement a
> common key type for use by NFS, CIFS and AFS such that, say, a kerberos key
> can be encapsulated within one and then be pulled out by various filesystems.
> 
> Furthermore, it would be necessary to allow the request_key() upcall mechanism
> to perform GSSAPI queries.
> 

I would be interested in discussing this as well. Currently CIFS
"punts" to some degree and offloads almost all of the SPNEGO blob
construction to userspace. So, for CIFS this would involve moving more
of this code into the kernel. I think that's a good thing since it will
make it easier to do mutual-authentication, etc...

This would make it more plausible to store krb5 credcaches in the
kernel keyring too. Modern MIT krb5 libs can do this today (I think),
but most of the kernel upcalls rely on FILE: credcaches. Breaking that
dependency would be nice.

The difficulty here is that request_key() is "stateless", so we need to
think about how to manage GSSAPI contexts across multiple upcalls...or
plan to implement large swaths of the GSSAPI in-kernel.

It might also be helpful to couple this with some consolidation and
cleanup of the ASN.1 parsing code in the kernel. There are at least 3
separate implementations in the kernel today (one in cifs, one in
sunrpc, and one in iptables).

Since Trond's original email asked what I expertise I would bring to
the table:

I currently maintain the cifs-utils package which contains the
cifs.upcall program, and wrote most of the in-kernel pieces of the
current SPNEGO/krb5 upcall for CIFS. I've also done a some work on
the GSSAPI upcall pieces in the RPC layer and in nfs-utils.

-- 
Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LSF/MM TOPIC] Unified keys for NFS, CIFS and AFS for security data
       [not found]     ` <20110205080332.4899b352-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
@ 2011-02-05 15:55       ` Steve French
  0 siblings, 0 replies; 3+ messages in thread
From: Steve French @ 2011-02-05 15:55 UTC (permalink / raw)
  To: Jeff Layton
  Cc: David Howells, lsf-pc-cunTk1MwBs98uUxBSJOaYoYkZiVZrdSR2LY78lusg7I,
	linux-fsdevel-u79uwXL29TY76Z2rM5mHXA,
	linux-nfs-u79uwXL29TY76Z2rM5mHXA,
	linux-cifs-u79uwXL29TY76Z2rM5mHXA

On Sat, Feb 5, 2011 at 7:03 AM, Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
> On Fri, 21 Jan 2011 15:34:27 +0000
> David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
>
>>
>> I'd like to propose a discussion topic for the LSF: how best to implement a
>> common key type for use by NFS, CIFS and AFS such that, say, a kerberos key
>> can be encapsulated within one and then be pulled out by various filesystems.
>>
>> Furthermore, it would be necessary to allow the request_key() upcall mechanism
>> to perform GSSAPI queries.
>>
>
> I would be interested in discussing this as well. Currently CIFS
> "punts" to some degree and offloads almost all of the SPNEGO blob
> construction to userspace. So, for CIFS this would involve moving more
> of this code into the kernel. I think that's a good thing since it will
> make it easier to do mutual-authentication, etc...

Yes. I also agree, in part because the more the upcall has to go
to userspace the more likely a reconnect (network connection
drop) can cause problems when memory available to userspace
is constrained by a large amount of cached data on the network mount.


> This would make it more plausible to store krb5 credcaches in the
> kernel keyring too. Modern MIT krb5 libs can do this today (I think),

yes

> The difficulty here is that request_key() is "stateless", so we need to
> think about how to manage GSSAPI contexts across multiple upcalls...or
> plan to implement large swaths of the GSSAPI in-kernel.

> It might also be helpful to couple this with some consolidation and
> cleanup of the ASN.1 parsing code in the kernel. There are at least 3
> separate implementations in the kernel today (one in cifs, one in
> sunrpc, and one in iptables).

This is harder, but would also simplify future work as well
(such as SMB2, which will require this more often in
sessionsetup than cifs)



-- 
Thanks,

Steve

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-02-05 15:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-21 15:34 [LSF/MM TOPIC] Unified keys for NFS, CIFS and AFS for security data David Howells
     [not found] ` <3599.1295624067-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2011-02-05 13:03   ` Jeff Layton
     [not found]     ` <20110205080332.4899b352-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
2011-02-05 15:55       ` Steve French

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).