Project

General

Profile

Actions

Bug #65179

open

rgw incorrectly uses `Range` header in `X-Amz-Cache`

Added by Taha Jahangir about 1 month ago. Updated 17 days ago.

Status:
New
Priority:
Normal
Assignee:
Target version:
% Done:

0%

Source:
Community (user)
Tags:
cache
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

As noted in RGW Data caching and CDN (https://docs.ceph.com/en/latest/radosgw/rgw-cache/ commited in https://github.com/ceph/ceph/pull/33646), the `X-Amz-Cache` header can be used to verify original headers/signature, but generating response with new `Range` header, but this doesn't work in action. And the response is returned with original `Range` header. A sample request/response is:

GET /temp/testfile HTTP/1.1
Host: myrgw.domain.com
x-amz-date: 20240327T134301Z
Authorization: AWS4-HMAC-SHA256 Credential=R612WE7A53PNXNZB4SUW/20240327/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-cache;x-amz-co....
Connection: close
x-amz-cache: .HOST.myrgw.domain.com.RANGE.bytes=10-20.X-AMZ-CONTENT-SHA256.e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.X-AMZ-DATE.20240327....
Range: bytes=0-5242879
X-Request-ID: ba471c53e0256f05585a26ba988968fc
X-Real-IP: 10.76.74.227
X-Forwarded-For: 10.76.74.227
X-Forwarded-Host: myrgw.domain.com
X-Forwarded-Port: 443
X-Forwarded-Proto: https
X-Forwarded-Scheme: https
X-Scheme: https
Accept-Encoding: identity
User-Agent: Boto3/1.34.23 md/Botocore#1.34.23 ua/2.0 os/linux#6.6.22-1-lts md/arch#x86_64 lang/python#3.9.16 md/pyimpl#CPython Botocore/1.34.23 Resource
X-Amz-Content-SHA256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
amz-sdk-invocation-id: d0b8677c-bcd2-4e65-8bf5-7499e7706396
amz-sdk-request: attempt=1

HTTP/1.1 206 Partial Content
Content-Length: 11
Content-Range: bytes 10-20/1371344
Accept-Ranges: bytes
Last-Modified: Tue, 11 Apr 2023 11:31:05 GMT
x-rgw-object-type: Normal
ETag: "444340706c6ec4d192b59d3f9a453525" 
x-amz-meta-mtime: 1663901421.014806364
x-amz-request-id: tx00000a2d3b3ace625e991-0066042265-6b3e37f-myrgw
Content-Type: application/octet-stream
Date: Wed, 27 Mar 2024 13:43:01 GMT
Connection: close

........>..

Tested with Ceph v16.2.15 but bug should exists in all versions.

RGW Log (with level=0) and the req/res is attached.


Files

test-rgw-req.txt (1.73 KB) test-rgw-req.txt Taha Jahangir, 03/27/2024 02:24 PM
rgw-log.log (26 KB) rgw-log.log Taha Jahangir, 03/27/2024 02:24 PM
Actions #1

Updated by Casey Bodley 17 days ago

  • Assignee set to Mark Kogan
Actions

Also available in: Atom PDF