-
Notifications
You must be signed in to change notification settings - Fork 5
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
Support AWS Signature Version 4 (Refactored) #2
Conversation
find_all/0, checksum/0 | ||
]). | ||
|
||
|
||
-record(sign_v4_params, {credential :: binary(), | ||
signature :: binary(), | ||
signed_headers :: binary() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/binary()/list()/
and basically you need to dialyze for type checking before PL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
? These parameters look binaries to me.
BTW, I will check how to use dialyzer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
? These parameters look binaries to me.
yep.
you are right.
BTW, I will check how to use dialyzer
At first,
issue the below command only once in the repo root. ( basically when you cloned into local )
make build_plt
issue the below command if you want to dialyze. ( basically when you finished to implement before UT )
make dialyzer
@windkit LGTM. I'm waiting for UT and PR to leo_hex. |
Sorry that I forgot to create the PR |
I am now writing the unit test, will work on |
I have fixed the unit test for V2 Unit Test for V4 Signing is added |
LGTM. As you know that @yosukehara asked you benchmarking to compare the performance of v2 and v4,
|
@@ -24,7 +24,7 @@ | |||
|
|||
{deps, [ | |||
{cowlib, ".*", {git, "https://github.com/extend/cowlib.git", {tag, "1.0.0"}}}, | |||
{leo_commons, ".*", {git, "https://github.com/leo-project/leo_commons.git", {tag, "1.1.2"}}}, | |||
{leo_commons, ".*", {git, "https://github.com/windkit/leo_commons.git", {branch, "develop"}}}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding leo_commons
, I've merged your request. You could modify the row of leo_commons in the deps as below:
{leo_commons, ".*", {git, "https://github.com/leo-project/leo_commons.git", {branch, "develop"}}},
I've merged your request into the 1.4-branch. Again, thanks. |
Brief Description
The flow is similar to Version 2 with two major differences
Related Pull Requests
Work in Progress
Using Authorization Header
Checksum Precomputed
http://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-header-based-auth.html
x-amz-content-sha256
Amazon Chunked Upload
http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-streaming.html
Using Query Parameters
http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html
Using HTTP Post
http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-authentication-HTTPPOST.html