Whamcloud - gitweb
LU-18087 enc: support encrypted names in changelogs 16/55916/8
authorSebastien Buisson <sbuisson@ddn.com>
Fri, 2 Aug 2024 13:03:49 +0000 (15:03 +0200)
committerOleg Drokin <green@whamcloud.com>
Thu, 2 Jan 2025 20:47:08 +0000 (20:47 +0000)
commitcc7d9d04d6ce48e1088cf9c5096b6632a964526a
tree6321ebbc9d503a148e5ef1ae56933d02f7c0bd61
parentbb5e724ec13cc56668cebed8c47ee5ade59acd45
LU-18087 enc: support encrypted names in changelogs

In order to support encrypted names in changelogs, we choose to have
the servers directly store the encoded+digested names in the
changelogs. This requires to add some knowledge of encrypted names on
server side, but that choice brings a number of benefits:
- as servers are storing changelog records, they have access to the
  files' flags and can find out if files are encrypted or not. This
  would not be possible on client side when reading changelogs,
  because corresponding files might even no longer exist.
- no modifications are needed on client side, either in the kernel or
  in userspace. As the API remains untouched, this is completely
  transparent to applications that are consuming changelogs.

The file names retrieved from the changelogs are identical to the
names displayed when listing directories without the encryption key.
If names are not encrypted, they remain unchanged. If names are
encrypted, their digested+encoded form is presented.

Add sanity-sec test_73 to exercise this code.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: If0de4bfa210f9067a7a934ac74863a77b19482db
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55916
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
libcfs/include/libcfs/crypto/llcrypt.h
lustre/mdd/mdd_dir.c
lustre/tests/sanity-sec.sh
lustre/tests/test-framework.sh