Whamcloud - gitweb
LU-17015 gss: avoid request replay 89/52689/9
authorSebastien Buisson <sbuisson@ddn.com>
Fri, 13 Oct 2023 15:19:16 +0000 (17:19 +0200)
committerOleg Drokin <green@whamcloud.com>
Sat, 18 Nov 2023 21:44:57 +0000 (21:44 +0000)
commitd0194a4b5f6efa26d5473c2793b525f5fdb77e67
tree15e8efa4923571fdf4664b38aaf812898398a5c1
parent4505225108378433e878d137cc86723aab6be0f3
LU-17015 gss: avoid request replay

Lustre's upcall cache has a retry mechanism in case the upcall was
interrupted or failed and we timed out waiting. In this case we do our
best to retry and do the upcall again.
But when the upcall cache is used for GSS contexts, the upcall cannot
be done twice with same data. The GSSAPI implements security measures
that forbids that kind of request replay, to prevent man-in-the-middle
attacks for instance.

Add a new uc_acquire_replay field to struct upcall_cache, so that
upcall cache users can tell if acquire upcall can be replayed.
For identity upcall, this replay is fine. But for GSS contexts we need
to avoid those replays.
And bump upcall cache timeout value from 20s to 30s for GSS context
init requests.

Also add more debug messages to gss code for both client and server
sides, and both kernel and userspace.

Test-Parameters: kerberos=true testlist=sanity-krb5
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I56decc83a4f0d21be420e87cb0417826011932af
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52689
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Aurelien Degremont <adegremont@nvidia.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/upcall_cache.h
lustre/mdt/mdt_handler.c
lustre/obdclass/upcall_cache.c
lustre/ptlrpc/gss/gss_cli_upcall.c
lustre/ptlrpc/gss/gss_svc_upcall.c
lustre/utils/gss/lgss_keyring.c
lustre/utils/gss/lgss_utils.c
lustre/utils/gss/lgss_utils.h
lustre/utils/gss/svcgssd_proc.c