]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw/sts : get-caller-identity fix#72982 wip-raja-get-caller-identity-issue
authorRaja Sharma <raja@ibm.com>
Tue, 30 Sep 2025 15:46:09 +0000 (21:16 +0530)
committerRaja Sharma <raja@ibm.com>
Mon, 6 Oct 2025 07:28:16 +0000 (12:58 +0530)
Tracker: https://tracker.ceph.com/issues/72982

Signed-off-by: Raja Sharma <raja@ibm.com>
qa/rgw/s3tests-branch.yaml
src/rgw/rgw_auth.h

index 8710ce35893b1e378e1d48ed146891b91332f49c..6010312aae9823e97fb4654c132ecb264abc0ee6 100644 (file)
@@ -1,4 +1,4 @@
 overrides:
   s3tests:
-     force-branch: ceph-master
-     # git_remote: https://github.com/ceph/
+     force-branch: wip-raja-get-caller-identity-issue
+     git_remote: https://github.com/ArbitCode/
index 0630f36d929e24f6b3a730d2b027a06bf7d63591..ef03956121ac0d115513cb2beec63e00b21e2604 100644 (file)
@@ -855,7 +855,12 @@ public:
   std::optional<rgw::ARN> get_caller_identity() const override {
     rgw::Partition partition = rgw::Partition::aws;
     rgw::Service service = rgw::Service::sts;
-    std::string acct = role.account->id.empty() ? role.tenant : role.account->id;
+    std::string acct;
+    if (role.account && !role.account->id.empty()) {
+      acct = role.account->id;
+    } else {
+      acct = role.tenant;
+    }
     std::string resource = "assumed-role" + role.path + role.name + "/" + token_attrs.role_session_name;
 
     return rgw::ARN(partition, service, "", acct, resource);