]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: make keystone work without admin token(service ac requirement) 64200/head
authorDeepika Upadhyay <deepika.upadhyay@clyso.com>
Mon, 28 Oct 2024 09:19:52 +0000 (14:49 +0530)
committerDeepika Upadhyay <deepika.upadhyay@clyso.com>
Wed, 23 Jul 2025 11:25:10 +0000 (16:55 +0530)
Ceph RGW admin credentials must not be a requirement.
Both ec2 auth and keystone token validation work without an admin token.

And the user token verification will use its own token. The only
requirement for the service admin user token is the allow_expired, but
in our case we don't use this parameter.

fixes: https://tracker.ceph.com/issues/68327

Co-authored-by: @kayrus
Signed-off-by: Deepika Upadhyay <deepika.upadhyay@clyso.com>
(cherry picked from commit 55ce1782e159190fd9202b6e270a1a2c470b0626)

src/rgw/rgw_auth_keystone.cc

index 519f307e9874737147667469a25517e11f0c069b..e0d28d411e1900524dee8c10c55949f7a9d15f29 100644 (file)
@@ -80,7 +80,12 @@ admin_token_retry:
     throw -EINVAL;
   }
 
-  validate.append_header("X-Auth-Token", admin_token);
+  if (allow_expired) {
+    validate.append_header("X-Auth-Token", admin_token);
+  } else {
+    validate.append_header("X-Auth-Token", token);
+  }
+
   validate.set_send_length(0);
 
   validate.set_url(url);