]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/bucket-logging: handle SigV2 presigned URLs 68540/head
authorNithya Balachandran <nithya.balachandran@ibm.com>
Wed, 22 Apr 2026 09:31:34 +0000 (09:31 +0000)
committerNithya Balachandran <nithya.balachandran@ibm.com>
Fri, 24 Apr 2026 04:39:19 +0000 (04:39 +0000)
Presigned URLs using SigV2 do not contain x-amz-credential causing the
log record field Authentication Type to be incorrectly set to '-'.
This has been fixed to check for the presence of the x-amz-expires and Expires
parameters instead.

Fixes: https://tracker.ceph.com/issues/76206
Signed-off-by: Nithya Balachandran <nithya.balachandran@ibm.com>
src/rgw/rgw_auth_s3.cc

index c14a937685aa99f386c27fb58853b22e926a04de..8e4ccd8c93bac962597bbbd486d85baaad8980d1 100644 (file)
@@ -1760,7 +1760,10 @@ void get_aws_version_and_auth_type(const req_state* s, string& aws_version, stri
       aws_version = "SigV2";
     }
   } else {
-    if (!s->info.args.get("x-amz-credential").empty()) {
+    // Expires is characteristic of the older Signature Version 2,
+    //  while X-Amz-Expires is used in Signature Version 4 (SigV4)
+    if (!s->info.args.get("x-amz-expires").empty() ||
+        !s->info.args.get("Expires").empty()) {
       auth_type = "QueryString";
       if (s->info.args.get("x-amz-algorithm") == AWS4_HMAC_SHA256_STR) {
       /* AWS v4 */