S3 header not implemented

I am trying to run a Docker registry with the storage backend as s3 (S3 storage driver | Docker Documentation).

The Docker registry uses this s3 library fro s3 compatible services (GitHub - aws/aws-sdk-go-v2: AWS SDK for the Go programming language.).

I encountered the following error:

s3aws: NotImplemented: A header you provided implies functionality that is not implemented

I managed to dump the HTTP request and response bodies:

Request:

PUT /docker/docker/registry/v2/blobs/sha256/1e/1eae7a7426b0551d5699798f8604597e7f5be52efd1f14ef53832a0cb63e7e4d/data HTTP/1.1
Host: gateway.eu1.storjshare.io
User-Agent: aws-sdk-go/1.34.9 (go1.16.6; linux; amd64)
Content-Length: 0
Authorization: AWS4-HMAC-SHA256 Credential=[REDACTED]/20211025/none/s3/aws4_request, SignedHeaders=content-type;host;x-amz-acl;x-amz-content-sha256;x-amz-copy-source;x-amz-date;x-amz-storage-class, Signature=6d097794e920e8ed56228bf21e09968ede4d5866c2d7d797ebef74e30b00e083
Content-Type: application/octet-stream
X-Amz-Acl: private
X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
X-Amz-Copy-Source: docker/docker/registry/v2/repositories/iron/go/_uploads/45574411-b8cf-4c4f-88ca-08fac3873720/data
X-Amz-Date: 20211025T095514Z
X-Amz-Storage-Class: STANDARD
Accept-Encoding: gzip

Response:

HTTP/2.0 501 Not Implemented
Content-Length: 502
Accept-Ranges: bytes
Content-Security-Policy: block-all-mixed-content
Content-Type: application/xml
Date: Mon, 25 Oct 2021 09:55:14 GMT
Server: MinIO
Vary: Origin
X-Amz-Request-Id: 16B13D758245E4F3
X-Xss-Protection: 1; mode=block


<?xml version="1.0" encoding="UTF-8"?>
<Error>
   <Code>NotImplemented</Code>
   <Message>A header you provided implies functionality that is not implemented</Message>
   <Key>docker/registry/v2/blobs/sha256/1e/1eae7a7426b0551d5699798f8604597e7f5be52efd1f14ef53832a0cb63e7e4d/data</Key>
   <BucketName>docker</BucketName>
   <Resource>/docker/docker/registry/v2/blobs/sha256/1e/1eae7a7426b0551d5699798f8604597e7f5be52efd1f14ef53832a0cb63e7e4d/data</Resource>
   <RequestId>16B13D758245E4F3</RequestId>
   <HostId />
</Error>

Has this got something to do with the X-Amz-Copy-Sourceheader? And if so, is there a potential fix?

Welcome to the forum @kamikazechaser , I have forwarded your question to the team.

The following error is due to the fact that we have not yet implemented CopyObject.

"error":"CopyObject is Not Implemented"

We are targeting support of CopyObject before the end of the year. I will update this thread when we release the enhancement.

Thank you!
-Dominick

5 Likes