]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw/sts: replacing load_stats with list_buckets 61821/head
authorPritha Srivastava <prsrivas@redhat.com>
Fri, 14 Feb 2025 04:26:07 +0000 (09:56 +0530)
committerPritha Srivastava <prsrivas@redhat.com>
Fri, 14 Feb 2025 04:33:24 +0000 (10:03 +0530)
commitc834352cc70682d867a225c78af4083e94158b7e
tree966bf6f6013f08236d4659a1846767c623104af5
parentcc45b84a854dd76d497c5be8c177577ffc4561ef
rgw/sts: replacing load_stats with list_buckets
to correctly create a federated user in oidc namespace.

The idea was to check if the federated user had any buckets
associated with it from the time when the logic for creating
a shadow user was not in place, and this was done by calling
read_stats which returned -ENOENT when the user did not exist,
which was erroneously interpreted as buckets not existing for
the user - but this logic correctly led to creation of user
in oidc namespace. Later read_stats() was replaced by load_stats()
and load_stats() does not return -ENOENT when a user does
not exist, hence according to the code, the federated user
was not getting created in 'oidc' namespace. Hence replaced load_stats()
with list_buckets() and corrected the code to create a user
in oidc namespace if the user did not own any bucket.

Fixes: https://tracker.ceph.com/issues/69924
Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
src/rgw/rgw_auth.cc