扫二维码与项目经理沟通
我们在微信上24小时期待你的声音
解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流
本篇内容介绍了“s3cmd连接rgw的signature版本问题怎么解决”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!
创新互联是一家集网站建设,解放企业网站建设,解放品牌网站建设,网站定制,解放网站建设报价,网络营销,网络优化,解放网站推广为一体的创新建站企业,帮助传统企业提升企业形象加强企业竞争力。可充分满足这一群体相比中小企业更为丰富、高端、多元的互联网需求。同时我们时刻保持专业、时尚、前沿,时刻以成就客户成长自我,坚持不断学习、思考、沉淀、净化自己,让我们为更多的企业打造出实用型网站。
####signature v4回退至v2 使用s3cmd 1.6.1版本连接rgw(ceph 0.94.5)发现如下问题
DEBUG: CreateRequest: resource[uri]=/ DEBUG: Using signature v4 DEBUG: get_hostname(s3soft): s3soft.s3.xxx.com DEBUG: canonical_headers = host:s3soft.s3.xxx.com x-amz-content-sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 x-amz-date:20160429T123546Z DEBUG: Canonical Request: GET / delimiter=%2F host:s3soft.s3.xxx.com x-amz-content-sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 x-amz-date:20160429T123546Z host;x-amz-content-sha256;x-amz-date e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 DEBUG: signature-v4 headers: {'x-amz-content-sha256': 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', 'Authorization': 'AWS4-HMAC-SHA256 Credential=KFIH2I8PDAU38KABCDEFG/20160429/US/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=e94cbf3893183ccf53b6f4b38a2136252c83c6fd022f9cab1f4ccbc29f78cd30', 'x-amz-date': '20160429T123546Z'} DEBUG: Processing request, please wait... DEBUG: get_hostname(s3soft): s3soft.s3.xxx.com DEBUG: ConnMan.get(): creating new connection: http://s3soft.s3.xxx.com DEBUG: non-proxied HTTPConnection(s3soft.s3.xxx.com) DEBUG: format_uri(): /?delimiter=/ DEBUG: Sending request method_string='GET', uri='/?delimiter=/', headers={'x-amz-content-sha256': 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', 'Authorization': 'AWS4-HMAC-SHA256 Credential=KFIH2I8PDAU38KABCDEFG/20160429/US/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=e94cbf3893183ccf53b6f4b38a2136252c83c6fd022f9cab1f4ccbc29f78cd30', 'x-amz-date': '20160429T123546Z'}, body=(0 bytes) DEBUG: Response: {'status': 400, 'headers': {'content-length': '81', 'accept-ranges': 'bytes', 'server': 'openresty', 'connection': 'keep-alive', 'x-amz-request-id': 'tx00000000000000017a1e9-0057235523-d753-hxs1', 'date': 'Fri, 29 Apr 2016 12:35:47 GMT', 'content-type': 'application/xml'}, 'reason': 'Bad Request', 'data': ''} DEBUG: ConnMan.put(): connection put back to pool (http://s3soft.s3.xxx.com#1) DEBUG: Falling back to signature v2 DEBUG: Using signature v2 DEBUG: SignHeaders: 'GET\n\n\n\nx-amz-content-sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\nx-amz-date:Fri, 29 Apr 2016 12:35:47 +0000\n/s3soft/' DEBUG: Processing request, please wait... DEBUG: get_hostname(s3soft): s3soft.s3.xxx.com DEBUG: ConnMan.get(): re-using connection: http://s3soft.s3.xxx.com#1 DEBUG: format_uri(): /?delimiter=/ DEBUG: Sending request method_string='GET', uri='/?delimiter=/', headers={'x-amz-content-sha256': 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', 'Authorization': 'AWS KFIH2I8PDAU38KABCDEFG:jhRC5YXvJL5suBcVb4dE2rsGDfg=', 'x-amz-date': 'Fri, 29 Apr 2016 12:35:47 +0000'}, body=(0 bytes) DEBUG: Response: {'status': 200, 'headers': {'transfer-encoding': 'chunked', 'server': 'openresty', 'connection': 'keep-alive', 'x-amz-request-id': 'tx00000000000000017a858-0057235523-d750-hxs1', 'date': 'Fri, 29 Apr 2016 12:35:47 GMT', 'content-type': 'application/xml'}, 'reason': 'OK', 'data': InvalidArgument
###原因分析 目前只有10.2.0版本才支持v4版本的signature,因此需要关闭signature v4的认证,默认使用signature v2。减少客户端非法请求次数,也是优化手段之一。
###解决方法 vi ~/.s3cfg 设置如下即可
signature_v2 = True
“s3cmd连接rgw的signature版本问题怎么解决”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注创新互联网站,小编将为大家输出更多高质量的实用文章!
我们在微信上24小时期待你的声音
解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流