Repository: minio/minio (language: go)

Issue:
Unable to configure remote tier target: failed to perform PUT Content-MD5 OR x-amz-checksum- HTTP header is required for Put Object requests with Object Lock parameters
<!--- Provide a general summary of the issue in the Title above -->

I'm trying to add AWS S3 tier for cold storage transition. The S3 bucket is configured with object lock enabled and compliance.

Through the UI or `mc` I'm getting the same error:

`Unable to configure remote tier target: failed to perform PUT Content-MD5 OR x-amz-checksum- HTTP header is required for Put Object requests with Object Lock parameters`

Using debug with `mc` it can be seen that there is no Content-MD5 header set in the PUT request, which from what I understood is a mandatory header for obect-lock enabled buckets in AWS

Or am i missing some configuration where i can include that header in the PUT request when adding a Tier?

## Expected Behavior
<!--- If you're describing a bug, tell us what should happen -->
<!--- If you're suggesting a change/improvement, tell us how it should work -->

To be able to add AWS S3 tier with object lock enabled

## Current Behavior
<!--- If describing a bug, tell us what happens instead of the expected behavior -->
<!--- If suggesting a change/improvement, explain the difference from current behavior -->

Error is returned when trying to add AWS S3 tier with object lock enabled.
While trying to setup the tier with `mc` i'm getting:

```
mc: <DEBUG> PUT /minio/admin/v3/tier?force=false HTTP/1.1
Host: minio-api.**REDACTED**
User-Agent: MinIO (linux; amd64) madmin-go/2.0.0 mc/RELEASE.2023-09-02T21-28-03Z
Content-Length: 394
Accept-Encoding: zstd,gzip
Authorization: AWS4-HMAC-SHA256 Credential=**REDACTED**/20230905//s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=**REDACTED**
X-Amz-Content-Sha256: 17c6e6e8233ea71467b21d8791c9d56f06def5d3aa66a0c127cacd9f482d9ff8
X-Amz-Date: 20230905T102625Z

mc: <DEBUG> HTTP/1.1 400 Bad Request
Content-Length: 332
Accept-Ranges: bytes
Content-Type: application/json
Date: Tue, 05 Sep 2023 10:26:26 GMT
Server: istio-envoy
Strict-Transport-Security: max-age=31536000; includeSubDomains
Vary: Origin,Accept-Encoding
X-Amz-Id-2: af873a0cdb976e37ad8b22534a489c22e005796a4c24b41e9be92b51c0353c13
X-Amz-Request-Id: 1781F9CB4810433D
X-Content-Type-Options: nosniff
X-Envoy-Upstream-Service-Time: 541
X-Xss-Protection: 1; mode=block

{"Code":"XMinioAdminTierInsufficientPermissions","Message":"failed to perform PUT Content-MD5 OR x-amz-checksum- HTTP header is required for Put Object requests with Object Lock parameters","Resource":"/minio/admin/v3/tier","RequestId":"1781F9CB4810433D","HostId":"af873a0cdb976e37ad8b22534a489c22e005796a4c24b41e9be92b51c0353c13"}
```

## Possible Solution
<!--- Not obligatory, but suggest a fix/reason for the bug, -->
<!--- or ideas how to implement the addition or change -->

Add Content-MD5 to the PUT request when adding AWS S3 tier.

## Steps to Reproduce (for bugs)
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
<!--- reproduce this bug. Include code to reproduce, if relevant -->
<!--- and make sure you have followed https://github.com/minio/minio/tree/release/docs/debugging to capture relevant logs -->

1. Use the UI to add a new AWS S3 tier which has a bucket with object lock and compliance configured
or
1. Use mc to add tier
```
mc ilm tier add s3 minio-alias SOME_NAME_OF_TIER \
                               --endpoint https://s3.ommited.endpoint \
                               --access-key "AWS_KEY" \
                               --secret-key "AWS_SECRET" \
                               --bucket aws_bucket \
                               --region some_region \
                               --storage-class "STANDARD" \
                               --prefix prefix/ --debug
```

## Context
<!--- How has this issue affected you? What are you trying to accomplish? -->
<!--- Providing context helps us come up with a solution that is most useful in the real world -->

Trying to setup transition from minio object lock enabled bucket to AWS s3 object lock enabled bucket.

## Regression
<!-- Is this issue a regression? (Yes / No) -->
<!-- If Yes, optionally please include minio version or commit id or PR# that caused this regression, if you have these details. -->
I couldn't find much information about the issue

## Your Environment
<!--- Include as many relevant details about the environment you experienced the bug in -->
* Version used (`minio --version`): 
 mc version: `RELEASE.2023-09-02T21-28-03Z (commit-id=e2056fb057897a515d2cad25aa461f5dfd32695d)`
* Server setup and configuration: 
`minio-operator (kubernetes) v5.0.7`
`minio-tenant (kubernetes) v5.0.7 - RELEASE.2023-09-04T19-57-37Z (commit-id=1c99fb106c3e1448ed92f8465d5695d055d432e7)`
* Operating System and version (`uname -a`): 
kubernetes running on: `Red Hat Enterprise Linux 8.6  kernel: 4.18.0-372.9.1.el8.x86_64` 


Discussion / hints:

Fix patch:
diff --git a/cmd/warm-backend-s3.go b/cmd/warm-backend-s3.go
index 743bbe8b0ad37..3f51d74736f1e 100644
--- a/cmd/warm-backend-s3.go
+++ b/cmd/warm-backend-s3.go
@@ -64,7 +64,10 @@ func (s3 *warmBackendS3) getDest(object string) string {
 }
 
 func (s3 *warmBackendS3) Put(ctx context.Context, object string, r io.Reader, length int64) (remoteVersionID, error) {
-	res, err := s3.client.PutObject(ctx, s3.Bucket, s3.getDest(object), r, length, minio.PutObjectOptions{StorageClass: s3.StorageClass})
+	res, err := s3.client.PutObject(ctx, s3.Bucket, s3.getDest(object), r, length, minio.PutObjectOptions{
+		SendContentMd5: true,
+		StorageClass:   s3.StorageClass,
+	})
 	return remoteVersionID(res.VersionID), s3.ToObjectError(err, object)
 }
 


Test patch: