Project

General

Profile

Bug #23149

Aws::S3::Errors::SignatureDoesNotMatch (rgw::auth::s3::LocalEngine denied with reason=-2027)

Added by Konstantin Shalygin about 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
% Done:

0%

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

Description

Example code from Ceph docs
Create bucket - OK.
Create empty object - OK.
Put data to object - signature mismatch.

This is ceph or gem problem? Same things with boto or s3cmd works fine.
Log with debug=20 - attached. Thanks.

Ruby:

ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-linux]

[k0ste@WorkStation s3_examples]$ gem list --local | grep s3
aws-sdk-s3 (1.8.2)
# encoding: utf-8

require 'aws-sdk'

Aws.config.update(endpoint: 'http://s3.e2e4.ru/',
                  access_key_id: 'JXUABTZZYHAFLCMF9VYV',
                  secret_access_key: 'jjP8RDD0R156atS6ACSy2vNdJLdEPM0TJQ5jD1pw',
                  force_path_style: true,
                  region: 'us-east-1')

s3 = Aws::S3::Client.new

# create s3 bucket

s3.create_bucket(bucket: "my_bucket")

# list s3 buckets
 print("My buckets:\nBUCKET\t\t\tCREATED\n")
 s3.list_buckets.buckets.each do |bucket|
   print("#{bucket.name}\t\t#{bucket.creation_date}\n")
 end

# create s3 object

print("\nTry put empty object\n")
s3.put_object(key: "s3_object1.txt", bucket: "my_bucket",
              content_type: "text/plain", body: "")

print("\nTry to create object with data\n")
# write some data to s3 object
s3.put_object(key: "s3_object2.txt", bucket: "my_bucket",
              body: "S3 are awesome", content_type: "text/plain")
[k0ste@WorkStation s3_examples]$ ruby s3_example.rb 
My buckets:
BUCKET            CREATED
my_bucket        2018-02-27 12:33:20 UTC

Try put empty object

Try to create object with data
Traceback (most recent call last):
    11: from s3_example.rb:31:in `<main>'
    10: from /home/k0ste/.gem/ruby/2.5.0/gems/aws-sdk-s3-1.8.2/lib/aws-sdk-s3/client.rb:5462:in `put_object'
     9: from /home/k0ste/.gem/ruby/2.5.0/gems/aws-sdk-core-3.17.0/lib/seahorse/client/request.rb:70:in `send_request'
     8: from /home/k0ste/.gem/ruby/2.5.0/gems/aws-sdk-core-3.17.0/lib/seahorse/client/plugins/response_target.rb:23:in `call'
     7: from /home/k0ste/.gem/ruby/2.5.0/gems/aws-sdk-core-3.17.0/lib/aws-sdk-core/plugins/response_paging.rb:10:in `call'
     6: from /home/k0ste/.gem/ruby/2.5.0/gems/aws-sdk-core-3.17.0/lib/aws-sdk-core/plugins/param_converter.rb:24:in `call'
     5: from /home/k0ste/.gem/ruby/2.5.0/gems/aws-sdk-core-3.17.0/lib/aws-sdk-core/plugins/idempotency_token.rb:17:in `call'
     4: from /home/k0ste/.gem/ruby/2.5.0/gems/aws-sdk-core-3.17.0/lib/aws-sdk-core/plugins/jsonvalue_converter.rb:20:in `call'
     3: from /home/k0ste/.gem/ruby/2.5.0/gems/aws-sdk-s3-1.8.2/lib/aws-sdk-s3/plugins/accelerate.rb:35:in `call'
     2: from /home/k0ste/.gem/ruby/2.5.0/gems/aws-sdk-s3-1.8.2/lib/aws-sdk-s3/plugins/dualstack.rb:26:in `call'
     1: from /home/k0ste/.gem/ruby/2.5.0/gems/aws-sdk-s3-1.8.2/lib/aws-sdk-s3/plugins/sse_cpk.rb:22:in `call'
/home/k0ste/.gem/ruby/2.5.0/gems/aws-sdk-core-3.17.0/lib/seahorse/client/plugins/raise_response_errors.rb:15:in `call': Aws::S3::Errors::SignatureDoesNotMatch

[k0ste@WorkStation s3_examples]$ s3cmd ls
2018-02-27 12:33  s3://my_bucket
[k0ste@WorkStation s3_examples]$ s3cmd ls s3://my_bucket
2018-02-27 12:33         0   s3://my_bucket/s3_object1.txt
[k0ste@WorkStation s3_examples]$ s3cmd info s3://my_bucket/s3_object1.txt
s3://my_bucket/s3_object1.txt (object):
   File size: 0
   Last mod:  Tue, 27 Feb 2018 12:33:20 GMT
   MIME type: text/plain
   Storage:   STANDARD
   MD5 sum:   d41d8cd98f00b204e9800998ecf8427e
   SSE:       none
   Policy:    none
   CORS:      none
   ACL:       Elliot Alderson: FULL_CONTROL

rgw_log - rgw log (43.5 KB) Konstantin Shalygin, 02/27/2018 12:52 PM

History

#1 Updated by Konstantin Shalygin about 6 years ago

Actually this is nginx-proxy issue. Will try to figure out what is problem...
Sorry for the noise.

#2 Updated by Konstantin Shalygin about 6 years ago

Was fixed by adding header for nginx-proxy. Nginx rejects '100' headers.

proxy_set_header Expect 100-continue;

#3 Updated by Casey Bodley about 6 years ago

  • Status changed from New to Closed

Also available in: Atom PDF