]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
rgw/iam: Policy takes optional tenant name
authorCasey Bodley <cbodley@redhat.com>
Thu, 22 Feb 2024 18:16:00 +0000 (13:16 -0500)
committerCasey Bodley <cbodley@redhat.com>
Wed, 10 Apr 2024 17:09:16 +0000 (13:09 -0400)
commit7d99cbdd09bcad81619b1c4770a663fde2b30563
tree937e28b93457b039e57eba9fcecbba34d57a34f7
parentb021d0f2f133da6ac9e5972b481094d86802e979
rgw/iam: Policy takes optional tenant name

the iam policy parser takes a tenant string to reject Resource ARNs that
specify resources in other tenants, and prevent wildcards from applying
to other tenants

this is problematic for account users, because cross-account access requires
an identity policy that covers another account's resource. it's the
cross-policy evaluation rules that prevent that from granting access to
things it shouldn't. so for account users, pass a null tenant string to
allow all resource arns

for resource policies, this restriction is unnecessary in the first
place, because the resource policy can only match itself as the resource

Signed-off-by: Casey Bodley <cbodley@redhat.com>
13 files changed:
src/rgw/rgw_admin.cc
src/rgw/rgw_auth.cc
src/rgw/rgw_iam_managed_policy.cc
src/rgw/rgw_iam_policy.cc
src/rgw/rgw_iam_policy.h
src/rgw/rgw_op.cc
src/rgw/rgw_polparser.cc
src/rgw/rgw_rest_iam_group.cc
src/rgw/rgw_rest_pubsub.cc
src/rgw/rgw_rest_role.cc
src/rgw/rgw_rest_sts.cc
src/rgw/rgw_rest_user_policy.cc
src/test/rgw/test_rgw_iam_policy.cc