]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw/sts: replacing load_stats with list_buckets 62386/head
authorPritha Srivastava <prsrivas@redhat.com>
Fri, 14 Feb 2025 04:26:07 +0000 (09:56 +0530)
committerPritha Srivastava <prsrivas@redhat.com>
Wed, 19 Mar 2025 07:27:55 +0000 (12:57 +0530)
commitbd9b9752e81081f0ae8591cd20e49b2227d61afe
tree37fed8d8461baefb67029daa54b58ad4dbc40f1d
parentcfb0f3bdaaa7ab7dc7915449130a305faeacd1a1
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>
(cherry picked from commit c834352cc70682d867a225c78af4083e94158b7e)

Conflicts:
src/rgw/rgw_auth.cc
- load_acct_info in squid returns void
src/rgw/rgw_auth.cc