Add support for new RPCSEC_GSS upcall mechanism for nfsd
Subsystems (4)
cover Add support for new RPCSEC_GSS upcall mechanism for nfsd
This patchset implements a new upcall mechanism that uses the sunrpc client to talk to gssproxy[1], a new userspace daemon that handles gssapi operations on behalf of other processes on the system.
The main driver for this new mechanism is to overcome limitations with the current daemon and upcall. The current code cannot handle tickets larger than approximatively 2k and cannot handle sending back large user credential sets to the kernel.
These patches have been tested against the development version of gssproxy tagged as kernel_v0.1 in the master repo[2].
I have tested walking into mountpoints using tickets artificially pumped up to 64k and the user is properly authorized, after the accept_se_context call is performed through the new upcall mechanism and gssproxy.
The gssproxy has the potential of handling also init_sec_context calls, but at the moment the only targeted system is nfsd.
Simo.
[1] https://fedorahosted.org/gss-proxy/
[2] http://git.fedorahosted.org/git/?p=gss-proxy.git;a=shortlog;h=refs/tags/kernel_v0.1
NOTE: Included are all changes request and agreed on the list recently,
kmalloc changes and containers compatibility changes. Pacthes rebased on top of Bruce Field's for-3.5 tree.
Simo Sorce (4):
SUNRPC: conditionally return endtime from import_sec_context
SUNRPC: Document a bit RPCGSS handling in the NFS Server
SUNRPC: Add RPC based upcall mechanism for RPCGSS auth
SUNRPC: Use gssproxy upcall for nfsd's RPCGSS authentication.
Documentation/filesystems/nfs/00-INDEX | 2 + Documentation/filesystems/nfs/knfsd-rpcgss.txt | 65 ++ include/linux/sunrpc/auth_gss.h | 3 + include/linux/sunrpc/gss_api.h | 2 + include/linux/sunrpc/svcauth_gss.h | 2 +- net/sunrpc/auth_gss/Makefile | 4 +- net/sunrpc/auth_gss/auth_gss.c | 11 +- net/sunrpc/auth_gss/gss_krb5_mech.c | 3 + net/sunrpc/auth_gss/gss_mech_switch.c | 5 +- net/sunrpc/auth_gss/gss_rpc_upcall.c | 353 +++++++++ net/sunrpc/auth_gss/gss_rpc_upcall.h | 43 ++ net/sunrpc/auth_gss/gss_rpc_xdr.c | 907 ++++++++++++++++++++++++ net/sunrpc/auth_gss/gss_rpc_xdr.h | 269 +++++++ net/sunrpc/auth_gss/svcauth_gss.c | 226 ++++++- 14 files changed, 1875 insertions(+), 20 deletions(-) create mode 100644 Documentation/filesystems/nfs/knfsd-rpcgss.txt create mode 100644 net/sunrpc/auth_gss/gss_rpc_upcall.c create mode 100644 net/sunrpc/auth_gss/gss_rpc_upcall.h create mode 100644 net/sunrpc/auth_gss/gss_rpc_xdr.c create mode 100644 net/sunrpc/auth_gss/gss_rpc_xdr.h
Signature · 1 line
1.7.7.6
PATCH 1/4 SUNRPC: conditionally return endtime from import_sec_context
We expose this parameter for a future caller.
It will be used to extract the endtime from the gss-proxy upcall mechanism, in order to set the rsc cache expiration time.
--- include/linux/sunrpc/gss_api.h | 2 ++ net/sunrpc/auth_gss/auth_gss.c | 2 +- net/sunrpc/auth_gss/gss_krb5_mech.c | 3 +++ net/sunrpc/auth_gss/gss_mech_switch.c | 5 +++-- net/sunrpc/auth_gss/svcauth_gss.c | 3 ++- 5 files changed, 11 insertions(+), 4 deletions(-)
include/linux/sunrpc/gss_api.h +2 -0
@@ -36,6 +36,7 @@ int gss_import_sec_context(size_t bufsize, struct gss_api_mech *mech, struct gss_ctx **ctx_id, + time_t *endtime, gfp_t gfp_mask); u32 gss_get_mic( struct gss_ctx *ctx_id,
@@ -91,6 +92,7 @@ struct gss_api_ops {const void *input_token, size_t bufsize, struct gss_ctx *ctx_id, + time_t *endtime, gfp_t gfp_mask); u32 (*gss_get_mic)( struct gss_ctx *ctx_id,
net/sunrpc/auth_gss/auth_gss.c +1 -1
@@ -232,7 +232,7 @@ gss_fill_context(const void *p, const void *end, struct gss_cl_ctx *ctx, struct p =ERR_PTR (-EFAULT ); goto err; } - ret =gss_import_sec_context (p, seclen, gm, &ctx->gc_gss_ctx,GFP_NOFS ); + ret =gss_import_sec_context (p, seclen, gm, &ctx->gc_gss_ctx,NULL ,GFP_NOFS );if (ret <0 ) { p =ERR_PTR (ret); goto err;
net/sunrpc/auth_gss/gss_krb5_mech.c +3 -0
@@ -679,6 +679,7 @@ out_err:static int gss_import_sec_context_kerberos (const void *p,size_t len,struct gss_ctx *ctx_id, +time_t *endtime,gfp_t gfp_mask) {const void *end = (const void *)((const char *)p + len);
@@ -696,6 +697,8 @@ gss_import_sec_context_kerberos(const void *p, size_t len,if (ret ==0 ) ctx_id->internal_ctx_id = ctx; +if (endtime) + *endtime = ctx->endtime;else kfree (ctx);
net/sunrpc/auth_gss/gss_mech_switch.c +3 -2
@@ -312,14 +312,15 @@ int gss_import_sec_context(const void *input_token, size_t bufsize, struct gss_api_mech *mech, struct gss_ctx **ctx_id, + time_t *endtime, gfp_t gfp_mask) { if (!(*ctx_id = kzalloc(sizeof(**ctx_id), gfp_mask))) return -ENOMEM; (*ctx_id)->mech_type =gss_mech_get (mech); -return mech->gm_ops - ->gss_import_sec_context (input_token, bufsize, *ctx_id, gfp_mask); +return mech->gm_ops->gss_import_sec_context (input_token, bufsize, + *ctx_id, endtime, gfp_mask); }/* gss_get_mic: compute a mic over message and return mic_token. */
net/sunrpc/auth_gss/svcauth_gss.c +2 -1
@@ -486,7 +486,8 @@ static int rsc_parse(struct cache_detail *cd, len =qword_get (&mesg, buf, mlen);if (len <0 ) goto out; - status =gss_import_sec_context (buf, len, gm, &rsci.mechctx,GFP_KERNEL ); + status =gss_import_sec_context (buf, len, gm, &rsci.mechctx, +NULL ,GFP_KERNEL );if (status) goto out;
Signature · 1 line
1.7.7.6
PATCH 2/4 SUNRPC: Document a bit RPCGSS handling in the NFS Server
In reply to Simo SorceIncludes changes intorduced by GSS-Proxy.
--- Documentation/filesystems/nfs/00-INDEX | 2 + Documentation/filesystems/nfs/knfsd-rpcgss.txt | 65 ++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 0 deletions(-) create mode 100644 Documentation/filesystems/nfs/knfsd-rpcgss.txt
Documentation/filesystems/nfs/00-INDEX +2 -0
@@ -20,3 +20,5 @@ rpc-cache.txt - introduction to the caching mechanisms in the sunrpc layer. idmapper.txt - information for configuring request-keys to be used by idmapper +knfsd-rpcgss.txt + - Information on GSS authentication support in the NFS Server
Documentation/filesystems/nfs/knfsd-rpcgss.txt new file +65 -0
65 lines not on this page · raw message
Signature · 1 line
1.7.7.6
PATCH 3/4 SUNRPC: Add RPC based upcall mechanism for RPCGSS auth
In reply to Simo SorceThis patch implements a sunrpc client to use the services of the gssproxy userspace daemon.
In particular it allows to perform calls in user space using an RPC call instead of custom hand-coded upcall/downcall messages.
Currently only accept_sec_context is implemented as that is all is needed for the server case.
File server modules like NFS and CIFS can use full gssapi services this way, once init_sec_context is also implemented.
For the NFS server case this code allow to lift the limit of max 2k krb5 tickets. This limit is prevents legitimate kerberos deployments from using krb5 authentication with the Linux NFS server as they have normally ticket that are many kilobytes large.
It will also allow to lift the limitation on the size of the credential set (uid,gid,gids) passed down from user space for users that have very many groups associated. Currently the downcall mechanism used by rpc.svcgssd is limited to around 2k secondary groups of the 65k allowed by kernel structures.
--- net/sunrpc/auth_gss/Makefile | 4 +- net/sunrpc/auth_gss/gss_rpc_upcall.c | 353 +++++++++++++ net/sunrpc/auth_gss/gss_rpc_upcall.h | 43 ++ net/sunrpc/auth_gss/gss_rpc_xdr.c | 907 ++++++++++++++++++++++++++++++++++ net/sunrpc/auth_gss/gss_rpc_xdr.h | 269 ++++++++++ 5 files changed, 1575 insertions(+), 1 deletions(-) create mode 100644 net/sunrpc/auth_gss/gss_rpc_upcall.c create mode 100644 net/sunrpc/auth_gss/gss_rpc_upcall.h create mode 100644 net/sunrpc/auth_gss/gss_rpc_xdr.c create mode 100644 net/sunrpc/auth_gss/gss_rpc_xdr.h
net/sunrpc/auth_gss/Makefile +3 -1
@@ -5,9 +5,11 @@ obj-$(CONFIG_SUNRPC_GSS) += auth_rpcgss.o auth_rpcgss-y := auth_gss.o gss_generic_token.o \ - gss_mech_switch.o svcauth_gss.o + gss_mech_switch.o svcauth_gss.o \ + gss_rpc_upcall.o gss_rpc_xdr.o obj-$(CONFIG_RPCSEC_GSS_KRB5) += rpcsec_gss_krb5.o rpcsec_gss_krb5-y := gss_krb5_mech.o gss_krb5_seal.o gss_krb5_unseal.o \ gss_krb5_seqnum.o gss_krb5_wrap.o gss_krb5_crypto.o gss_krb5_keys.o +
net/sunrpc/auth_gss/gss_rpc_upcall.c new file +353 -0
353 lines not on this page · raw message
net/sunrpc/auth_gss/gss_rpc_upcall.h new file +43 -0
43 lines not on this page · raw message
net/sunrpc/auth_gss/gss_rpc_xdr.c new file +907 -0
907 lines not on this page · raw message
net/sunrpc/auth_gss/gss_rpc_xdr.h new file +269 -0
269 lines not on this page · raw message
Signature · 1 line
1.7.7.6
PATCH 4/4 SUNRPC: Use gssproxy upcall for nfsd's RPCGSS authentication.
In reply to Simo SorceThe main advantge of this new upcall mechanism is that it can handle big tickets as seen in Kerberos implementations where tickets carry authorization data like the MS-PAC buffer with AD or the Posix Authorization Data being discussed in IETF on the krbwg working group.
The Gssproxy program is used to perform the accept_sec_context call on the kernel's behalf. The code is changed to also pass the input buffer straight to upcall mechanism to avoid allocating and copying many pages as tokens can be as big (potentially more in future) as 64KiB.
--- include/linux/sunrpc/auth_gss.h | 3 + include/linux/sunrpc/svcauth_gss.h | 2 +- net/sunrpc/auth_gss/auth_gss.c | 9 ++- net/sunrpc/auth_gss/svcauth_gss.c | 223 +++++++++++++++++++++++++++++++++-- 4 files changed, 222 insertions(+), 15 deletions(-)
include/linux/sunrpc/auth_gss.h +3 -0
@@ -19,6 +19,9 @@#define RPC_GSS_VERSION 1 +#define GSS_UPCALL_LEGACY 0 +#define GSS_UPCALL_GSSPROXY 1 +#define MAXSEQ 0x80000000/* maximum legal sequence number, from rfc 2203 */ enum rpc_gss_proc {
include/linux/sunrpc/svcauth_gss.h +1 -1
@@ -16,7 +16,7 @@#include <linux/sunrpc/svcsock.h> #include <linux/sunrpc/auth_gss.h> -int gss_svc_init (void ); +int gss_svc_init (unsigned int upcall_type);void gss_svc_shutdown (void );int gss_svc_init_net (struct net *net);void gss_svc_shutdown_net (struct net *net);
net/sunrpc/auth_gss/auth_gss.c +8 -1
@@ -60,6 +60,8 @@ static const struct rpc_credops gss_nullops;#define GSS_RETRY_EXPIRED 5static unsigned int gss_expired_cred_retry_delay =GSS_RETRY_EXPIRED ; +static unsigned int gss_upcall_daemon_type =GSS_UPCALL_LEGACY ; +#ifdef RPC_DEBUG # define RPCDBG_FACILITY RPCDBG_AUTH#endif
@@ -1687,7 +1689,7 @@ static int __init init_rpcsec_gss(void) err =rpcauth_register (&authgss_ops);if (err) goto out; - err =gss_svc_init (); + err =gss_svc_init (gss_upcall_daemon_type);if (err) goto out_unregister; err =register_pernet_subsys (&rpcsec_gss_net_ops);
@@ -1717,6 +1719,11 @@ module_param_named(expired_cred_retry_delay, uint, 0644);MODULE_PARM_DESC (expired_cred_retry_delay,"Timeout (in seconds) until " "the RPC engine retries an expired credential" ); +module_param_named (upcall_daemon_type, + gss_upcall_daemon_type, + uint,0644 ); +MODULE_PARM_DESC (upcall_daemon_type,"Type of svcgss upcall daemon used " +"(legacy=0 or gssproxy=1)" );module_init (init_rpcsec_gss)module_exit (exit_rpcsec_gss)
net/sunrpc/auth_gss/svcauth_gss.c +210 -13
295 lines not on this page · raw message
Signature · 1 line
1.7.7.6
Quoted 12 lines · Simo Sorce
This patchset implements a new upcall mechanism that uses the sunrpc client to talk to gssproxy[1], a new userspace daemon that handles gssapi operations on behalf of other processes on the system.
The main driver for this new mechanism is to overcome limitations with the current daemon and upcall. The current code cannot handle tickets larger than approximatively 2k and cannot handle sending back large user credential sets to the kernel.
These patches have been tested against the development version of gssproxy tagged as kernel_v0.1 in the master repo[2].
Quoted 6 lines
I have tested walking into mountpoints using tickets artificially pumped up to 64k and the user is properly authorized, after the
accept_se_contextcall is performed through the new upcall mechanism and gssproxy.The gssproxy has the potential of handling also
init_sec_contextcalls, but at the moment the only targeted system is nfsd.
OK, absent objections from anyone else I'm commiting these for 3.6 and pushing them out soon pending some regression testing. Thanks!
--b.
Quoted 42 lines
Simo.
[1] https://fedorahosted.org/gss-proxy/
[2] http://git.fedorahosted.org/git/?p=gss-proxy.git;a=shortlog;h=refs/tags/kernel_v0.1NOTE: Included are all changes request and agreed on the list recently,
kmalloc changes and containers compatibility changes. Pacthes rebased on top of Bruce Field's for-3.5 tree.Simo Sorce (4):
SUNRPC: conditionally return endtime fromimport_sec_context
SUNRPC: Document a bit RPCGSS handling in the NFS Server
SUNRPC: Add RPC based upcall mechanism for RPCGSS auth
SUNRPC: Use gssproxy upcall for nfsd's RPCGSS authentication.Documentation/filesystems/nfs/00-INDEX | 2 + Documentation/filesystems/nfs/knfsd-rpcgss.txt | 65 ++ include/linux/sunrpc/auth_gss.h | 3 + include/linux/sunrpc/gss_api.h | 2 + include/linux/sunrpc/svcauth_gss.h | 2 +- net/sunrpc/auth_gss/Makefile | 4 +- net/sunrpc/auth_gss/auth_gss.c | 11 +- net/sunrpc/auth_gss/gss_krb5_mech.c | 3 + net/sunrpc/auth_gss/gss_mech_switch.c | 5 +- net/sunrpc/auth_gss/gss_rpc_upcall.c | 353 +++++++++ net/sunrpc/auth_gss/gss_rpc_upcall.h | 43 ++ net/sunrpc/auth_gss/gss_rpc_xdr.c | 907 ++++++++++++++++++++++++ net/sunrpc/auth_gss/gss_rpc_xdr.h | 269 +++++++ net/sunrpc/auth_gss/svcauth_gss.c | 226 ++++++- 14 files changed, 1875 insertions(+), 20 deletions(-) create mode 100644 Documentation/filesystems/nfs/knfsd-rpcgss.txt create mode 100644 net/sunrpc/auth_gss/gss_rpc_upcall.c create mode 100644 net/sunrpc/auth_gss/gss_rpc_upcall.h create mode 100644 net/sunrpc/auth_gss/gss_rpc_xdr.c create mode 100644 net/sunrpc/auth_gss/gss_rpc_xdr.hSignature · 1 line
1.7.7.6
Quoted 17 lines · bfields
Quoted 16 lines · Simo Sorce
This patchset implements a new upcall mechanism that uses the sunrpc client to talk to gssproxy[1], a new userspace daemon that handles gssapi operations on behalf of other processes on the system.
The main driver for this new mechanism is to overcome limitations with the current daemon and upcall. The current code cannot handle tickets larger than approximatively 2k and cannot handle sending back large user credential sets to the kernel.
These patches have been tested against the development version of gssproxy tagged as kernel_v0.1 in the master repo[2].
I have tested walking into mountpoints using tickets artificially pumped up to 64k and the user is properly authorized, after the
accept_se_contextcall is performed through the new upcall mechanism and gssproxy.
Quoted 5 lines
Quoted 2 lines
The gssproxy has the potential of handling also
init_sec_contextcalls, but at the moment the only targeted system is nfsd.OK, absent objections from anyone else I'm commiting these for 3.6 and pushing them out soon pending some regression testing. Thanks!
Whoops, I spoke too soon. I'll take a quick look tomorrow, but if you have an idea that would be great....
The code I'm running is in
git://linux-nfs.org/~bfields/linux-topics.git for-3.6-incoming
Looks like the BUG() case in gss_get_mic_kerberos(), so ctx->enctype is bogus--maybe a context isn't getting initialized right?
--b.
kernel BUG at net/sunrpc/auth_gss/gss_krb5_seal.c:213! invalid opcode: 0000 [#1] PREEMPT SMP
CPU 1
Modules linked in: rpcsec_gss_krb5 iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi nfsd lockd nfs_acl auth_rpcgss sunrpc [last unloaded: scsi_wait_scan]
Pid: 4924, comm: nfsd Not tainted 3.5.0-rc3-00104-g3521b3f #14 Bochs Bochs
RIP: 0010:[<ffffffffa00e4076>] [<ffffffffa00e4076>] gss_get_mic_kerberos+0x26/0x310 [rpcsec_gss_krb5] RSP: 0018:ffff880035ed9aa0 EFLAGS: 00010202 RAX: ffffffffa00e7e20 RBX: ffff8800392398f8 RCX: ffff880032c53000 RDX: ffff880035ed9ba0 RSI: ffff880035ed9b50 RDI: ffff880036ffd8b8 RBP: ffff880035ed9b30 R08: 0000000000000000 R09: ffff8800391afb20 R10: 0000000000000000 R11: 0000000000000001 R12: ffff880032c53014 R13: ffff880035ed9ba0 R14: ffff880035ed9b50 R15: ffff880036ffd8b8 FS: 0000000000000000(0000) GS:ffff88003fc80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b CR2: 00007f0a38b45000 CR3: 0000000032cc8000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process nfsd (pid: 4924, threadinfo ffff880035ed8000, task ffff88003b326040) Stack: ffff880035ed9b10 ffffffffa001c163 0000000000000004 ffff880035f365b0 0000000000015240 00000000000000c0 000000004ffc95c7 0000000000000000 ffff880035e8adf0 ffff880035ed9b20 ffff88003beecda8 ffff880035f36590 Call Trace: [<ffffffffa001c163>] ? cache_check+0x73/0x380 [sunrpc] [<ffffffffa0056bd3>] gss_get_mic+0x13/0x20 [auth_rpcgss] [<ffffffffa0058255>] gss_write_verf+0x95/0x110 [auth_rpcgss] [<ffffffffa00593bb>] svcauth_gss_legacy_init+0x24b/0x5f0 [auth_rpcgss] [<ffffffffa0059170>] ? svcauth_gss_register_pseudoflavor+0xc0/0xc0 [auth_rpcgss] [<ffffffffa005a1f1>] svcauth_gss_accept+0x501/0xa90 [auth_rpcgss] [<ffffffffa0059cf0>] ? svcauth_gss_proxy_init+0x590/0x590 [auth_rpcgss] [<ffffffffa0013aca>] ? svc_authenticate+0x5a/0xe0 [sunrpc] [<ffffffffa0013aca>] ? svc_authenticate+0x5a/0xe0 [sunrpc] [<ffffffffa0013b36>] svc_authenticate+0xc6/0xe0 [sunrpc] [<ffffffffa000f57d>] svc_process_common+0x20d/0x690 [sunrpc] [<ffffffff81079750>] ? try_to_wake_up+0x330/0x330 [<ffffffffa0087bd0>] ? nfsd_svc+0x230/0x230 [nfsd] [<ffffffffa000fd50>] svc_process+0x110/0x160 [sunrpc] [<ffffffffa0087c8d>] nfsd+0xbd/0x1a0 [nfsd] [<ffffffffa0087bd0>] ? nfsd_svc+0x230/0x230 [nfsd] [<ffffffff8106675e>] kthread+0x9e/0xb0 [<ffffffff819af494>] kernel_thread_helper+0x4/0x10 [<ffffffff819a735d>] ? retint_restore_args+0xe/0xe [<ffffffff810666c0>] ? __init_kthread_worker+0x70/0x70 [<ffffffff819af490>] ? gs_change+0xb/0xb Code: fe ff ff 90 90 55 48 89 e5 41 57 41 56 41 55 41 54 53 48 83 ec 68 66 66 66 66 90 48 8b 5f 08 49 89 f6 49 89 d5 83 7b 04 17 76 04 <0f> 0b eb fe 48 63 4b 04 b8 01 00 00 00 48 d3 e0 a9 50 00 80 00 RIP [<ffffffffa00e4076>] gss_get_mic_kerberos+0x26/0x310 [rpcsec_gss_krb5] RSP <ffff880035ed9aa0> ---[ end trace 797c56ca0aa53457 ]---
T24gVHVlLCAyMDEyLTA3LTEwIGF0IDE2OjQ5IC0wNDAwLCBKLiBCcnVjZSBGaWVsZHMgd3JvdGU6 DQo+IE9uIEZyaSwgTWF5IDI1LCAyMDEyIGF0IDA2OjA5OjUyUE0gLTA0MDAsIFNpbW8gU29yY2Ug d3JvdGU6DQo+ID4gVGhpcyBwYXRjaHNldCBpbXBsZW1lbnRzIGEgbmV3IHVwY2FsbCBtZWNoYW5p c20gdGhhdCB1c2VzIHRoZSBzdW5ycGMNCj4gPiBjbGllbnQgdG8gdGFsayB0byBnc3Nwcm94eVsx XSwgYSBuZXcgdXNlcnNwYWNlIGRhZW1vbiB0aGF0IGhhbmRsZXMgZ3NzYXBpDQo+ID4gb3BlcmF0 aW9ucyBvbiBiZWhhbGYgb2Ygb3RoZXIgcHJvY2Vzc2VzIG9uIHRoZSBzeXN0ZW0uDQo+ID4gDQo+ ID4gVGhlIG1haW4gZHJpdmVyIGZvciB0aGlzIG5ldyBtZWNoYW5pc20gaXMgdG8gb3ZlcmNvbWUg bGltaXRhdGlvbnMgd2l0aA0KPiA+IHRoZSBjdXJyZW50IGRhZW1vbiBhbmQgdXBjYWxsLiBUaGUg Y3VycmVudCBjb2RlIGNhbm5vdCBoYW5kbGUgdGlja2V0cw0KPiA+IGxhcmdlciB0aGFuIGFwcHJv eGltYXRpdmVseSAyayBhbmQgY2Fubm90IGhhbmRsZSBzZW5kaW5nIGJhY2sgbGFyZ2UgdXNlcg0K PiA+IGNyZWRlbnRpYWwgc2V0cyB0byB0aGUga2VybmVsLg0KPiA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aGFwcGVucyB0byB0aGUgTkZTIHNlcnZl ciwgYnV0IEkgZG8gZXhwZWN0IGFsbA0KZXhpc3RpbmcgTkZTdjQgY2xpZW50IHNldHVwcyB0byB3 b3JrIHdpdGhvdXQgYW55IG5lZWQgZm9yIGNoYW5nZXMuDQoNCi0tIA0KVHJvbmQgTXlrbGVidXN0 DQpMaW51eCBORlMgY2xpZW50IG1haW50YWluZXINCg0KTmV0QXBwDQpUcm9uZC5NeWtsZWJ1c3RA bmV0YXBwLmNvbQ0Kd3d3Lm5ldGFwcC5jb20NCg0K
Quoted 21 lines · Trond
Quoted 20 lines · J. Bruce Fields
Quoted 18 lines · Simo Sorce
This patchset implements a new upcall mechanism that uses the sunrpc client to talk to gssproxy[1], a new userspace daemon that handles gssapi operations on behalf of other processes on the system.
The main driver for this new mechanism is to overcome limitations with the current daemon and upcall. The current code cannot handle tickets larger than approximatively 2k and cannot handle sending back large user credential sets to the kernel.
These patches have been tested against the development version of gssproxy tagged as kernel_v0.1 in the master repo[2].
I have tested walking into mountpoints using tickets artificially pumped up to 64k and the user is properly authorized, after the
accept_se_contextcall is performed through the new upcall mechanism and gssproxy.The gssproxy has the potential of handling also
init_sec_contextcalls, but at the moment the only targeted system is nfsd.
Quoted 8 lines
Quoted 2 lines
OK, absent objections from anyone else I'm commiting these for 3.6 and pushing them out soon pending some regression testing. Thanks!
Please test that the NFSv4 backchannel continues to work unchanged with the existing rpc.svcgssd before you commit.
I don't care what happens to the NFS server, but I do expect all existing NFSv4 client setups to work without any need for changes.
The rpc server's authentication method is global to the machine, so if the NFS server is using gss proxy, then I believe the callback server will be as well.
--b.
T24gVHVlLCAyMDEyLTA3LTEwIGF0IDE3OjU2IC0wNDAwLCBKLiBCcnVjZSBGaWVsZHMgd3JvdGU6 DQo+IE9uIFR1ZSwgSnVsIDEwLCAyMDEyIGF0IDA5OjUyOjUxUE0gKzAwMDAsIE15a2xlYnVzdCwg VHJvbmQgd3JvdGU6DQo+ID4gT24gVHVlLCAyM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zIGF1dGhlbnRpY2F0aW9uIG1ldGhvZCBpcyBnbG9i YWwgdG8gdGhlIG1hY2hpbmUsIHNvIGlmDQo+ID4gdGhlIE5GUyBzZXJ2ZXIgaXMgdXNpbmcgZ3Nz IHByb3h5LCB0aGVuIEkgYmVsaWV2ZSB0aGUgY2FsbGJhY2sgc2VydmVyDQo+ID4gd2lsbCBiZSBh cyB3ZWxsLg0KPiANCj4gVGhlbiB3aHkgaXMgaXQgYmVpbmcgbGFiZWxsZWQgYXMgYSBrbmZzZC1v bmx5IGNoYW5nZT8NCj4gSG93IHdpbGwgaXQgYmVoYXZlIGlmIEkgZG9uJ3QgcnVuIGdzcyBwcm94 eT8NCg0KLi4uYW5kIGhvdyB3aWxsIGl0IGJlaGF2ZSBpbiBhIG5ldCBuYW1lc3BhY2U/DQoNCi0t IA0KVHJvbmQgTXlrbGVidXN0DQpMaW51eCBORlMgY2xpZW50IG1haW50YWluZXINCg0KTmV0QXBw DQpUcm9uZC5NeWtsZWJ1c3RAbmV0YXBwLmNvbQ0Kd3d3Lm5ldGFwcC5jb20NCg0K
Quoted 2 lines · Trond
Quoted 1 line · Trond Myklebust
Then why is it being labelled as a knfsd-only change?
It should be labeled an rpc server change.
Quoted 1 line
Quoted 1 line
How will it behave if I don't run gss proxy?
It will work, but if the server's running on the same machine it will also use svcgssd, and hence won't (for example) be able to handle the larger init_sec_context packets.
Quoted 1 line
...and how will it behave in a net namespace?
It will need the same fixes as we need for rpcbind.
I'm sure we could allow the callback server and the nfs server to use different authentication upcalls. But that makes this not worth it.
We should be able to share the same use the same mechanism on all rpc servers, so if a mechanism based on gssproxy calls isn't acceptable for the nfs callback server then I'll drop it.
--b.
T24gVHVlLCAyMDEyLTA3LTEwIGF0IDE4OjM4IC0wNDAwLCBKLiBCcnVjZSBGaWVsZHMgd3JvdGU6 DQo+IE9uIFR1ZSwgSnVsIDEwLCAyMDEyIGF0IDEwOjI1OjEzUE0gKzAwMDAsIE15a2xlYnVzdCwg VHJvbmQ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BjYWxscyBpc24ndCBhY2NlcHRh YmxlIGZvcg0KPiB0aGUgbmZzIGNhbGxiYWNrIHNlcnZlciB0aGVuIEknbGwgZHJvcCBpdC4NCg0K SSBkb24ndCBzZWUgaG93IHlvdSBjYW4gZW5mb3JjZSB0aGF0IHByZW1pc2Ugd2hlbiB1c2luZyBj b250YWluZXJzLg0KDQotLSANClRyb25kIE15a2xlYnVzdA0KTGludXggTkZTIGNsaWVudCBtYWlu dGFpbmVyDQoNCk5ldEFwcA0KVHJvbmQuTXlrbGVidXN0QG5ldGFwcC5jb20NCnd3dy5uZXRhcHAu Y29tDQoNCg==
Quoted 21 lines · Trond
Quoted 20 lines · J. Bruce Fields
Quoted 18 lines · Simo Sorce
This patchset implements a new upcall mechanism that uses the sunrpc client to talk to gssproxy[1], a new userspace daemon that handles gssapi operations on behalf of other processes on the system.
The main driver for this new mechanism is to overcome limitations with the current daemon and upcall. The current code cannot handle tickets larger than approximatively 2k and cannot handle sending back large user credential sets to the kernel.
These patches have been tested against the development version of gssproxy tagged as kernel_v0.1 in the master repo[2].
I have tested walking into mountpoints using tickets artificially pumped up to 64k and the user is properly authorized, after the
accept_se_contextcall is performed through the new upcall mechanism and gssproxy.The gssproxy has the potential of handling also
init_sec_contextcalls, but at the moment the only targeted system is nfsd.
Quoted 8 lines
Quoted 2 lines
OK, absent objections from anyone else I'm commiting these for 3.6 and pushing them out soon pending some regression testing. Thanks!
Please test that the NFSv4 backchannel continues to work unchanged with the existing rpc.svcgssd before you commit.
I don't care what happens to the NFS server, but I do expect all existing NFSv4 client setups to work without any need for changes.
This change is optional and need to be explicitly activate by loading the rpc_gsssec module with a parameter that enables the new method.
If you do not do that it keeps using the legacy method which uses rpc.svcgssd
Simo.
Signature · 1 line
Simo Sorce * Red Hat, Inc * New York
Quoted 5 lines · Trond
All the documentation in the patches was appearing to imply that it affected only nfsd with filenames such as "Documentation/filesystems/nfs/knfsd-rpcgss.txt".and patch changelogs with titles such as "SUNRPC: Use gssproxy upcall for nfsd's RPCGSS authentication."
Fixed locally (and pushed out temporarily to for-3.6-incoming branch atgit://linux-nfs.org/~bfields/linux-topics.git). Thanks for catching that.
Quoted 10 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line
How will it behave if I don't run gss proxy?
It will work, but if the server's running on the same machine it will also use svcgssd, and hence won't (for example) be able to handle the larger
init_sec_contextpackets.An NFS client callback server is only trying to check that it is talking to a machine credential with a name of the form nfs@hostname. It doesn't care about PAGs, and anyone who tries to set the machine cred up with one is clearly insane anyway...
Yes. I don't know enough to say that a larger init_sec_context call could never be required for some other reason--but it sounds unlikely.
Anyway: I was hoping that the old upcall mechanism could be declared a legacy thing--no new features, bugfixes only for regressions, etc.--and possibly be removed after a long transition period.
If it's a requirement that the client never use the gssproxy mechanism, even on the 4.0 backchannel, then that requires committing to develop both. I don't think that makes sense.
Given that, the containerization issues seem irrelevant, but:
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
...and how will it behave in a net namespace?
It will need the same fixes as we need for rpcbind.
So basically, it will have to store the path at client creation time?
I think that's right.
Quoted 7 lines
Quoted 2 lines
I'm sure we could allow the callback server and the nfs server to use different authentication upcalls. But that makes this not worth it.
The point is that in a containerised environment, the NFS client may not know what protocol that an NFS server running in a completely different container is using.
Quoted 5 lines
Quoted 3 lines
We should be able to share the same use the same mechanism on all rpc servers, so if a mechanism based on gssproxy calls isn't acceptable for the nfs callback server then I'll drop it.
I don't see how you can enforce that premise when using containers.
I don't believe there's a requirement that containers be able to use different upcall mechanisms. Are we allowing people to choose between new and old client idmappers per container?
--b.
Quoted 25 lines · J. Bruce Fields
Quoted 5 lines · Trond
All the documentation in the patches was appearing to imply that it affected only nfsd with filenames such as "Documentation/filesystems/nfs/knfsd-rpcgss.txt".and patch changelogs with titles such as "SUNRPC: Use gssproxy upcall for nfsd's RPCGSS authentication."
Fixed locally (and pushed out temporarily to for-3.6-incoming branch at
git://linux-nfs.org/~bfields/linux-topics.git). Thanks for catching that.Quoted 10 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line
How will it behave if I don't run gss proxy?
It will work, but if the server's running on the same machine it will also use svcgssd, and hence won't (for example) be able to handle the larger
init_sec_contextpackets.An NFS client callback server is only trying to check that it is talking to a machine credential with a name of the form nfs@hostname. It doesn't care about PAGs, and anyone who tries to set the machine cred up with one is clearly insane anyway...
Yes. I don't know enough to say that a larger
init_sec_contextcall could never be required for some other reason--but it sounds unlikely.
Quoted 7 lines
Anyway: I was hoping that the old upcall mechanism could be declared a legacy thing--no new features, bugfixes only for regressions, etc.--and possibly be removed after a long transition period.
If it's a requirement that the client never use the gssproxy mechanism, even on the 4.0 backchannel, then that requires committing to develop both. I don't think that makes sense.
So, if the issue is: you want to be able to choose, in individual containers, which mechanism to use: whatever, we can probably make that work.
If you're instead saying: it's not acceptable to use the gssproxy mechanism to authenticate v4.0 callbacks, the client must only ever use the existing mechanism: then I'd rather drop this entirely. I don't want to merge an rpc server authentication upcall that's not acceptable for one of the rpc servers.
--b.
T24gV2VkLCAyMDEyLTA3LTExIGF0IDEzOjI3IC0wNDAwLCBKLiBCcnVjZSBGaWVsZHMgd3JvdGU6 DQo+IFNvLCBpZiB0aGUgaXNzdWUgaXM6IHlvdSB3YW50IHRvIGJlIGFibGUgdG8gY2hvb3NlLCBp biBpbmRpdmlkdWFsDQo+IGNvbnRhaW5lcnMsIHdoaWNoIG1lY2hhbmlzbSB0byB1c2U6IHdoYXRl dmVyLCB3ZSBjYW4gcHJvYmFibHkgbWFrZSB0aGF0DQo+IHdvcmsuDQoNClBsZWFzZSBkbyB0aGVu Lg0KDQo+IElmIHlvdSdyZSBpbnN0ZWFkIHNheWluZzogaXQncyBub3QgYWNjZXB0YWJsZSB0byB1 c2UgdGhlIGdzc3Byb3h5DQo+IG1lY2hhbmlzbSB0byBhdXRoZW50aWNhdGUgdjQuMCBjYWxsYmFj a3MsIHRoZSBjbGllbnQgbXVzdCBvbmx5IGV2ZXIgdXNlDQo+IHRoZSBleGlzdGluZyBtZWNoYW5p c206IHRoZW4gSSdkIHJhdGhlciBkcm9wIHRoaXMgZW50aXJlbHkuICBJIGRvbid0DQo+IHdhbnQg dG8gbWVyZ2UgYW4gcnBjIHNlcnZlciBhdXRoZW50aWNhdGlvbiB1cGNhbGwgdGhhdCdzIG5vdCBh Y2NlcHRhYmxlDQo+IGZvciBvbmUgb2YgdGhlIHJwYyBzZXJ2ZXJzLg0KDQpJZiBpdCBnb2VzIGlu LCBJIHdhbnQgaXQgdG8gYmUgb3B0aW9uYWwgc28gdGhhdCBpdCBkb2Vzbid0IGJyZWFrIHdvcmtp bmcNCnNldHVwcy4gSSBhbHNvIHdhbnQgdXBncmFkZXMvZG93bmdyYWRlcyB0byBiZSBhcyBwYWlu bGVzcyBhcyBwb3NzaWJsZS4gDQoNClNlZSBmb3IgaW5zdGFuY2UgdGhlIGlkbWFwcGVyIGNoYW5n ZXMgaW4gMy41IHdoaWNoIGFyZSB0b3RhbGx5DQp0cmFuc3BhcmVudCB0byB0aGUgdXNlcjogaWYg dGhlIGFkbWluIHNldHMgdXAgL2V0Yy9yZXF1ZXN0LWtleS5jb25mIHRvDQp1c2UgdGhlIG5ldyBp ZF9yZXNvbHZlciwgdGhlbiB0aGF0IHdvcmtzLCBvdGhlcndpc2Ugd2UganVzdCBmYWxsIGJhY2sg dG8NCnVzaW5nIHRoZSBvbGQgcnBjLmlkbWFwZCBtZXRob2QuIFRoZXJlIGFyZSBubyBtb2R1bGUg cGFyYW1ldGVycyBldGMNCmludm9sdmVkLg0KDQotLSANClRyb25kIE15a2xlYnVzdA0KTGludXgg TkZTIGNsaWVudCBtYWludGFpbmVyDQoNCk5ldEFwcA0KVHJvbmQuTXlrbGVidXN0QG5ldGFwcC5j b20NCnd3dy5uZXRhcHAuY29tDQoNCg==
Quoted 27 lines · J. Bruce Fields
Quoted 17 lines · bfields
Quoted 16 lines · Simo Sorce
This patchset implements a new upcall mechanism that uses the sunrpc client to talk to gssproxy[1], a new userspace daemon that handles gssapi operations on behalf of other processes on the system.
The main driver for this new mechanism is to overcome limitations with the current daemon and upcall. The current code cannot handle tickets larger than approximatively 2k and cannot handle sending back large user credential sets to the kernel.
These patches have been tested against the development version of gssproxy tagged as kernel_v0.1 in the master repo[2].
I have tested walking into mountpoints using tickets artificially pumped up to 64k and the user is properly authorized, after the
accept_se_contextcall is performed through the new upcall mechanism and gssproxy.Quoted 5 lines
Quoted 2 lines
The gssproxy has the potential of handling also
init_sec_contextcalls, but at the moment the only targeted system is nfsd.OK, absent objections from anyone else I'm commiting these for 3.6 and pushing them out soon pending some regression testing. Thanks!
Whoops, I spoke too soon. I'll take a quick look tomorrow, but if you have an idea that would be great....
Quoted 6 lines
The code I'm running is in
git://linux-nfs.org/~bfields/linux-topics.gitfor-3.6-incomingLooks like the
BUG()case ingss_get_mic_kerberos(), soctx->enctypeis bogus--maybe a context isn't getting initialized right?
And this is reproduceable after applying the first patch ("conditionally return endtime...") but not before. The patch seems obviously innocent, but maybe my eyes are playing tricks on me.
--b.
Quoted 52 lines
--b.
kernel BUG at
net/sunrpc/auth_gss/gss_krb5_seal.c:213! invalid opcode: 0000 [#1] PREEMPT SMP
CPU 1Modules linked in: rpcsec_gss_krb5 iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi nfsd lockd nfs_acl auth_rpcgss sunrpc [last unloaded: scsi_wait_scan]Pid: 4924, comm: nfsd Not tainted 3.5.0-rc3-00104-g3521b3f #14 Bochs Bochs
RIP: 0010:[<ffffffffa00e4076>] [<ffffffffa00e4076>] gss_get_mic_kerberos+0x26/0x310 [rpcsec_gss_krb5] RSP: 0018:ffff880035ed9aa0 EFLAGS: 00010202 RAX: ffffffffa00e7e20 RBX: ffff8800392398f8 RCX: ffff880032c53000 RDX: ffff880035ed9ba0 RSI: ffff880035ed9b50 RDI: ffff880036ffd8b8 RBP: ffff880035ed9b30 R08: 0000000000000000 R09: ffff8800391afb20 R10: 0000000000000000 R11: 0000000000000001 R12: ffff880032c53014 R13: ffff880035ed9ba0 R14: ffff880035ed9b50 R15: ffff880036ffd8b8 FS: 0000000000000000(0000) GS:ffff88003fc80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b CR2: 00007f0a38b45000 CR3: 0000000032cc8000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process nfsd (pid: 4924, threadinfo ffff880035ed8000, task ffff88003b326040) Stack: ffff880035ed9b10 ffffffffa001c163 0000000000000004 ffff880035f365b0 0000000000015240 00000000000000c0 000000004ffc95c7 0000000000000000 ffff880035e8adf0 ffff880035ed9b20 ffff88003beecda8 ffff880035f36590 Call Trace: [<ffffffffa001c163>] ? cache_check+0x73/0x380 [sunrpc] [<ffffffffa0056bd3>] gss_get_mic+0x13/0x20 [auth_rpcgss] [<ffffffffa0058255>] gss_write_verf+0x95/0x110 [auth_rpcgss] [<ffffffffa00593bb>] svcauth_gss_legacy_init+0x24b/0x5f0 [auth_rpcgss] [<ffffffffa0059170>] ? svcauth_gss_register_pseudoflavor+0xc0/0xc0 [auth_rpcgss] [<ffffffffa005a1f1>] svcauth_gss_accept+0x501/0xa90 [auth_rpcgss] [<ffffffffa0059cf0>] ? svcauth_gss_proxy_init+0x590/0x590 [auth_rpcgss] [<ffffffffa0013aca>] ? svc_authenticate+0x5a/0xe0 [sunrpc] [<ffffffffa0013aca>] ? svc_authenticate+0x5a/0xe0 [sunrpc] [<ffffffffa0013b36>] svc_authenticate+0xc6/0xe0 [sunrpc] [<ffffffffa000f57d>] svc_process_common+0x20d/0x690 [sunrpc] [<ffffffff81079750>] ? try_to_wake_up+0x330/0x330 [<ffffffffa0087bd0>] ? nfsd_svc+0x230/0x230 [nfsd] [<ffffffffa000fd50>] svc_process+0x110/0x160 [sunrpc] [<ffffffffa0087c8d>] nfsd+0xbd/0x1a0 [nfsd] [<ffffffffa0087bd0>] ? nfsd_svc+0x230/0x230 [nfsd] [<ffffffff8106675e>] kthread+0x9e/0xb0 [<ffffffff819af494>] kernel_thread_helper+0x4/0x10 [<ffffffff819a735d>] ? retint_restore_args+0xe/0xe [<ffffffff810666c0>] ? __init_kthread_worker+0x70/0x70 [<ffffffff819af490>] ? gs_change+0xb/0xb Code: fe ff ff 90 90 55 48 89 e5 41 57 41 56 41 55 41 54 53 48 83 ec 68 66 66 66 66 90 48 8b 5f 08 49 89 f6 49 89 d5 83 7b 04 17 76 04 <0f> 0b eb fe 48 63 4b 04 b8 01 00 00 00 48 d3 e0 a9 50 00 80 00 RIP [<ffffffffa00e4076>] gss_get_mic_kerberos+0x26/0x310 [rpcsec_gss_krb5] RSP <ffff880035ed9aa0> ---[ end trace 797c56ca0aa53457 ]---
Quoted 6 lines · J. Bruce Fields
And this is reproduceable after applying the first patch ("conditionally
return endtime...") but not before. The patch seems obviously innocent,
but maybe my eyes are playing tricks on me.
missing braces around the if statement where I inserted the if (endtime) contion, causing instead to always kfree(ctx)
Sorry about that, it completely escaped my review of it multiple times over.
SImo.
Signature · 1 line
Simo Sorce * Red Hat, Inc * New York
Quoted 13 lines · Trond
Quoted 3 lines · J. Bruce Fields
So, if the issue is: you want to be able to choose, in individual containers, which mechanism to use: whatever, we can probably make that work.
Please do then.
Quoted 5 lines
If you're instead saying: it's not acceptable to use the gssproxy mechanism to authenticate v4.0 callbacks, the client must only ever use the existing mechanism: then I'd rather drop this entirely. I don't want to merge an rpc server authentication upcall that's not acceptable for one of the rpc servers.
Quoted 8 lines
If it goes in, I want it to be optional so that it doesn't break working setups. I also want upgrades/downgrades to be as painless as possible.
See for instance the idmapper changes in 3.5 which are totally transparent to the user: if the admin sets up
/etc/request-key.confto use the newid_resolver, then that works, otherwise we just fall back to using the old rpc.idmapd method. There are no module parameters etc involved.
There's a module parameter here, but it's meant to be set by gssproxy to indicate it's listening for the new upcall. In theory that should make the transition transparent.
However, if we need to make the choice per-namespace then we need to find some other mechanism (assuming there's no way to make module parameters per-namespace.)
--b.
Quoted 7 lines · Simo Sorce
Quoted 6 lines · J. Bruce Fields
And this is reproduceable after applying the first patch ("conditionally
return endtime...") but not before. The patch seems obviously innocent,
but maybe my eyes are playing tricks on me.
Quoted 5 lines
missing braces around the if statement where I inserted the if (endtime) contion, causing instead to always kfree(ctx)
Sorry about that, it completely escaped my review of it multiple times over.
I also looked straight at it without seeing it. It's tough to make my eyes not trust the indentation!
--b.
net/sunrpc/auth_gss/gss_krb5_mech.c +2 -2
@@ -695,11 +695,11 @@ gss_import_sec_context_kerberos(const void *p, size_t len,else ret =gss_import_v2_context (p, end, ctx, gfp_mask); -if (ret ==0 ) +if (ret ==0 ) { ctx_id->internal_ctx_id = ctx;if (endtime) *endtime = ctx->endtime; -else + }else kfree (ctx);dprintk ("RPC: %s: returning %d\n" , __func__, ret);
Quoted 23 lines · J. Bruce Fields
Quoted 13 lines · Trond
Quoted 3 lines · J. Bruce Fields
So, if the issue is: you want to be able to choose, in individual containers, which mechanism to use: whatever, we can probably make that work.
Please do then.
Quoted 5 lines
If you're instead saying: it's not acceptable to use the gssproxy mechanism to authenticate v4.0 callbacks, the client must only ever use the existing mechanism: then I'd rather drop this entirely. I don't want to merge an rpc server authentication upcall that's not acceptable for one of the rpc servers.
Quoted 8 lines
If it goes in, I want it to be optional so that it doesn't break working setups. I also want upgrades/downgrades to be as painless as possible.
See for instance the idmapper changes in 3.5 which are totally transparent to the user: if the admin sets up
/etc/request-key.confto use the newid_resolver, then that works, otherwise we just fall back to using the old rpc.idmapd method. There are no module parameters etc involved.
Quoted 7 lines
There's a module parameter here, but it's meant to be set by gssproxy to indicate it's listening for the new upcall. In theory that should make the transition transparent.
However, if we need to make the choice per-namespace then we need to find some other mechanism (assuming there's no way to make module parameters per-namespace.)
So, perhaps something like: if the cache "channel" file for the namespace associated with the current request isn't opened, then try the new upcall.
--b.
Quoted 12 lines · Simo Sorce
This patchset implements a new upcall mechanism that uses the sunrpc client to talk to gssproxy[1], a new userspace daemon that handles gssapi operations on behalf of other processes on the system.
The main driver for this new mechanism is to overcome limitations with the current daemon and upcall. The current code cannot handle tickets larger than approximatively 2k and cannot handle sending back large user credential sets to the kernel.
These patches have been tested against the development version of gssproxy tagged as kernel_v0.1 in the master repo[2].
Quoted 6 lines
I have tested walking into mountpoints using tickets artificially pumped up to 64k and the user is properly authorized, after the
accept_se_contextcall is performed through the new upcall mechanism and gssproxy.The gssproxy has the potential of handling also
init_sec_contextcalls, but at the moment the only targeted system is nfsd.
Something I forgot to ask about. (Or I did ask and forgot to take notes on the answer!): how is gssproxy doing the principal->(uid, gid's) mapping?
(svcgssd uses libnfsidmap--which I don't particularly like, but if gssproxy is doing something different then we need to figure out how the transition will work).
--b.
Quoted 20 lines · J. Bruce Fields
Quoted 12 lines · Simo Sorce
This patchset implements a new upcall mechanism that uses the sunrpc client to talk to gssproxy[1], a new userspace daemon that handles gssapi operations on behalf of other processes on the system.
The main driver for this new mechanism is to overcome limitations with the current daemon and upcall. The current code cannot handle tickets larger than approximatively 2k and cannot handle sending back large user credential sets to the kernel.
These patches have been tested against the development version of gssproxy tagged as kernel_v0.1 in the master repo[2].
Quoted 6 lines
I have tested walking into mountpoints using tickets artificially pumped up to 64k and the user is properly authorized, after the
accept_se_contextcall is performed through the new upcall mechanism and gssproxy.The gssproxy has the potential of handling also
init_sec_contextcalls, but at the moment the only targeted system is nfsd.
Quoted 7 lines
Something I forgot to ask about. (Or I did ask and forgot to take notes on the answer!): how is gssproxy doing the principal->(uid, gid's) mapping?
(svcgssd uses libnfsidmap--which I don't particularly like, but if gssproxy is doing something different then we need to figure out how the transition will work).
At the moment gss-proxy uses the standard gss_localname() function to find out what user a principal maps to. Then a normal getpwnam() to get the user's ids followed by a getgrouplist() for the groups.
I thought of using libnfsidmap but to be honest it makes little sense, it is its own island of configuration that is different from the rest of the system and I could not figure out why nfs should behave differently from the rest of the system.
If there is a good reason I can link against the library in gss-proxy, although I'd rather take the ball for unifying mapping so that it behaves uniformly across the system rather than keeping custom mappings that may different between apps and filesystem.
Simo.
Signature · 1 line
Simo Sorce * Red Hat, Inc * New York
Quoted 28 lines · J. Bruce Fields
Quoted 27 lines · J. Bruce Fields
Quoted 13 lines · Trond
Quoted 3 lines · J. Bruce Fields
So, if the issue is: you want to be able to choose, in individual containers, which mechanism to use: whatever, we can probably make that work.
Please do then.
Quoted 5 lines
If you're instead saying: it's not acceptable to use the gssproxy mechanism to authenticate v4.0 callbacks, the client must only ever use the existing mechanism: then I'd rather drop this entirely. I don't want to merge an rpc server authentication upcall that's not acceptable for one of the rpc servers.
Quoted 8 lines
If it goes in, I want it to be optional so that it doesn't break working setups. I also want upgrades/downgrades to be as painless as possible.
See for instance the idmapper changes in 3.5 which are totally transparent to the user: if the admin sets up
/etc/request-key.confto use the newid_resolver, then that works, otherwise we just fall back to using the old rpc.idmapd method. There are no module parameters etc involved.There's a module parameter here, but it's meant to be set by gssproxy to indicate it's listening for the new upcall. In theory that should make the transition transparent.
Quoted 7 lines
Quoted 3 lines
However, if we need to make the choice per-namespace then we need to find some other mechanism (assuming there's no way to make module parameters per-namespace.)
So, perhaps something like: if the cache "channel" file for the namespace associated with the current request isn't opened, then try the new upcall.
Looking at that a little longer: the channel file could be temporarily without any opens. (For example, svcgssd could be restarted--not normal, but it's always been possible before.) We probably could temporarily switch to the new upcall and then back without losing anything, but it all sounds complicated.
The module parameter won't work any more, and obviously module init isn't the right time to set everything up.
So my current thought is to give gssproxy some other way it can signal its presence using a write to a special file. (Maybe a new file under nfsd/, or maybe a write of a special value to one of the existing cache files.)
However, one hangup: figuring out how to switch on gssproxy per-container isn't very interesting until gssproxy can actually work per-container. I'd *really* like to get the unix socket stuff worked out first.
--b.
Quoted 4 lines · J. Bruce Fields
However, one hangup: figuring out how to switch on gssproxy per-container isn't very interesting until gssproxy can actually work per-container. I'd *really* like to get the unix socket stuff worked out first.
Stanislav, what's left to be done to get per-container unix sockets?
--b.
08.08.2012 23:43, J. Bruce Fields пишет:
Quoted 6 lines · J. Bruce Fields
Quoted 4 lines
However, one hangup: figuring out how to switch on gssproxy per-container isn't very interesting until gssproxy can actually work per-container. I'd *really* like to get the unix socket stuff worked out first.
Stanislav, what's left to be done to get per-container unix sockets?
Honestly, I haven't even started this task.
But if it's up to me, I'll try to measureit's complexity tomorrow. The task itself doesn't look too complex at first sight.
But anyway it's inclusion depends also on network developers comunity resolution.
Quoted 2 lines
--b.
08.08.2012 23:43, J. Bruce Fields пишет:
Quoted 8 lines · J. Bruce Fields
Quoted 4 lines
However, one hangup: figuring out how to switch on gssproxy per-container isn't very interesting until gssproxy can actually work per-container. I'd *really* like to get the unix socket stuff worked out first.
Stanislav, what's left to be done to get per-container unix sockets?
I've sent patches for review:
"net: connect to UNIX sockets from specified root"
Quoted 2 lines
--b.
Signature · 2 lines
Best regards, Stanislav Kinsbursky
One other question for Stanislav: I assume module parameters are global, and that there's no plan to try to make them per-container?
--b.
T24gVHVlLCAyMDEyLTA4LTIxIGF0IDEwOjE2IC0wNDAwLCBKLiBCcnVjZSBGaWVsZHMgd3JvdGU6 DQo+IE9uZSBvdGhlciBxdWVzdGlvbiBmb3IgU3RhbmlzbGF2OiBJIGFzc3VtZSBtb2R1bGUgcGFy YW1ldGVycyBhcmUgZ2xvYmFsLA0KPiBhbmQgdGhhdCB0aGVyZSdzIG5vIHBsYW4gdG8gdHJ5IHRv IG1ha2UgdGhlbSBwZXItY29udGFpbmVyPw0KDQpVcmdoLi4uIFBlci1jb250YWluZXIgbW9kdWxl cz8gVGhhdCB3b3VsZCBiZSB0ZXJyaWJsZS4uLg0KDQotLSANClRyb25kIE15a2xlYnVzdA0KTGlu dXggTkZTIGNsaWVudCBtYWludGFpbmVyDQoNCk5ldEFwcA0KVHJvbmQuTXlrbGVidXN0QG5ldGFw cC5jb20NCnd3dy5uZXRhcHAuY29tDQoNCg==
21.08.2012 18:16, J. Bruce Fields пишет:
Quoted 3 lines
One other question for Stanislav: I assume module parameters are global, and that there's no plan to try to make them per-container?
Yep, they will remain global. There may be some options, if you can tune them somehow (using sysctl or whatever). But currently I don't think, that module parameters should be containerized.
Quoted 2 lines
--b.
Signature · 2 lines
Best regards, Stanislav Kinsbursky
Quoted 5 lines · Trond
Quoted 2 lines · J. Bruce Fields
One other question for Stanislav: I assume module parameters are global, and that there's no plan to try to make them per-container?
Urgh... Per-container modules? That would be terrible...
Well, of course, but if module parameters can be modified post-module-install then in theory those modifications could be made to take effect only per namespace. (But which namespace?) I wouldn't be surprised if the whole idea makes no sense, though, I haven't thought about it.
--b.