Project

General

Profile

Bug #22129

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

Added by Jeegn Chen over 6 years ago. Updated almost 6 years ago.

Status:
Resolved
Priority:
High
Assignee:
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
luminous
Regression:
No
Severity:
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

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 over 6 years 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 over 6 years ago

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

#4 Updated by Matt Benjamin over 6 years ago

  • Assignee set to Marcus Watts

#6 Updated by Casey Bodley over 6 years ago

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

#7 Updated by Nathan Cutler over 6 years 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 almost 6 years ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF