Project

General

Profile

Bug #22129

rgw: 501 is returned When init multipart is using V4 signature and chunk encoding

Added by Jeegn Chen about 1 year ago. Updated 9 months ago.

Status:
Resolved
Priority:
High
Assignee:
Target version:
-
Start date:
11/15/2017
Due date:
% Done:

0%

Source:
Tags:
Backport:
luminous
Regression:
No
Severity:
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

Description

The is what we saw in wireshark when using a Go S3 SDK to access the S3 service from RGW in 11.2.0.

POST /docker/data?uploads= HTTP/1.1
Host: 192.168.161.129
User-Agent: aws-sdk-go/1.1.0 (go1.9.1; linux; amd64)
Transfer-Encoding: chunked
Authorization: AWS4-HMAC-SHA256 ...
Content-Type: application/octet-stream
X-Amz-Acl: private
X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
X-Amz-Date: 20171115T084546Z
X-Amz-Storage-Class: STANDARD
Accept-Encoding: gzip

0

HTTP/1.1 501 Not Implemented
Content-Length: 189
x-amz-request-id: tx000000000000000000d3e-005a0bfeba-a1fe5-default
Accept-Ranges: bytes
Content-Type: application/xml
Date: Wed, 15 Nov 2017 08:45:46 GMT

...


Related issues

Copied to rgw - Backport #22388: luminous: rgw: 501 is returned When init multipart is using V4 signature and chunk encoding Resolved

History

#1 Updated by Jeegn Chen about 1 year ago

To fix this issue share we modify the code as follows?

int RGW_Auth_S3::authorize_v4(RGWRados *store, struct req_state *s, bool force_boto2_compat /* = true */)
{
...
    if (!s->aws4_auth_streaming_mode) {

      dout(10) << "delaying v4 auth" << dendl;

      /* payload in a single chunk */

      switch (s->op_type)
      {
        case RGW_OP_CREATE_BUCKET:
        case RGW_OP_PUT_OBJ:
        case RGW_OP_PUT_ACLS:
        case RGW_OP_PUT_CORS:
        case RGW_OP_INIT_MULTIPART: // ------------------ Add this line --------------------
        case RGW_OP_COMPLETE_MULTIPART:
        case RGW_OP_SET_BUCKET_VERSIONING:
        case RGW_OP_DELETE_MULTI_OBJ:
        case RGW_OP_ADMIN_SET_METADATA:
        case RGW_OP_SET_BUCKET_WEBSITE:
          break;
        default:
          dout(10) << "ERROR: AWS4 completion for this operation NOT IMPLEMENTED" << dendl;
          return -ERR_NOT_IMPLEMENTED;
      }

      s->aws4_auth_needs_complete = true;

    } 
...
}

#2 Updated by Sage Weil about 1 year ago

  • Status changed from New to Verified
  • Priority changed from Normal to Urgent

#4 Updated by Matt Benjamin about 1 year ago

  • Assignee set to Marcus Watts

#6 Updated by Casey Bodley about 1 year ago

  • Status changed from Verified to Pending Backport
  • Priority changed from Urgent to High
  • Backport set to luminous

#7 Updated by Nathan Cutler about 1 year ago

  • Copied to Backport #22388: luminous: rgw: 501 is returned When init multipart is using V4 signature and chunk encoding added

#8 Updated by Nathan Cutler 9 months ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF