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>
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 */