[
https://issues.apache.org/jira/browse/HADOOP-3733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15327754#comment-15327754
]
Ravi Prakash commented on HADOOP-3733:
--------------------------------------
Hi Steve! I seem to still be observing the issue. How are you running your
command?
e.g. for me on trunk
{code} hadoop fs -ls
s3a://<aws_access_key:<aws_secret_key>:@mybucket/mydirectory {code}
shows me the contents of {{mydirectory}} when {{aws_secret_key}} doesn't
contain a {{/}} or {{%2F}} . When the secret key contains the {{/}}, even
encoding it to {{%2F}} I get this:
{code}
ls:
s3a://<aws_access_key:<aws_secret_key_with_encoded_slash>@mybucket/mydirectory:
getFileStatus on
s3a://<aws_access_key:<aws_secret_key_with_encoded_slash>@mybucket/mydirectory:
com.amazonaws.services.s3.model.AmazonS3Exception: Forbidden (Service: Amazon
S3; Status Code: 403; Error Code: 403 Forbidden; Request ID: <someAmazonID>),
S3 Extended Request ID: <anotherAmazonID>
{code}
Here's my hadoop version
{code}
Hadoop 3.0.0-alpha1-SNAPSHOT
Source code repository https://git-wip-us.apache.org/repos/asf/hadoop.git -r
28b66ae919e348123f4c05a4787c9ec56c087c25
Compiled by raviprak on 2016-06-13T16:36Z
Compiled with protoc 2.5.0
>From source with checksum 7dcbe718e8724ad01f916f2eaf705b14
This command was run using
/home/raviprak/Code/hadoop/trunk/hadoop-dist/target/hadoop-3.0.0-alpha1-SNAPSHOT/share/hadoop/common/hadoop-common-3.0.0-alpha1-SNAPSHOT.jar
{code}
> "s3:" URLs break when Secret Key contains a slash, even if encoded
> ------------------------------------------------------------------
>
> Key: HADOOP-3733
> URL: https://issues.apache.org/jira/browse/HADOOP-3733
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs/s3
> Affects Versions: 0.17.1, 2.0.2-alpha
> Reporter: Stuart Sierra
> Priority: Minor
> Attachments: HADOOP-3733-20130223T011025Z.patch, HADOOP-3733.patch,
> hadoop-3733.patch
>
>
> When using URLs of the form s3://ID:SECRET@BUCKET/ at the command line,
> distcp fails if the SECRET contains a slash, even when the slash is
> URL-encoded as %2F.
> Say your AWS Access Key ID is RYWX12N9WCY42XVOL8WH
> And your AWS Secret Key is Xqj1/NMvKBhl1jqKlzbYJS66ua0e8z7Kkvptl9bv
> And your bucket is called "mybucket"
> You can URL-encode the Secret KKey as
> Xqj1%2FNMvKBhl1jqKlzbYJS66ua0e8z7Kkvptl9bv
> But this doesn't work:
> {noformat}
> $ bin/hadoop distcp file:///source
> s3://RYWX12N9WCY42XVOL8WH:Xqj1%2FNMvKBhl1jqKlzbYJS66ua0e8z7Kkvptl9bv@mybucket/dest
> 08/07/09 15:05:22 INFO util.CopyFiles: srcPaths=[file:///source]
> 08/07/09 15:05:22 INFO util.CopyFiles:
> destPath=s3://RYWX12N9WCY42XVOL8WH:Xqj1%2FNMvKBhl1jqKlzbYJS66ua0e8z7Kkvptl9bv@mybucket/dest
> 08/07/09 15:05:23 WARN httpclient.RestS3Service: Unable to access bucket:
> mybucket
> org.jets3t.service.S3ServiceException: S3 HEAD request failed.
> ResponseCode=403, ResponseMessage=Forbidden
> at
> org.jets3t.service.impl.rest.httpclient.RestS3Service.performRequest(RestS3Service.java:339)
> ...
> With failures, global counters are inaccurate; consider running with -i
> Copy failed: org.apache.hadoop.fs.s3.S3Exception:
> org.jets3t.service.S3ServiceException: S3 PUT failed. XML Error Message:
> <?xml version="1.0"
> encoding="UTF-8"?><Error><Code>SignatureDoesNotMatch</Code><Message>The
> request signature we calculated does not match the signature you provided.
> Check your key and signing method.</Message>
> at
> org.apache.hadoop.fs.s3.Jets3tFileSystemStore.createBucket(Jets3tFileSystemStore.java:141)
> ...
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]