-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add content-sha256 header for presign when the signed_body_value is s…
…et to UNSIGNED-PAYLOAD (#248)
- Loading branch information
Showing
27 changed files
with
167 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
tests/aws-signing-test-suite/v4/post-unsigned-payload/context.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"credentials": { | ||
"access_key_id": "AKIDEXAMPLE", | ||
"secret_access_key": "wJalrXUtnFEMI/K7MDENG+bPxRfiCYEXAMPLEKEY" | ||
}, | ||
"expiration_in_seconds": 3600, | ||
"normalize": true, | ||
"region": "us-east-1", | ||
"service": "service", | ||
"sign_body": true, | ||
"signed_body_value": "UNSIGNED-PAYLOAD", | ||
"timestamp": "2015-08-30T12:36:00Z" | ||
} |
10 changes: 10 additions & 0 deletions
10
tests/aws-signing-test-suite/v4/post-unsigned-payload/header-canonical-request.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
POST | ||
/ | ||
|
||
content-length:13 | ||
host:example.amazonaws.com | ||
x-amz-content-sha256:UNSIGNED-PAYLOAD | ||
x-amz-date:20150830T123600Z | ||
|
||
content-length;host;x-amz-content-sha256;x-amz-date | ||
UNSIGNED-PAYLOAD |
1 change: 1 addition & 0 deletions
1
tests/aws-signing-test-suite/v4/post-unsigned-payload/header-signature.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
9fb60e8938d2178a7d63b49e055d1e65d8f6226f38846e8e0293bf43ce29050c |
8 changes: 8 additions & 0 deletions
8
tests/aws-signing-test-suite/v4/post-unsigned-payload/header-signed-request.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
POST / HTTP/1.1 | ||
Host:example.amazonaws.com | ||
Content-Length:13 | ||
X-Amz-Date:20150830T123600Z | ||
x-amz-content-sha256:UNSIGNED-PAYLOAD | ||
Authorization:AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=content-length;host;x-amz-content-sha256;x-amz-date, Signature=9fb60e8938d2178a7d63b49e055d1e65d8f6226f38846e8e0293bf43ce29050c | ||
|
||
Param1=value1 |
4 changes: 4 additions & 0 deletions
4
tests/aws-signing-test-suite/v4/post-unsigned-payload/header-string-to-sign.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
AWS4-HMAC-SHA256 | ||
20150830T123600Z | ||
20150830/us-east-1/service/aws4_request | ||
9dd145dbd195542d88539477304a02796be6488c02842b4fc1b907203adc8663 |
9 changes: 9 additions & 0 deletions
9
tests/aws-signing-test-suite/v4/post-unsigned-payload/query-canonical-request.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
POST | ||
/ | ||
X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIDEXAMPLE%2F20150830%2Fus-east-1%2Fservice%2Faws4_request&X-Amz-Date=20150830T123600Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=content-length%3Bhost%3Bx-amz-content-sha256 | ||
content-length:13 | ||
host:example.amazonaws.com | ||
x-amz-content-sha256:UNSIGNED-PAYLOAD | ||
|
||
content-length;host;x-amz-content-sha256 | ||
UNSIGNED-PAYLOAD |
1 change: 1 addition & 0 deletions
1
tests/aws-signing-test-suite/v4/post-unsigned-payload/query-signature.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
d5b951b200c7f96f239466b3e1978083ccd08678d4aea2b0bebaa6b2cf3d8c13 |
6 changes: 6 additions & 0 deletions
6
tests/aws-signing-test-suite/v4/post-unsigned-payload/query-signed-request.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
POST /?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIDEXAMPLE%2F20150830%2Fus-east-1%2Fservice%2Faws4_request&X-Amz-Date=20150830T123600Z&X-Amz-SignedHeaders=content-length%3Bhost%3Bx-amz-content-sha256&X-Amz-Expires=3600&X-Amz-Signature=d5b951b200c7f96f239466b3e1978083ccd08678d4aea2b0bebaa6b2cf3d8c13 HTTP/1.1 | ||
Host:example.amazonaws.com | ||
Content-Length:13 | ||
x-amz-content-sha256:UNSIGNED-PAYLOAD | ||
|
||
Param1=value1 |
4 changes: 4 additions & 0 deletions
4
tests/aws-signing-test-suite/v4/post-unsigned-payload/query-string-to-sign.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
AWS4-HMAC-SHA256 | ||
20150830T123600Z | ||
20150830/us-east-1/service/aws4_request | ||
24b3d8a2ee4f76884e0b2bedfaeb8f4feca93e09d9e53b7d13bc040efd106329 |
5 changes: 5 additions & 0 deletions
5
tests/aws-signing-test-suite/v4/post-unsigned-payload/request.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
POST / HTTP/1.1 | ||
Host:example.amazonaws.com | ||
Content-Length:13 | ||
|
||
Param1=value1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,4 @@ | |
"service": "service", | ||
"sign_body": false, | ||
"timestamp": "2015-08-30T12:36:00Z" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,4 @@ | |
"service": "service", | ||
"sign_body": true, | ||
"timestamp": "2015-08-30T12:36:00Z" | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
tests/aws-signing-test-suite/v4a/post-unsigned-payload/context.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"credentials": { | ||
"access_key_id": "AKIDEXAMPLE", | ||
"secret_access_key": "wJalrXUtnFEMI/K7MDENG+bPxRfiCYEXAMPLEKEY" | ||
}, | ||
"expiration_in_seconds": 3600, | ||
"normalize": true, | ||
"region": "us-east-1", | ||
"service": "service", | ||
"sign_body": true, | ||
"signed_body_value": "UNSIGNED-PAYLOAD", | ||
"timestamp": "2015-08-30T12:36:00Z" | ||
} |
11 changes: 11 additions & 0 deletions
11
tests/aws-signing-test-suite/v4a/post-unsigned-payload/header-canonical-request.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
POST | ||
/ | ||
|
||
content-length:13 | ||
host:example.amazonaws.com | ||
x-amz-content-sha256:UNSIGNED-PAYLOAD | ||
x-amz-date:20150830T123600Z | ||
x-amz-region-set:us-east-1 | ||
|
||
content-length;host;x-amz-content-sha256;x-amz-date;x-amz-region-set | ||
UNSIGNED-PAYLOAD |
1 change: 1 addition & 0 deletions
1
tests/aws-signing-test-suite/v4a/post-unsigned-payload/header-signature.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3046022100aa754cb9eca1113d88f54d83dc8635b6dd9b0f362e5e6c79c82da930521feb70022100c7f572b03542548c0c66eae6ff77202a175c923219fa413d7619d298618016c3 |
9 changes: 9 additions & 0 deletions
9
tests/aws-signing-test-suite/v4a/post-unsigned-payload/header-signed-request.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
POST / HTTP/1.1 | ||
Host:example.amazonaws.com | ||
Content-Length:13 | ||
X-Amz-Date:20150830T123600Z | ||
X-Amz-Region-Set:us-east-1 | ||
x-amz-content-sha256:UNSIGNED-PAYLOAD | ||
Authorization:AWS4-ECDSA-P256-SHA256 Credential=AKIDEXAMPLE/20150830/service/aws4_request, SignedHeaders=content-length;host;x-amz-content-sha256;x-amz-date;x-amz-region-set, Signature=3044022076c0a0e1ec8d3e40dd3d3f9c395c30e9ba7552096b4d8c34596646df2b665c6c0220615a2b2132265e969088895332db7f9b6c9daa957b42a9047d94e392f521d6fb | ||
|
||
Param1=value1 |
4 changes: 4 additions & 0 deletions
4
tests/aws-signing-test-suite/v4a/post-unsigned-payload/header-string-to-sign.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
AWS4-ECDSA-P256-SHA256 | ||
20150830T123600Z | ||
20150830/service/aws4_request | ||
1aa2f34080974173be96cdbddf2e5df2e48a425c6c3ab6cd770c254aaf4898df |
4 changes: 4 additions & 0 deletions
4
tests/aws-signing-test-suite/v4a/post-unsigned-payload/public-key.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"X":"b6618f6a65740a99e650b33b6b4b5bd0d43b176d721a3edfea7e7d2d56d936b1", | ||
"Y":"865ed22a7eadc9c5cb9d2cbaca1b3699139fedc5043dc6661864218330c8e518" | ||
} |
9 changes: 9 additions & 0 deletions
9
tests/aws-signing-test-suite/v4a/post-unsigned-payload/query-canonical-request.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
POST | ||
/ | ||
X-Amz-Algorithm=AWS4-ECDSA-P256-SHA256&X-Amz-Credential=AKIDEXAMPLE%2F20150830%2Fservice%2Faws4_request&X-Amz-Date=20150830T123600Z&X-Amz-Expires=3600&X-Amz-Region-Set=us-east-1&X-Amz-SignedHeaders=content-length%3Bhost%3Bx-amz-content-sha256 | ||
content-length:13 | ||
host:example.amazonaws.com | ||
x-amz-content-sha256:UNSIGNED-PAYLOAD | ||
|
||
content-length;host;x-amz-content-sha256 | ||
UNSIGNED-PAYLOAD |
1 change: 1 addition & 0 deletions
1
tests/aws-signing-test-suite/v4a/post-unsigned-payload/query-signature.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
304402203e661f9bc2dc93d9c858e08018d79ad36055eaae449d81321773df4df92d367202204064dfbaec5b2e2860d36b6d11d4eda90b18ff62c8ac14f90e288ef37bcfe15e |
6 changes: 6 additions & 0 deletions
6
tests/aws-signing-test-suite/v4a/post-unsigned-payload/query-signed-request.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
POST /?X-Amz-Algorithm=AWS4-ECDSA-P256-SHA256&X-Amz-Credential=AKIDEXAMPLE%2F20150830%2Fservice%2Faws4_request&X-Amz-Date=20150830T123600Z&X-Amz-SignedHeaders=content-length%3Bhost%3Bx-amz-content-sha256&X-Amz-Expires=3600&X-Amz-Region-Set=us-east-1&X-Amz-Signature=3045022100b32d20d894fb447713b4ba31a7983b04a7c7551b597dbd0b5478af0cc98ee33802201b4d03ad196f18baa962102b166eec484819c34be71a56e10b494146ebe043cc HTTP/1.1 | ||
Host:example.amazonaws.com | ||
Content-Length:13 | ||
x-amz-content-sha256:UNSIGNED-PAYLOAD | ||
|
||
Param1=value1 |
4 changes: 4 additions & 0 deletions
4
tests/aws-signing-test-suite/v4a/post-unsigned-payload/query-string-to-sign.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
AWS4-ECDSA-P256-SHA256 | ||
20150830T123600Z | ||
20150830/service/aws4_request | ||
41fc1ad3ae67d78001e68d2e0e3149bd0f6f45f44ae68b3e615c2ee4183aa2d1 |
5 changes: 5 additions & 0 deletions
5
tests/aws-signing-test-suite/v4a/post-unsigned-payload/request.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
POST / HTTP/1.1 | ||
Host:example.amazonaws.com | ||
Content-Length:13 | ||
|
||
Param1=value1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters