Closed lgyurci closed 6 months ago
- Set api to s3v2
- Start wireshark or tcpdump with applicable flags
- Run mc with --debug flag
- Observe, that according to mc, the Authorization header is "AWS REDACTED:REDACTED". This corresponds to aws v2 signature, as it would be expected.
- Meanwhile, according to the packet capture, the Authorization header is "AWS4-HMAC-SHA256 Credential=something, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=something". This corresponds to aws v4 signature, which is not expected.
can you show me the packet capture?
Yes. I anonimized some things in there with "W" letters. Also, this is a single GET request, but the headers in question are the same in every request. s3v2v2.zip
can you share mc ls --debug
output for this?
and also mc alias list alias/
?
Sure. Same anonimization rule applies.
root@WWWW:~# mc ls --debug localbucket/WWWWW
mc: <DEBUG> GET /WWWWW/?location= HTTP/1.1
Host: 10.185.0.144:8080
User-Agent: MinIO (linux; amd64) minio-go/v7.0.70 mc/RELEASE.2024-04-29T09-56-05Z
Accept-Encoding: zstd,gzip
Authorization: AWS **REDACTED**:**REDACTED**
X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
X-Amz-Date: 20240502T112434Z
mc: <DEBUG> HTTP/1.1 200 OK
Content-Length: 137
Connection: Keep-Alive
Date: Thu, 02 May 2024 11:24:34 GMT
X-Amz-Request-Id: tx0000088fbb1c964bdd8cc-00663377f2-8a54f9-ceph-store
mc: <DEBUG> Response Time: 2.285532ms
mc: <DEBUG> HEAD /WWWWW/ HTTP/1.1
Host: 10.185.0.144:8080
User-Agent: MinIO (linux; amd64) minio-go/v7.0.70 mc/RELEASE.2024-04-29T09-56-05Z
Authorization: AWS **REDACTED**:**REDACTED**
X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
X-Amz-Date: 20240502T112434Z
mc: <DEBUG> HTTP/1.1 200 OK
Connection: Keep-Alive
Date: Thu, 02 May 2024 11:24:34 GMT
X-Amz-Request-Id: tx000005f6c7ec01a3a8d9f-00663377f2-8a54f9-ceph-store
X-Rgw-Bytes-Used: 37567454
X-Rgw-Object-Count: 79
X-Rgw-Quota-Bucket-Objects: -1
X-Rgw-Quota-Bucket-Size: -1
X-Rgw-Quota-Max-Buckets: 1
X-Rgw-Quota-User-Objects: -1
X-Rgw-Quota-User-Size: 10737418240
Content-Length: 0
mc: <DEBUG> Response Time: 20.674677ms
mc: <DEBUG> GET /WWWWW/?delimiter=%2F&encoding-type=url&fetch-owner=true&list-type=2&prefix= HTTP/1.1
Host: 10.185.0.144:8080
User-Agent: MinIO (linux; amd64) minio-go/v7.0.70 mc/RELEASE.2024-04-29T09-56-05Z
Accept-Encoding: zstd,gzip
Authorization: AWS **REDACTED**:**REDACTED**
X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
X-Amz-Date: 20240502T112434Z
mc: <DEBUG> HTTP/1.1 200 OK
Transfer-Encoding: chunked
Connection: Keep-Alive
Content-Type: application/xml
Date: Thu, 02 May 2024 11:24:34 GMT
X-Amz-Request-Id: tx0000014cc6a071d589201-00663377f2-8a54f9-ceph-store
mc: <DEBUG> Response Time: 2.84579ms
[2024-05-02 11:24:34 UTC] 0B sample1/
[2024-05-02 11:24:34 UTC] 0B sample2/
[2024-05-02 11:24:34 UTC] 0B sample3/
root@WWWW:~# mc alias list localbucket/
localbucket
URL : http://10.185.0.144:8080/
AccessKey : WWWWWW
SecretKey : WWWWWWW
API : S3v2
Path :
Looks like a regression sending a fix.
That was extremely quick! Thank you
Expected behavior
"api": "S3v2" in config should cause the mc client to use v2 signature. Moreover, there shouldn't be a difference in the http headers seen with the --debug flag, and in the headers that are actually sent out in the packets.
Actual behavior
"api": "S3v2" in config does not cause the mc client to use v2 signature, even though in debug mode it seems like it is. There is a difference between headers seen with the --debug flag, and in the headers that are actually sent out in the packets.
Steps to reproduce the behavior
mc --version
mc version RELEASE.2024-04-29T09-56-05Z (commit-id=5b7b2223717a32ff01d63d57c2d040a719ca581e) Runtime: go1.21.9 linux/amd64