Skip to content
This repository has been archived by the owner on Mar 4, 2024. It is now read-only.

SignV2 Query-string authentication? #36

Open
nathany opened this issue Mar 10, 2015 · 3 comments
Open

SignV2 Query-string authentication? #36

nathany opened this issue Mar 10, 2015 · 3 comments

Comments

@nathany
Copy link
Contributor

nathany commented Mar 10, 2015

When uploading a file to S3 using PutReaderWithHeaders.

Query-string authentication requires the Signature, Expires and AWSAccessKeyId parameters

I'm curious why SignV2 chooses to use query-string authentication?

req.URL.RawQuery = queryVals.Encode()

vs. setting a header:

req.Header.Set("Authorization", "AWS "+ auth.AccessKey +":"+ string(signature))
@nathany nathany changed the title SignV2 Query-string authentication SignV2 Query-string authentication? Mar 10, 2015
@nathany
Copy link
Contributor Author

nathany commented Mar 10, 2015

Though this is probably not the reason why I'm getting this authentication error. Still digging.

@nathany
Copy link
Contributor Author

nathany commented Mar 25, 2015

Hm. I'm not really sure why SignV2 isn't working for me. 😦

This is using:

"gopkg.in/amz.v3/aws"
"gopkg.in/amz.v3/s3"

@nathany
Copy link
Contributor Author

nathany commented Apr 1, 2015

It could just be a bad error message. This issue may be to do with uploading files containing spaces.

The documentation says to use the "un-decoded" path, which I originally thought was decoded like URL.Path, but it looks like it actually means encoded, as with URL.RequestURI() with less the RawQuery part.

http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html

https://github.com/go-amz/amz/blob/v3/aws/sign.go#L54

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant