Whamcloud - gitweb
LU-18694 sec: nodemap local root user capabilities 66/57966/13
authorSebastien Buisson <sbuisson@ddn.com>
Fri, 24 Jan 2025 15:31:37 +0000 (16:31 +0100)
committerOleg Drokin <green@whamcloud.com>
Wed, 19 Mar 2025 23:33:41 +0000 (23:33 +0000)
commitf7495bc57f4873db2760fbe6a2c36e3ce8ef546d
tree9950c5100fadbc187882f785ad2429d9264eeb83
parentb90dc3cfe97ab113b39c1aeb8c0b329587c03a8f
LU-18694 sec: nodemap local root user capabilities

Add a new 'local_admin' rbac role, on by default. The purpose of this
new role is to keep capabilities for root even if it is mapped or
offset. This allows to have root mapped to a non-privileged storage id
while still being able to perform 'admin-like' tasks thanks to
capabilities, such as changing file permissions or file ownership.

Note that setquota and changing project id is also impacted by the
local_admin role. When enabled, root on the client that gets mapped on
file system side is still able to interact with those.

Be aware that if root is squashed, then capabilities are dropped as
for any other regular user.

New test sanity-sec test_64h exercises the local_admin role.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I5832b21106b2829134a596c2aacf04839be856e9
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57966
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Marc Vef <mvef@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
14 files changed:
lustre/doc/lctl-nodemap-modify.8
lustre/include/lustre_nodemap.h
lustre/include/md_object.h
lustre/include/uapi/linux/lustre/lustre_idl.h
lustre/mdt/mdt_coordinator.c
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_lib.c
lustre/mdt/mdt_restripe.c
lustre/obdecho/echo_client.c
lustre/ptlrpc/nodemap_handler.c
lustre/ptlrpc/wiretest.c
lustre/tests/sanity-sec.sh
lustre/utils/wirecheck.c
lustre/utils/wiretest.c