Whamcloud - gitweb
LU-16205 sec: fid2path for encrypted files
authorSebastien Buisson <sbuisson@ddn.com>
Thu, 3 Nov 2022 10:52:02 +0000 (11:52 +0100)
committerAndreas Dilger <adilger@whamcloud.com>
Tue, 25 Apr 2023 03:42:39 +0000 (03:42 +0000)
commitda88647a89a48976aab8c6b481f9f16e95a62583
tree72071b9a42e2e64f00c1bf0fb9e40b4372d7e38f
parentb00112a2822aae079758d6065382733d19b72f17
LU-16205 sec: fid2path for encrypted files

Add support of fid2path for encrypted files. Server side returns raw
encrypted path name to client, which needs to process the returned
string. This is done from top to bottom, by iteratively decrypting
parent name and then doing a lookup on it, so that child can in turn
be decrypted.

For encrypted files that do not have their names encrypted, lookups
can be skipped. Indeed, name decryption is a no-op in this case, which
means it is not necessary to fetch the encryption key associated with
the parent inode.

Without the encryption key, lookups are skipped for the same reason.
But names have to be encoded and/or digested. So server needs to
insert FIDs of individual path components in the returned string.
These FIDs are interpreted by the client to build encoded/digested
names.

Add sanity-sec test_63 to exercise this new capability.

Lustre-change: https://review.whamcloud.com/48930
Lustre-commit: fa9da556ad22b1485c53cf0337dc6872d89aedfa

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I165bf2e5657037ae2e25c9378e4713537ea94bec
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/49898
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/include/lustre_export.h
lustre/include/uapi/linux/lustre/lustre_idl.h
lustre/llite/file.c
lustre/llite/llite_internal.h
lustre/llite/llite_lib.c
lustre/lmv/lmv_obd.c
lustre/mdc/mdc_request.c
lustre/mdt/mdt_handler.c
lustre/tests/sanity-sec.sh