- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 910
s3cmd 2.0.2 signature_v2=False NOT WORK #1017
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I want to use signature V4, how to configure it ?? thanks ! |
Hi, Then, regarding the signature, the "region" is needed for signature v4, and so, when you don't set a specific location (ie US is generic), we still have to do a signature v2 request to try to get the region of your bucket for using signature v4 then. You should try to set "bucket_location" to the right location for your server. |
thanks for your reply, but there are still some problem, i list different bucket ,one can be list while the other is not. example 1 : s3cmd ls s3://ceph_c27_bucket1/world/ -d
I have check the ceph rgw log, the signaturion is the same
example 2: s3cmd ls s3://tenant_test_1:test-20181008 -d
and rgw log below
the client and server signature is different, which is wrong ? the server or the client ? |
it seems is not about the signature version |
Hum a few things are not right. If looks weird to me to have ":" in the bucket name because it is clearly an invalid bucket name as not a valid "domain name" like string. My best guess is that maybe it could work as "in-path" bucket name. |
thank you very much, may be ceph rgw need a “tenant“ parameter in HTTP request,i try to find another way. |
So to be clear there is no way to configure a ~/.s3cfg to make AWS doesn't _require_V2 signatures here, right? FWIW |
@dovefi have you come up with a workaround? we are using Ceph RGW and are able to list the implicit tenants buckets/objects, but for buckets/objects, in a different tenant namespace, that we should have READ access to we are unable to (ie. s3cmd ls s3://other_tenant:bucket/object fails with ERROR: S3 error: 403 (SignatureDoesNotMatch) ). we are able to use boto and boto3 to write some python scripts but we are also looking to use the s3cmd tools |
Hi,
Good news, I have a fix for the 3 things. The fix for 3) is the only one that might have a side effect on some random s3 compatible server: |
Fixed in MASTER. |
hi, i use s3cmd 2.0.2 to operate ceph rgw bucket, when i list a bucket , i got an error S3 error: 403 (SignatureDoesNotMatch)
DEBUG: s3cmd version 2.0.2
DEBUG: ConfigParser: Reading file '/root/.s3cfg'
DEBUG: ConfigParser: access_key->LM...17_chars...R
DEBUG: ConfigParser: access_token->
DEBUG: ConfigParser: add_encoding_exts->
DEBUG: ConfigParser: add_headers->
DEBUG: ConfigParser: bucket_location->US
DEBUG: ConfigParser: ca_certs_file->
DEBUG: ConfigParser: cache_file->
DEBUG: ConfigParser: check_ssl_certificate->True
DEBUG: ConfigParser: check_ssl_hostname->True
DEBUG: ConfigParser: cloudfront_host->cloudfront.amazonaws.com
DEBUG: ConfigParser: content_disposition->
DEBUG: ConfigParser: content_type->
DEBUG: ConfigParser: default_mime_type->binary/octet-stream
DEBUG: ConfigParser: delay_updates->False
DEBUG: ConfigParser: delete_after->False
DEBUG: ConfigParser: delete_after_fetch->False
DEBUG: ConfigParser: delete_removed->False
DEBUG: ConfigParser: dry_run->False
DEBUG: ConfigParser: enable_multipart->True
DEBUG: ConfigParser: encrypt->False
DEBUG: ConfigParser: expiry_date->
DEBUG: ConfigParser: expiry_days->
DEBUG: ConfigParser: expiry_prefix->
DEBUG: ConfigParser: follow_symlinks->False
DEBUG: ConfigParser: force->False
DEBUG: ConfigParser: get_continue->False
DEBUG: ConfigParser: gpg_command->/bin/gpg
DEBUG: ConfigParser: gpg_decrypt->%(gpg_command)s -d --verbose --no-use-agent --batch --yes --passphrase-fd %(passphrase_fd)s -o %(output_file)s %(input_file)s
DEBUG: ConfigParser: gpg_encrypt->%(gpg_command)s -c --verbose --no-use-agent --batch --yes --passphrase-fd %(passphrase_fd)s -o %(output_file)s %(input_file)s
DEBUG: ConfigParser: gpg_passphrase->...-3_chars...
DEBUG: ConfigParser: guess_mime_type->True
DEBUG: ConfigParser: host_base->127.0.0.1:7480
DEBUG: ConfigParser: host_bucket->%(bucket)s.s3.amazonaws.com
DEBUG: ConfigParser: human_readable_sizes->False
DEBUG: ConfigParser: invalidate_default_index_on_cf->False
DEBUG: ConfigParser: invalidate_default_index_root_on_cf->True
DEBUG: ConfigParser: invalidate_on_cf->False
DEBUG: ConfigParser: kms_key->
DEBUG: ConfigParser: limit->-1
DEBUG: ConfigParser: limitrate->0
DEBUG: ConfigParser: list_md5->False
DEBUG: ConfigParser: log_target_prefix->
DEBUG: ConfigParser: long_listing->False
DEBUG: ConfigParser: max_delete->-1
DEBUG: ConfigParser: mime_type->
DEBUG: ConfigParser: multipart_chunk_size_mb->15
DEBUG: ConfigParser: multipart_max_chunks->10000
DEBUG: ConfigParser: preserve_attrs->True
DEBUG: ConfigParser: progress_meter->True
DEBUG: ConfigParser: proxy_host->
DEBUG: ConfigParser: proxy_port->0
DEBUG: ConfigParser: put_continue->False
DEBUG: ConfigParser: recursive->False
DEBUG: ConfigParser: recv_chunk->65536
DEBUG: ConfigParser: reduced_redundancy->False
DEBUG: ConfigParser: requester_pays->False
DEBUG: ConfigParser: restore_days->1
DEBUG: ConfigParser: restore_priority->Standard
DEBUG: ConfigParser: secret_key->Am...37_chars...k
DEBUG: ConfigParser: send_chunk->65536
DEBUG: ConfigParser: server_side_encryption->False
DEBUG: ConfigParser: signature_v2->False
DEBUG: ConfigParser: signurl_use_https->False
DEBUG: ConfigParser: simpledb_host->sdb.amazonaws.com
DEBUG: ConfigParser: skip_existing->False
DEBUG: ConfigParser: socket_timeout->300
DEBUG: ConfigParser: stats->False
DEBUG: ConfigParser: stop_on_error->False
DEBUG: ConfigParser: storage_class->
DEBUG: ConfigParser: throttle_max->100
DEBUG: ConfigParser: upload_id->
DEBUG: ConfigParser: urlencoding_mode->normal
DEBUG: ConfigParser: use_http_expect->False
DEBUG: ConfigParser: use_https->False
DEBUG: ConfigParser: use_mime_magic->True
DEBUG: ConfigParser: verbosity->WARNING
DEBUG: ConfigParser: website_endpoint->http://%(bucket)s.s3-website-%(location)s.amazonaws.com/
DEBUG: ConfigParser: website_error->
DEBUG: ConfigParser: website_index->index.html
DEBUG: Updating Config.Config cache_file ->
DEBUG: Updating Config.Config follow_symlinks -> False
DEBUG: Updating Config.Config verbosity -> 10
DEBUG: Unicodising 'ls' using UTF-8
DEBUG: Unicodising 's3://tenant_test_1:test-20181008' using UTF-8
DEBUG: Command: ls
DEBUG: Bucket 's3://tenant_test_1:test-20181008':
DEBUG: CreateRequest: resource[uri]=/
DEBUG: Using signature v2
DEBUG: SignHeaders: u'GET\n\n\n\nx-amz-date:Fri, 23 Nov 2018 10:01:05 +0000\n/tenant_test_1%3Atest-20181008/'
DEBUG: Processing request, please wait...
DEBUG: get_hostname(tenant_test_1:test-20181008): 127.0.0.1:7480
DEBUG: ConnMan.get(): creating new connection: http://127.0.0.1:7480
DEBUG: non-proxied HTTPConnection(127.0.0.1, 7480)
DEBUG: format_uri(): /tenant_test_1:test-20181008/?delimiter=%2F
DEBUG: Sending request method_string='GET', uri=u'/tenant_test_1:test-20181008/?delimiter=%2F', headers={'Authorization': u'AWS LMYKYEL95584F6ARSZ2R:aFJdIlMU2TT0uQF7Kv8pEARJTLM=', 'x-amz-date': 'Fri, 23 Nov 2018 10:01:05 +0000'}, body=(0 bytes)
DEBUG: ConnMan.put(): connection put back to pool (http://127.0.0.1:7480#1)
DEBUG: Response:
{'data': '
SignatureDoesNotMatch
tx000000000000001fd3dbe-005bf7cfe1-119d18-tupu-zone1119d18-tupu-zone1-tupu-zonegroup','headers': {'accept-ranges': 'bytes',
'content-length': '211',
'content-type': 'application/xml',
'date': 'Fri, 23 Nov 2018 10:01:05 GMT',
'x-amz-request-id': 'tx000000000000001fd3dbe-005bf7cfe1-119d18-tupu-zone1'},
'reason': 'Forbidden',
'status': 403}
DEBUG: S3Error: 403 (Forbidden)
DEBUG: HttpHeader: date: Fri, 23 Nov 2018 10:01:05 GMT
DEBUG: HttpHeader: content-length: 211
DEBUG: HttpHeader: x-amz-request-id: tx000000000000001fd3dbe-005bf7cfe1-119d18-tupu-zone1
DEBUG: HttpHeader: content-type: application/xml
DEBUG: HttpHeader: accept-ranges: bytes
DEBUG: ErrorXML: Code: 'SignatureDoesNotMatch'
DEBUG: ErrorXML: RequestId: 'tx000000000000001fd3dbe-005bf7cfe1-119d18-tupu-zone1'
DEBUG: ErrorXML: HostId: '119d18-tupu-zone1-tupu-zonegroup'
ERROR: S3 error: 403 (SignatureDoesNotMatch)
i note that "DEBUG: ConfigParser: signature_v2->False", but it still use "DEBUG: Using signature v2", why ???? is this a bug???
The text was updated successfully, but these errors were encountered: