Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multipart: Respect disable-sha256-payload on upload #331

Merged
merged 1 commit into from
Aug 5, 2024

Conversation

klauspost
Copy link
Collaborator

When preparing, forward the --disable-sha256-payload parameter.

Requires minio/minio-go#1988

Fixes #329

Testing

Without --disable-sha256-payload on non TLS host:

127.0.0.1:9001 [REQUEST s3.PutObjectPart] [2024-08-05T11:38:38.387] [Client IP: 127.0.0.1]
127.0.0.1:9001 PUT /warp-benchmark-bucket/warp-multipart.bin?partNumber=8&uploadId=YTQ0NDc3MTktNWViMS00YWY4LWI0NmMtYTgyMjMyYzE5YjAyLjlhNjU3OWVlLWY3ODctNGZhMi1hMTBmLTkyNDIwOWU0NDMxZngxNzIyODUwNzE4MzcxOTA1MjAw
127.0.0.1:9001 Proto: HTTP/1.1
127.0.0.1:9001 Host: 127.0.0.1:9001
127.0.0.1:9001 User-Agent: MinIO (windows; amd64) minio-go/v7.0.75 warp/(dev)
127.0.0.1:9001 X-Amz-Content-Sha256: STREAMING-AWS4-HMAC-SHA256-PAYLOAD
127.0.0.1:9001 X-Amz-Date: 20240805T093838Z
127.0.0.1:9001 X-Amz-Decoded-Content-Length: 5242880
127.0.0.1:9001 Authorization: AWS4-HMAC-SHA256 Credential=minio/20240805/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-decoded-content-length,Signature=75c66253396134912f0ba16503254c07c3485fc89d4c08c14be16f4d20742071
127.0.0.1:9001 Content-Length: 5250166
127.0.0.1:9001 <BLOB>
127.0.0.1:9001 [RESPONSE] [2024-08-05T11:38:38.500] [ Duration 112.643ms TTFB 0s ↑ 5.0 MiB  ↓ 0 B ]
127.0.0.1:9001 200 OK

With --disable-sha256-payload on non TLS host:

127.0.0.1:9001 [REQUEST s3.PutObjectPart] [2024-08-05T11:40:02.698] [Client IP: 127.0.0.1]
127.0.0.1:9001 PUT /warp-benchmark-bucket/warp-multipart.bin?partNumber=6&uploadId=YTQ0NDc3MTktNWViMS00YWY4LWI0NmMtYTgyMjMyYzE5YjAyLmJlZGNjZjc2LWJjZWEtNDBhOC05YmU3LTE5YjFiYThhNTRjNHgxNzIyODUwODAyNjgyNzk2OTAw
127.0.0.1:9001 Proto: HTTP/1.1
127.0.0.1:9001 Host: 127.0.0.1:9001
127.0.0.1:9001 X-Amz-Content-Sha256: UNSIGNED-PAYLOAD
127.0.0.1:9001 X-Amz-Date: 20240805T094002Z
127.0.0.1:9001 Authorization: AWS4-HMAC-SHA256 Credential=minio/20240805/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=378eeccc3e2e530193ebe31015aa1b58cd47f57bc611064051c50e768c8ca949
127.0.0.1:9001 Content-Length: 5242880
127.0.0.1:9001 User-Agent: MinIO (windows; amd64) minio-go/v7.0.75 warp/(dev)
127.0.0.1:9001 <BLOB>
127.0.0.1:9001 [RESPONSE] [2024-08-05T11:40:02.787] [ Duration 88.98ms TTFB 0s ↑ 5.0 MiB  ↓ 0 B ]
127.0.0.1:9001 200 OK

When preparing, forward the `--disable-sha256-payload` parameter.

Requires minio/minio-go#1988

Fixes minio#329

Without `--disable-sha256-payload` on non TLS host:

```
127.0.0.1:9001 [REQUEST s3.PutObjectPart] [2024-08-05T11:38:38.387] [Client IP: 127.0.0.1]
127.0.0.1:9001 PUT /warp-benchmark-bucket/warp-multipart.bin?partNumber=8&uploadId=YTQ0NDc3MTktNWViMS00YWY4LWI0NmMtYTgyMjMyYzE5YjAyLjlhNjU3OWVlLWY3ODctNGZhMi1hMTBmLTkyNDIwOWU0NDMxZngxNzIyODUwNzE4MzcxOTA1MjAw
127.0.0.1:9001 Proto: HTTP/1.1
127.0.0.1:9001 Host: 127.0.0.1:9001
127.0.0.1:9001 User-Agent: MinIO (windows; amd64) minio-go/v7.0.75 warp/(dev)
127.0.0.1:9001 X-Amz-Content-Sha256: STREAMING-AWS4-HMAC-SHA256-PAYLOAD
127.0.0.1:9001 X-Amz-Date: 20240805T093838Z
127.0.0.1:9001 X-Amz-Decoded-Content-Length: 5242880
127.0.0.1:9001 Authorization: AWS4-HMAC-SHA256 Credential=minio/20240805/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-decoded-content-length,Signature=75c66253396134912f0ba16503254c07c3485fc89d4c08c14be16f4d20742071
127.0.0.1:9001 Content-Length: 5250166
127.0.0.1:9001 <BLOB>
127.0.0.1:9001 [RESPONSE] [2024-08-05T11:38:38.500] [ Duration 112.643ms TTFB 0s ↑ 5.0 MiB  ↓ 0 B ]
127.0.0.1:9001 200 OK
```

With `--disable-sha256-payload` on non TLS host:

```
127.0.0.1:9001 [REQUEST s3.PutObjectPart] [2024-08-05T11:40:02.698] [Client IP: 127.0.0.1]
127.0.0.1:9001 PUT /warp-benchmark-bucket/warp-multipart.bin?partNumber=6&uploadId=YTQ0NDc3MTktNWViMS00YWY4LWI0NmMtYTgyMjMyYzE5YjAyLmJlZGNjZjc2LWJjZWEtNDBhOC05YmU3LTE5YjFiYThhNTRjNHgxNzIyODUwODAyNjgyNzk2OTAw
127.0.0.1:9001 Proto: HTTP/1.1
127.0.0.1:9001 Host: 127.0.0.1:9001
127.0.0.1:9001 X-Amz-Content-Sha256: UNSIGNED-PAYLOAD
127.0.0.1:9001 X-Amz-Date: 20240805T094002Z
127.0.0.1:9001 Authorization: AWS4-HMAC-SHA256 Credential=minio/20240805/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=378eeccc3e2e530193ebe31015aa1b58cd47f57bc611064051c50e768c8ca949
127.0.0.1:9001 Content-Length: 5242880
127.0.0.1:9001 User-Agent: MinIO (windows; amd64) minio-go/v7.0.75 warp/(dev)
127.0.0.1:9001 <BLOB>
127.0.0.1:9001 [RESPONSE] [2024-08-05T11:40:02.787] [ Duration 88.98ms TTFB 0s ↑ 5.0 MiB  ↓ 0 B ]
127.0.0.1:9001 200 OK
```
@harshavardhana harshavardhana merged commit 22eed47 into minio:master Aug 5, 2024
9 checks passed
@klauspost klauspost deleted the multipart-sha256-disable branch August 15, 2024 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The config of '--disable-sha256-payload=true' in Multipart useless
2 participants