Whamcloud - gitweb
LU-16524 sec: add fscrypt_admin rbac role 84/50184/13
authorSebastien Buisson <sbuisson@ddn.com>
Wed, 1 Mar 2023 15:11:19 +0000 (16:11 +0100)
committerOleg Drokin <green@whamcloud.com>
Tue, 21 Mar 2023 23:36:02 +0000 (23:36 +0000)
commit22bef9b6c64ef394a2efb41ce1388be71300af0d
tree9935970218892cf9df76087e643f13bbccf8e8f9
parent971e025f5fb77f4eaaa1e9070598dfa6292a9678
LU-16524 sec: add fscrypt_admin rbac role

The purpose of the new fscrypt_admin rbac role is to control admin
tasks related to fscrypt. When not set, it is forbidden to all users
including root to modify existing protectors or policies, or create
new ones. But it remains possible to lock and unlock encrypted
directories.

Internally, this is achieved by marking fscrypt metadata files and
directories, i.e. everything under ROOT/.fscrypt, with a special mdt
object flag LOHA_FSCRYPT_MD.
Upon request processing, the mdt layer returns -EPERM if the flag
LOHA_FSCRYPT_MD is found on an object that is the target of a modify
request.
The LUSTRE_IMMUTABLE_FL flag is also returned to clients for such
objects.

sanity-sec test_64f is added to exercise the new fscrypt_admin flag.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I99956499133994444ccd88e33340067790a182ce
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50184
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
17 files changed:
lustre/doc/lctl-nodemap-modify.8
lustre/include/lu_object.h
lustre/include/lustre_nodemap.h
lustre/include/md_object.h
lustre/include/uapi/linux/lustre/lustre_idl.h
lustre/lod/lod_object.c
lustre/mdt/mdt_coordinator.c
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_lib.c
lustre/mdt/mdt_open.c
lustre/mdt/mdt_reint.c
lustre/mdt/mdt_restripe.c
lustre/obdecho/echo_client.c
lustre/ptlrpc/wiretest.c
lustre/tests/sanity-sec.sh
lustre/utils/wirecheck.c
lustre/utils/wiretest.c