[ https://issues.apache.org/jira/browse/HDDS-892?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16712146#comment-16712146 ]
Bharat Viswanadham commented on HDDS-892: ----------------------------------------- Thank You [~elek] for the updated patch. +1 LGTM. I will commit this shortly. > Parse aws v2 headers without spaces in Ozone s3 gateway > -------------------------------------------------------- > > Key: HDDS-892 > URL: https://issues.apache.org/jira/browse/HDDS-892 > Project: Hadoop Distributed Data Store > Issue Type: Sub-task > Components: S3 > Reporter: Elek, Marton > Assignee: Elek, Marton > Priority: Major > Attachments: HDDS-892.001.patch, HDDS-892.002.patch > > > As of now s3g can't be used with s3cmd (which is seems to be an other popular > s3 cli) as it doesn't add any space to the authorization headers. > Example command: > ``` > s3cmd ls --no-ssl --host localhost:9878 --host-bucket > '%(bucket)s.localhost:9878' s3://b1qwe > ``` > Result: > {code} > ERROR: S3 error: 404 (AuthorizationHeaderMalformed): The authorization header > you provided is invalid. > {code} > With the debug option the header could be checked: > {code} > DEBUG: Processing request, please wait... > DEBUG: get_hostname(b1qwe): b1qwe.localhost:9878 > DEBUG: ConnMan.get(): creating new connection: http://b1qwe.localhost:9878 > DEBUG: non-proxied HTTPConnection(b1qwe.localhost, 9878) > DEBUG: format_uri(): /?delimiter=%2F > DEBUG: Sending request method_string='GET', uri='/?delimiter=%2F', > headers={'x-amz-date': '20181203T103324Z', 'Authorization': 'AWS4-HMAC-SHA256 > Credential=AKIAJGCRGUGIL3DUFDHA/20181203/US/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=762a2dbe21a01fdd1699fb71336ee06b53302f64cd099055ca54088a9ecfc787', > 'x-amz-content-sha256': > 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'}, body=(0 > bytes) > DEBUG: ConnMan.put(): connection put back to pool > (http://b1qwe.localhost:9878#1) > {code} > The problem here is that we have no spaces between the segments of the > authorization headers but we expect them in the AuthorizationHeaderV4 class. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org