├── .gitignore
├── .npmignore
├── .travis.yml
├── Gulpfile.js
├── LICENSE
├── README.md
├── aws-sign-web.js
├── index.d.ts
├── package.json
└── test
├── aws-sig-v4-test-suite-test.js
└── aws-sig-v4-test-suite
├── LICENSE
├── NOTICE
└── aws-sig-v4-test-suite
├── get-header-key-duplicate
├── get-header-key-duplicate.authz
├── get-header-key-duplicate.creq
├── get-header-key-duplicate.req
├── get-header-key-duplicate.sreq
└── get-header-key-duplicate.sts
├── get-header-value-multiline
├── get-header-value-multiline.authz
├── get-header-value-multiline.creq
├── get-header-value-multiline.req
├── get-header-value-multiline.sreq
└── get-header-value-multiline.sts
├── get-header-value-order
├── get-header-value-order.authz
├── get-header-value-order.creq
├── get-header-value-order.req
├── get-header-value-order.sreq
└── get-header-value-order.sts
├── get-header-value-trim
├── get-header-value-trim.authz
├── get-header-value-trim.creq
├── get-header-value-trim.req
├── get-header-value-trim.sreq
└── get-header-value-trim.sts
├── get-unreserved
├── get-unreserved.authz
├── get-unreserved.creq
├── get-unreserved.req
├── get-unreserved.sreq
└── get-unreserved.sts
├── get-utf8
├── get-utf8.authz
├── get-utf8.creq
├── get-utf8.req
├── get-utf8.sreq
└── get-utf8.sts
├── get-vanilla-empty-query-key
├── get-vanilla-empty-query-key.authz
├── get-vanilla-empty-query-key.creq
├── get-vanilla-empty-query-key.req
├── get-vanilla-empty-query-key.sreq
└── get-vanilla-empty-query-key.sts
├── get-vanilla-query-order-key-case
├── get-vanilla-query-order-key-case.authz
├── get-vanilla-query-order-key-case.creq
├── get-vanilla-query-order-key-case.req
├── get-vanilla-query-order-key-case.sreq
└── get-vanilla-query-order-key-case.sts
├── get-vanilla-query-order-key
├── get-vanilla-query-order-key.authz
├── get-vanilla-query-order-key.creq
├── get-vanilla-query-order-key.req
├── get-vanilla-query-order-key.sreq
└── get-vanilla-query-order-key.sts
├── get-vanilla-query-order-value
├── get-vanilla-query-order-value.authz
├── get-vanilla-query-order-value.creq
├── get-vanilla-query-order-value.req
├── get-vanilla-query-order-value.sreq
└── get-vanilla-query-order-value.sts
├── get-vanilla-query-unreserved
├── get-vanilla-query-unreserved.authz
├── get-vanilla-query-unreserved.creq
├── get-vanilla-query-unreserved.req
├── get-vanilla-query-unreserved.sreq
└── get-vanilla-query-unreserved.sts
├── get-vanilla-query-uri-config
├── get-vanilla-query-uri-config.authz
├── get-vanilla-query-uri-config.params
└── get-vanilla-query-uri-config.req
├── get-vanilla-query
├── get-vanilla-query.authz
├── get-vanilla-query.creq
├── get-vanilla-query.req
├── get-vanilla-query.sreq
└── get-vanilla-query.sts
├── get-vanilla-utf8-query
├── get-vanilla-utf8-query.authz
├── get-vanilla-utf8-query.creq
├── get-vanilla-utf8-query.req
├── get-vanilla-utf8-query.sreq
└── get-vanilla-utf8-query.sts
├── get-vanilla
├── get-vanilla.authz
├── get-vanilla.creq
├── get-vanilla.req
├── get-vanilla.sreq
└── get-vanilla.sts
├── normalize-path
├── get-relative-relative
│ ├── get-relative-relative.authz
│ ├── get-relative-relative.creq
│ ├── get-relative-relative.req
│ ├── get-relative-relative.sreq
│ └── get-relative-relative.sts
├── get-relative
│ ├── get-relative.authz
│ ├── get-relative.creq
│ ├── get-relative.req
│ ├── get-relative.sreq
│ └── get-relative.sts
├── get-slash-dot-slash
│ ├── get-slash-dot-slash.authz
│ ├── get-slash-dot-slash.creq
│ ├── get-slash-dot-slash.req
│ ├── get-slash-dot-slash.sreq
│ └── get-slash-dot-slash.sts
├── get-slash-pointless-dot
│ ├── get-slash-pointless-dot.authz
│ ├── get-slash-pointless-dot.creq
│ ├── get-slash-pointless-dot.req
│ ├── get-slash-pointless-dot.sreq
│ └── get-slash-pointless-dot.sts
├── get-slash
│ ├── get-slash.authz
│ ├── get-slash.creq
│ ├── get-slash.req
│ ├── get-slash.sreq
│ └── get-slash.sts
├── get-slashes
│ ├── get-slashes.authz
│ ├── get-slashes.creq
│ ├── get-slashes.req
│ ├── get-slashes.sreq
│ └── get-slashes.sts
├── get-space
│ ├── get-space.authz
│ ├── get-space.creq
│ ├── get-space.req
│ ├── get-space.sreq
│ └── get-space.sts
└── normalize-path.txt
├── post-header-key-case
├── post-header-key-case.authz
├── post-header-key-case.creq
├── post-header-key-case.req
├── post-header-key-case.sreq
└── post-header-key-case.sts
├── post-header-key-sort
├── post-header-key-sort.authz
├── post-header-key-sort.creq
├── post-header-key-sort.req
├── post-header-key-sort.sreq
└── post-header-key-sort.sts
├── post-header-value-case
├── post-header-value-case.authz
├── post-header-value-case.creq
├── post-header-value-case.req
├── post-header-value-case.sreq
└── post-header-value-case.sts
├── post-sts-token
├── post-sts-header-after
│ ├── post-sts-header-after.authz
│ ├── post-sts-header-after.creq
│ ├── post-sts-header-after.req
│ ├── post-sts-header-after.sreq
│ └── post-sts-header-after.sts
├── post-sts-header-before
│ ├── post-sts-header-before.authz
│ ├── post-sts-header-before.creq
│ ├── post-sts-header-before.req
│ ├── post-sts-header-before.sreq
│ └── post-sts-header-before.sts
└── readme.txt
├── post-vanilla-empty-query-value
├── post-vanilla-empty-query-value.authz
├── post-vanilla-empty-query-value.creq
├── post-vanilla-empty-query-value.req
├── post-vanilla-empty-query-value.sreq
└── post-vanilla-empty-query-value.sts
├── post-vanilla-query
├── post-vanilla-query.authz
├── post-vanilla-query.creq
├── post-vanilla-query.req
├── post-vanilla-query.sreq
└── post-vanilla-query.sts
├── post-vanilla
├── post-vanilla.authz
├── post-vanilla.creq
├── post-vanilla.req
├── post-vanilla.sreq
└── post-vanilla.sts
├── post-x-www-form-urlencoded-parameters
├── post-x-www-form-urlencoded-parameters.authz
├── post-x-www-form-urlencoded-parameters.creq
├── post-x-www-form-urlencoded-parameters.req
├── post-x-www-form-urlencoded-parameters.sreq
└── post-x-www-form-urlencoded-parameters.sts
└── post-x-www-form-urlencoded
├── post-x-www-form-urlencoded.authz
├── post-x-www-form-urlencoded.creq
├── post-x-www-form-urlencoded.req
├── post-x-www-form-urlencoded.sreq
└── post-x-www-form-urlencoded.sts
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | bower_components/
3 | .idea/
4 | .vscode/
5 |
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | test/
2 | .travis.yml
3 | Gulpfile.js
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - "8"
4 | sudo: false
5 |
6 |
--------------------------------------------------------------------------------
/Gulpfile.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const gulp = require('gulp');
4 | const plugins = require('gulp-load-plugins')();
5 |
6 | var moduleName = 'aws-sign-web';
7 |
8 | // Build the minified version
9 | function uglify() {
10 | return gulp.src('./' + moduleName + '.js')
11 | .pipe(plugins.uglify({output: {comments: /Copyright/}}))
12 | .pipe(plugins.rename(moduleName + '.min.js'))
13 | .pipe(gulp.dest('.'));
14 | }
15 |
16 | exports.uglify = uglify;
17 | exports.default = exports.uglify;
18 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016-2017 Daniel Joos
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # aws-sign-web [](https://badge.fury.io/js/aws-sign-web) [](https://travis-ci.org/danieljoos/aws-sign-web)
2 | Plain JavaScript AWS Signature v4 for use within Web Browsers
3 |
4 | ## Example
5 |
6 | ```html
7 |
8 |
9 |
10 |
11 |
49 | ```
50 |
--------------------------------------------------------------------------------
/aws-sign-web.js:
--------------------------------------------------------------------------------
1 | /**
2 | * AWS Signature v4 Implementation for Web Browsers
3 | *
4 | * Copyright (c) 2016-2018 Daniel Joos
5 | *
6 | * Distributed under MIT license. (See file LICENSE)
7 | */
8 |
9 | ;(function (root, factory) {
10 | if (typeof define === 'function' && define.amd) {
11 | /* global define */
12 | define(['crypto-js/core', 'crypto-js/sha256', 'crypto-js/hmac-sha256'], factory);
13 | } else if (typeof module === 'object' && module.exports) {
14 | module.exports = factory(require('crypto-js/core'),
15 | require('crypto-js/sha256'),
16 | require('crypto-js/hmac-sha256'));
17 | } else {
18 | /* global CryptoJS */
19 | root.awsSignWeb = factory(CryptoJS, CryptoJS.SHA256, CryptoJS.HmacSHA256);
20 | }
21 | }(this, function (CryptoJS) {
22 | 'use strict';
23 |
24 | var defaultConfig = {
25 | region: 'eu-west-1',
26 | service: 'execute-api',
27 | defaultContentType: 'application/json',
28 | defaultAcceptType: 'application/json',
29 | payloadSerializerFactory: JsonPayloadSerializer,
30 | uriParserFactory: SimpleUriParser,
31 | hasherFactory: CryptoJSHasher
32 | };
33 |
34 | /**
35 | * Create a new signer object with the given configuration.
36 | * Configuration must specify the AWS credentials used for the signing operation.
37 | * It must contain the following properties:
38 | * `accessKeyId`: The AWS IAM access key ID.
39 | * `secretAccessKey`: The AWS IAM secret key.
40 | * `sessionToken`: Optional session token, required for temporary credentials.
41 | * @param {object} config The configuration object.
42 | * @constructor
43 | */
44 | var AwsSigner = function (config) {
45 | this.config = extend({}, defaultConfig, config);
46 | this.payloadSerializer = this.config.payloadSerializer ||
47 | this.config.payloadSerializerFactory();
48 | this.uriParser = this.config.uriParserFactory();
49 | this.hasher = this.config.hasherFactory();
50 | assertRequired(this.config.accessKeyId, 'AwsSigner requires AWS AccessKeyID');
51 | assertRequired(this.config.secretAccessKey, 'AwsSigner requires AWS SecretAccessKey');
52 | };
53 |
54 | /**
55 | * Create signature headers for the given request.
56 | * Request must be in the format, known from the `$http` service of Angular:
57 | * ```
58 | * request = {
59 | * headers: { ... },
60 | * method: 'GET',
61 | * url: 'http://...',
62 | * params: { ... },
63 | * data: ... // alternative: body
64 | * };
65 | * ```
66 | * The resulting object contains the signature headers. For example, it can be merged into an
67 | * existing `$http` config when dealing with Angular JS.
68 | * @param {object} request The request to create the signature for. Will not be modified!
69 | * @param {Date=} signDate Optional signature date to use. Current date-time is used if not specified.
70 | * @returns Signed request headers.
71 | */
72 | AwsSigner.prototype.sign = function (request, signDate) {
73 | var workingSet = {
74 | request: extend({}, request),
75 | signDate: signDate || new Date(),
76 | uri: this.uriParser(request.url)
77 | };
78 | prepare(this, workingSet);
79 | buildCanonicalRequest(this, workingSet); // Step1: build the canonical request
80 | buildStringToSign(this, workingSet); // Step2: build the string to sign
81 | calculateSignature(this, workingSet); // Step3: calculate the signature hash
82 | buildSignatureHeader(this, workingSet); // Step4: build the authorization header
83 | return {
84 | 'Accept': workingSet.request.headers['accept'],
85 | 'Authorization': workingSet.authorization,
86 | 'Content-Type': workingSet.request.headers['content-type'],
87 | 'x-amz-date': workingSet.request.headers['x-amz-date'],
88 | 'x-amz-security-token': this.config.sessionToken || undefined
89 | };
90 | };
91 |
92 | // Some preparations
93 | function prepare(self, ws) {
94 | var headers = {
95 | 'host': ws.uri.host,
96 | 'content-type': self.config.defaultContentType,
97 | 'accept': self.config.defaultAcceptType,
98 | 'x-amz-date': amzDate(ws.signDate)
99 | };
100 | // Remove accept/content-type headers if no default was configured.
101 | if (!self.config.defaultAcceptType) {
102 | delete headers['accept'];
103 | }
104 | if (!self.config.defaultContentType) {
105 | delete headers['content-type'];
106 | }
107 | // Payload or not?
108 | ws.request.method = ws.request.method.toUpperCase();
109 | if (ws.request.body) {
110 | ws.payload = ws.request.body;
111 | } else if (ws.request.data && self.payloadSerializer) {
112 | ws.payload = self.payloadSerializer(ws.request.data);
113 | } else {
114 | delete headers['content-type'];
115 | }
116 | // Headers
117 | ws.request.headers = extend(
118 | headers,
119 | Object.keys(ws.request.headers || {}).reduce(function (normalized, key) {
120 | normalized[key.toLowerCase()] = ws.request.headers[key];
121 | return normalized;
122 | }, {})
123 | );
124 | ws.sortedHeaderKeys = Object.keys(ws.request.headers).sort();
125 | // Remove content-type parameters as some browser might change them on send
126 | if (ws.request.headers['content-type']) {
127 | ws.request.headers['content-type'] = ws.request.headers['content-type'].split(';')[0];
128 | }
129 | // Merge params to query params
130 | if (typeof(ws.request.params) === 'object') {
131 | extend(ws.uri.queryParams, ws.request.params);
132 | }
133 | }
134 |
135 | // Convert the request to a canonical format.
136 | function buildCanonicalRequest(self, ws) {
137 | ws.signedHeaders = ws.sortedHeaderKeys.map(function (key) {
138 | return key.toLowerCase();
139 | }).join(';');
140 | ws.canonicalRequest = String(ws.request.method).toUpperCase() + '\n' +
141 | // Canonical URI:
142 | ws.uri.path.split('/').map(function(seg) {
143 | return uriEncode(seg);
144 | }).join('/') + '\n' +
145 | // Canonical Query String:
146 | flatten(Object.keys(ws.uri.queryParams).sort().map(function (key) {
147 | var queryParamsForKey = ws.uri.queryParams[key];
148 | if (Array.isArray(queryParamsForKey)) {
149 | // Sort is going to mutate this array, which we don't necessarily own, so we make a defensive copy
150 | queryParamsForKey = [].slice.call(queryParamsForKey);
151 | } else {
152 | queryParamsForKey = [queryParamsForKey];
153 | }
154 | return queryParamsForKey.sort().map(function(val) {
155 | return encodeURIComponent(key) + '=' + encodeURIComponent(val);
156 | });
157 | })).join('&') + '\n' +
158 | // Canonical Headers:
159 | ws.sortedHeaderKeys.map(function (key) {
160 | return key.toLocaleLowerCase() + ':' + ws.request.headers[key];
161 | }).join('\n') + '\n\n' +
162 | // Signed Headers:
163 | ws.signedHeaders + '\n' +
164 | // Hashed Payload
165 | self.hasher.hash((ws.payload) ? ws.payload : '');
166 | }
167 |
168 | // Construct the string that will be signed.
169 | function buildStringToSign(self, ws) {
170 | ws.credentialScope = [amzDate(ws.signDate, true), self.config.region, self.config.service,
171 | 'aws4_request'].join('/');
172 | ws.stringToSign = 'AWS4-HMAC-SHA256' + '\n' +
173 | amzDate(ws.signDate) + '\n' +
174 | ws.credentialScope + '\n' +
175 | self.hasher.hash(ws.canonicalRequest);
176 | }
177 |
178 | // Calculate the signature
179 | function calculateSignature(self, ws) {
180 | var hmac = self.hasher.hmac;
181 | var signKey = hmac(
182 | hmac(
183 | hmac(
184 | hmac(
185 | 'AWS4' + self.config.secretAccessKey,
186 | amzDate(ws.signDate, true),
187 | {hexOutput: false}
188 | ),
189 | self.config.region,
190 | {hexOutput: false, textInput: false}
191 | ),
192 | self.config.service,
193 | {hexOutput: false, textInput: false}
194 | ),
195 | 'aws4_request',
196 | {hexOutput: false, textInput: false}
197 | );
198 | ws.signature = hmac(signKey, ws.stringToSign, {textInput: false});
199 | }
200 |
201 | // Build the signature HTTP header using the data in the working set.
202 | function buildSignatureHeader(self, ws) {
203 | ws.authorization = 'AWS4-HMAC-SHA256 ' +
204 | 'Credential=' + self.config.accessKeyId + '/' + ws.credentialScope + ', ' +
205 | 'SignedHeaders=' + ws.signedHeaders + ', ' +
206 | 'Signature=' + ws.signature;
207 | }
208 |
209 | // Format the given `Date` as AWS compliant date string.
210 | // Time part gets omitted if second argument is set to `true`.
211 | function amzDate(date, short) {
212 | var result = date.toISOString().replace(/[:\-]|\.\d{3}/g, '').substr(0, 17);
213 | if (short) {
214 | return result.substr(0, 8);
215 | }
216 | return result;
217 | }
218 |
219 | /**
220 | * Payload serializer factory implementation that converts the data to a JSON string.
221 | */
222 | function JsonPayloadSerializer() {
223 | return function(data) {
224 | return JSON.stringify(data);
225 | };
226 | }
227 |
228 | /**
229 | * Simple URI parser factory.
230 | * Uses an `a` document element for parsing given URIs.
231 | * Therefore it most likely will only work in a web browser.
232 | */
233 | function SimpleUriParser() {
234 | var parser = document ? document.createElement('a') : {};
235 |
236 | /**
237 | * Parse the given URI.
238 | * @param {string} uri The URI to parse.
239 | * @returns JavaScript object with the parse results:
240 | * `protocol`: The URI protocol part.
241 | * `host`: Host part of the URI.
242 | * `path`: Path part of the URI, always starting with a `/`
243 | * `queryParams`: Query parameters as JavaScript object.
244 | */
245 | return function (uri) {
246 | parser.href = uri;
247 | return {
248 | protocol: parser.protocol,
249 | host: parser.host.replace(/^(.*):((80)|(443))$/, '$1'),
250 | path: ((parser.pathname.charAt(0) !== '/') ? '/' : '') +
251 | decodeURI(parser.pathname),
252 | queryParams: extractQueryParams(parser.search)
253 | };
254 | };
255 |
256 | function extractQueryParams(search) {
257 | return /^\??(.*)$/.exec(search)[1].split('&').reduce(function (result, arg) {
258 | arg = /^(.+)=(.*)$/.exec(arg);
259 | if (arg) {
260 | var paramKey = decodeURI(arg[1]);
261 | result[paramKey] = (
262 | (typeof result[paramKey] != 'undefined' && result[paramKey] instanceof Array)
263 | ? result[paramKey]
264 | : []
265 | ).concat(decodeURI(arg[2]));
266 | }
267 | return result;
268 | }, {});
269 | }
270 | }
271 |
272 | /**
273 | * URI encode according to S3 requirements.
274 | * See: http://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-header-based-auth.html
275 | * See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent
276 | */
277 | function uriEncode(input) {
278 | return encodeURIComponent(input).replace(/[!'()*]/g, function(c) {
279 | return '%' + c.charCodeAt(0).toString(16).toUpperCase();
280 | });
281 | }
282 |
283 | /**
284 | * Hash factory implementation using the SHA-256 hash algorithm of CryptoJS.
285 | * Requires at least the CryptoJS rollups: `sha256.js` and `hmac-sha256.js`.
286 | */
287 | function CryptoJSHasher() {
288 | return {
289 | /**
290 | * Hash the given input using SHA-256 algorithm.
291 | * The options can be used to control the in-/output of the hash operation.
292 | * @param {*} input Input data.
293 | * @param {object} options Options object:
294 | * `hexOutput` -- Output the hash with hex encoding (default: `true`).
295 | * `textInput` -- Interpret the input data as text (default: `true`).
296 | * @returns The generated hash
297 | */
298 | hash: function (input, options) {
299 | options = extend({hexOutput: true, textInput: true}, options);
300 | var hash = CryptoJS.SHA256(input);
301 | if (options.hexOutput) {
302 | return hash.toString(CryptoJS.enc.Hex);
303 | }
304 | return hash;
305 | },
306 |
307 | /**
308 | * Create the HMAC of the given input data with the given key using the SHA-256
309 | * hash algorithm.
310 | * The options can be used to control the in-/output of the hash operation.
311 | * @param {string} key Secret key.
312 | * @param {*} input Input data.
313 | * @param {object} options Options object:
314 | * `hexOutput` -- Output the hash with hex encoding (default: `true`).
315 | * `textInput` -- Interpret the input data as text (default: `true`).
316 | * @returns The generated HMAC.
317 | */
318 | hmac: function (key, input, options) {
319 | options = extend({hexOutput: true, textInput: true}, options);
320 | var hmac = CryptoJS.HmacSHA256(input, key, {asBytes: true});
321 | if (options.hexOutput) {
322 | return hmac.toString(CryptoJS.enc.Hex);
323 | }
324 | return hmac;
325 | }
326 | };
327 | }
328 |
329 | // Simple version of the `extend` function, known from Angular and Backbone.
330 | // It merges the second (and all succeeding) argument(s) into the object, given as first
331 | // argument. This is done recursively for all child objects, as well.
332 | function extend(dest) {
333 | var objs = [].slice.call(arguments, 1);
334 | objs.forEach(function (obj) {
335 | if (!obj || typeof(obj) !== 'object') {
336 | return;
337 | }
338 | Object.keys(obj).forEach(function (key) {
339 | var src = obj[key];
340 | if (typeof(src) === 'undefined') {
341 | return;
342 | }
343 | if (src !== null && typeof(src) === 'object') {
344 | dest[key] = (Array.isArray(src) ? [] : {});
345 | extend(dest[key], src);
346 | } else {
347 | dest[key] = src;
348 | }
349 | });
350 | });
351 | return dest;
352 | }
353 |
354 | // Short function that uses some JavaScript array methods to flatten an n-dimensional array.
355 | function flatten(arr) {
356 | return arr.reduce(function (flat, toFlatten) {
357 | return flat.concat(Array.isArray(toFlatten) ? flatten(toFlatten) : toFlatten);
358 | }, []);
359 | }
360 |
361 | // Throw an error if the given object is undefined.
362 | function assertRequired(obj, msg) {
363 | if (typeof(obj) === 'undefined' || !obj) {
364 | throw new Error(msg);
365 | }
366 | }
367 |
368 | return {
369 | AwsSigner: AwsSigner
370 | };
371 | }));
372 |
--------------------------------------------------------------------------------
/index.d.ts:
--------------------------------------------------------------------------------
1 |
2 | declare namespace awsSignWeb {
3 | interface Config {
4 | accessKeyId: string;
5 | secretAccessKey: string;
6 | sessionToken?: string;
7 | region?: string;
8 | service?: string;
9 | [propName: string]: any;
10 | }
11 |
12 | interface Request {
13 | headers?: any;
14 | url: string;
15 | method: string;
16 | params?: any;
17 | body?: any;
18 | data?: any;
19 | [propName: string]: any;
20 | }
21 |
22 | class AwsSigner {
23 | constructor(config: Config);
24 | sign(request: Request, signDate?: Date): any;
25 | }
26 | }
27 |
28 | export = awsSignWeb;
29 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "aws-sign-web",
3 | "version": "1.5.0",
4 | "description": "Plain JavaScript AWS Signature v4 for use within Web Browsers",
5 | "keywords": [
6 | "aws",
7 | "sign",
8 | "web",
9 | "plain",
10 | "es5"
11 | ],
12 | "repository": {
13 | "type": "git",
14 | "url": "git+https://github.com/danieljoos/aws-sign-web.git"
15 | },
16 | "author": "Daniel Joos ",
17 | "license": "MIT",
18 | "bugs": {
19 | "url": "https://github.com/danieljoos/aws-sign-web/issues"
20 | },
21 | "homepage": "https://github.com/danieljoos/aws-sign-web#readme",
22 | "main": "aws-sign-web.js",
23 | "scripts": {
24 | "prepublishOnly": "node_modules/.bin/gulp",
25 | "test": "node_modules/.bin/mocha"
26 | },
27 | "devDependencies": {
28 | "gulp": "^4.0.2",
29 | "gulp-load-plugins": "^2.0.1",
30 | "gulp-rename": "^1.2.2",
31 | "gulp-uglify": "^3.0.0",
32 | "http-string-parser": "0.0.6",
33 | "jsdom": "^15.2.1",
34 | "mocha": "^6.2.2"
35 | },
36 | "dependencies": {
37 | "crypto-js": "^3.1.9-1"
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite-test.js:
--------------------------------------------------------------------------------
1 |
2 | const assert = require('assert');
3 | const fs = require('fs');
4 | const httpParser = require('http-string-parser');
5 | const jsdom = require('jsdom');
6 |
7 | const {window} = (new jsdom.JSDOM(``, {pretendToBeVisual: true}));
8 | global.window = window;
9 | global.document = window.document;
10 |
11 | const awsSignWeb = require('../aws-sign-web.js');
12 |
13 | const testSuiteRoot = `${__dirname}/aws-sig-v4-test-suite/aws-sig-v4-test-suite/`;
14 |
15 | describe('AwsSigner', function() {
16 |
17 | const config = {
18 | region: 'us-east-1',
19 | service: 'service',
20 | accessKeyId: 'AKIDEXAMPLE',
21 | secretAccessKey: 'wJalrXUtnFEMI/K7MDENG+bPxRfiCYEXAMPLEKEY',
22 | defaultContentType: '',
23 | defaultAcceptType: '',
24 | };
25 | const signDate = new Date('2015-08-30T12:36:00Z');
26 | const awsSigner = new awsSignWeb.AwsSigner(config);
27 |
28 | describe('sign()', function() {
29 | it('should handle vanilla GET request', function() {
30 | const testReq = getTestRequest('get-vanilla');
31 | const signed = awsSigner.sign(testReq.request, signDate);
32 | assert.equal(signed.Authorization, testReq.expectedAuthorization);
33 | });
34 | it('should handle GET request with unreserved characters in path', function() {
35 | const testReq = getTestRequest('get-unreserved');
36 | const signed = awsSigner.sign(testReq.request, signDate);
37 | assert.equal(signed.Authorization, testReq.expectedAuthorization);
38 | });
39 | it('should handle GET request with UTF8 characters in path', function() {
40 | const testReq = getTestRequest('get-utf8');
41 | const signed = awsSigner.sign(testReq.request, signDate);
42 | assert.equal(signed.Authorization, testReq.expectedAuthorization);
43 | });
44 | it('should handle GET request with query parameter', function() {
45 | const testReq = getTestRequest('get-vanilla-empty-query-key');
46 | const signed = awsSigner.sign(testReq.request, signDate);
47 | assert.equal(signed.Authorization, testReq.expectedAuthorization);
48 | });
49 | it('should handle GET request with query parameters and respect key order', function() {
50 | const testReq = getTestRequest('get-vanilla-query-order-key-case');
51 | const signed = awsSigner.sign(testReq.request, signDate);
52 | assert.equal(signed.Authorization, testReq.expectedAuthorization);
53 | });
54 | it('should handle GET request with query parameters and respect multiple value order', function() {
55 | const testReq = getTestRequest('get-vanilla-query-order-value');
56 | const signed = awsSigner.sign(testReq.request, signDate);
57 | assert.equal(signed.Authorization, testReq.expectedAuthorization);
58 | });
59 | it('should handle GET request with query parameters from both URI and config', function() {
60 | const testReq = getTestRequest('get-vanilla-query-uri-config');
61 | const signed = awsSigner.sign(testReq.request, signDate);
62 | assert.equal(signed.Authorization, testReq.expectedAuthorization);
63 | });
64 | it('should handle GET request with unreserved characters in query parameter', function() {
65 | const testReq = getTestRequest('get-vanilla-query-unreserved');
66 | const signed = awsSigner.sign(testReq.request, signDate);
67 | assert.equal(signed.Authorization, testReq.expectedAuthorization);
68 | });
69 | it('should handle GET request with UTF8 characters in query parameter', function() {
70 | const testReq = getTestRequest('get-vanilla-utf8-query');
71 | const signed = awsSigner.sign(testReq.request, signDate);
72 | assert.equal(signed.Authorization, testReq.expectedAuthorization);
73 | });
74 | it('should handle vanilla POST request', function() {
75 | const testReq = getTestRequest('post-vanilla');
76 | const signed = awsSigner.sign(testReq.request, signDate);
77 | assert.equal(signed.Authorization, testReq.expectedAuthorization);
78 | });
79 | it('should handle POST request with query parameter', function() {
80 | const testReq = getTestRequest('post-vanilla-query');
81 | const signed = awsSigner.sign(testReq.request, signDate);
82 | assert.equal(signed.Authorization, testReq.expectedAuthorization);
83 | });
84 | it('should handle POST request with form content', function() {
85 | const testReq = getTestRequest('post-x-www-form-urlencoded');
86 | const signed = awsSigner.sign(testReq.request, signDate);
87 | assert.equal(signed.Authorization, testReq.expectedAuthorization);
88 | });
89 | });
90 | });
91 |
92 | function readTestSuiteFiles(name) {
93 | const testPath = `${testSuiteRoot}/${name}`;
94 | var req = fs.readFileSync(`${testPath}/${name}.req`, 'utf8');
95 | var authz = fs.readFileSync(`${testPath}/${name}.authz`, 'utf8');
96 | var params = fs.existsSync(`${testPath}/${name}.params`) ?
97 | fs.readFileSync(`${testPath}/${name}.params`, 'utf8') :
98 | '{}';
99 | return {req, authz, params};
100 | }
101 |
102 | function getTestRequest(name) {
103 | const testSuite = readTestSuiteFiles(name);
104 | const httpRequest = httpParser.parseRequest(testSuite.req);
105 | const params = JSON.parse(testSuite.params);
106 | return {
107 | request: {
108 | method: httpRequest.method,
109 | url: `https://${httpRequest.headers.Host}${httpRequest.uri}`,
110 | headers: httpRequest.headers,
111 | body: httpRequest.body,
112 | params,
113 | },
114 | expectedAuthorization: testSuite.authz
115 | };
116 | }
117 |
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/LICENSE:
--------------------------------------------------------------------------------
1 |
2 | Apache License
3 | Version 2.0, January 2004
4 | http://www.apache.org/licenses/
5 |
6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7 |
8 | 1. Definitions.
9 |
10 | "License" shall mean the terms and conditions for use, reproduction,
11 | and distribution as defined by Sections 1 through 9 of this document.
12 |
13 | "Licensor" shall mean the copyright owner or entity authorized by
14 | the copyright owner that is granting the License.
15 |
16 | "Legal Entity" shall mean the union of the acting entity and all
17 | other entities that control, are controlled by, or are under common
18 | control with that entity. For the purposes of this definition,
19 | "control" means (i) the power, direct or indirect, to cause the
20 | direction or management of such entity, whether by contract or
21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
22 | outstanding shares, or (iii) beneficial ownership of such entity.
23 |
24 | "You" (or "Your") shall mean an individual or Legal Entity
25 | exercising permissions granted by this License.
26 |
27 | "Source" form shall mean the preferred form for making modifications,
28 | including but not limited to software source code, documentation
29 | source, and configuration files.
30 |
31 | "Object" form shall mean any form resulting from mechanical
32 | transformation or translation of a Source form, including but
33 | not limited to compiled object code, generated documentation,
34 | and conversions to other media types.
35 |
36 | "Work" shall mean the work of authorship, whether in Source or
37 | Object form, made available under the License, as indicated by a
38 | copyright notice that is included in or attached to the work
39 | (an example is provided in the Appendix below).
40 |
41 | "Derivative Works" shall mean any work, whether in Source or Object
42 | form, that is based on (or derived from) the Work and for which the
43 | editorial revisions, annotations, elaborations, or other modifications
44 | represent, as a whole, an original work of authorship. For the purposes
45 | of this License, Derivative Works shall not include works that remain
46 | separable from, or merely link (or bind by name) to the interfaces of,
47 | the Work and Derivative Works thereof.
48 |
49 | "Contribution" shall mean any work of authorship, including
50 | the original version of the Work and any modifications or additions
51 | to that Work or Derivative Works thereof, that is intentionally
52 | submitted to Licensor for inclusion in the Work by the copyright owner
53 | or by an individual or Legal Entity authorized to submit on behalf of
54 | the copyright owner. For the purposes of this definition, "submitted"
55 | means any form of electronic, verbal, or written communication sent
56 | to the Licensor or its representatives, including but not limited to
57 | communication on electronic mailing lists, source code control systems,
58 | and issue tracking systems that are managed by, or on behalf of, the
59 | Licensor for the purpose of discussing and improving the Work, but
60 | excluding communication that is conspicuously marked or otherwise
61 | designated in writing by the copyright owner as "Not a Contribution."
62 |
63 | "Contributor" shall mean Licensor and any individual or Legal Entity
64 | on behalf of whom a Contribution has been received by Licensor and
65 | subsequently incorporated within the Work.
66 |
67 | 2. Grant of Copyright License. Subject to the terms and conditions of
68 | this License, each Contributor hereby grants to You a perpetual,
69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70 | copyright license to reproduce, prepare Derivative Works of,
71 | publicly display, publicly perform, sublicense, and distribute the
72 | Work and such Derivative Works in Source or Object form.
73 |
74 | 3. Grant of Patent License. Subject to the terms and conditions of
75 | this License, each Contributor hereby grants to You a perpetual,
76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77 | (except as stated in this section) patent license to make, have made,
78 | use, offer to sell, sell, import, and otherwise transfer the Work,
79 | where such license applies only to those patent claims licensable
80 | by such Contributor that are necessarily infringed by their
81 | Contribution(s) alone or by combination of their Contribution(s)
82 | with the Work to which such Contribution(s) was submitted. If You
83 | institute patent litigation against any entity (including a
84 | cross-claim or counterclaim in a lawsuit) alleging that the Work
85 | or a Contribution incorporated within the Work constitutes direct
86 | or contributory patent infringement, then any patent licenses
87 | granted to You under this License for that Work shall terminate
88 | as of the date such litigation is filed.
89 |
90 | 4. Redistribution. You may reproduce and distribute copies of the
91 | Work or Derivative Works thereof in any medium, with or without
92 | modifications, and in Source or Object form, provided that You
93 | meet the following conditions:
94 |
95 | (a) You must give any other recipients of the Work or
96 | Derivative Works a copy of this License; and
97 |
98 | (b) You must cause any modified files to carry prominent notices
99 | stating that You changed the files; and
100 |
101 | (c) You must retain, in the Source form of any Derivative Works
102 | that You distribute, all copyright, patent, trademark, and
103 | attribution notices from the Source form of the Work,
104 | excluding those notices that do not pertain to any part of
105 | the Derivative Works; and
106 |
107 | (d) If the Work includes a "NOTICE" text file as part of its
108 | distribution, then any Derivative Works that You distribute must
109 | include a readable copy of the attribution notices contained
110 | within such NOTICE file, excluding those notices that do not
111 | pertain to any part of the Derivative Works, in at least one
112 | of the following places: within a NOTICE text file distributed
113 | as part of the Derivative Works; within the Source form or
114 | documentation, if provided along with the Derivative Works; or,
115 | within a display generated by the Derivative Works, if and
116 | wherever such third-party notices normally appear. The contents
117 | of the NOTICE file are for informational purposes only and
118 | do not modify the License. You may add Your own attribution
119 | notices within Derivative Works that You distribute, alongside
120 | or as an addendum to the NOTICE text from the Work, provided
121 | that such additional attribution notices cannot be construed
122 | as modifying the License.
123 |
124 | You may add Your own copyright statement to Your modifications and
125 | may provide additional or different license terms and conditions
126 | for use, reproduction, or distribution of Your modifications, or
127 | for any such Derivative Works as a whole, provided Your use,
128 | reproduction, and distribution of the Work otherwise complies with
129 | the conditions stated in this License.
130 |
131 | 5. Submission of Contributions. Unless You explicitly state otherwise,
132 | any Contribution intentionally submitted for inclusion in the Work
133 | by You to the Licensor shall be under the terms and conditions of
134 | this License, without any additional terms or conditions.
135 | Notwithstanding the above, nothing herein shall supersede or modify
136 | the terms of any separate license agreement you may have executed
137 | with Licensor regarding such Contributions.
138 |
139 | 6. Trademarks. This License does not grant permission to use the trade
140 | names, trademarks, service marks, or product names of the Licensor,
141 | except as required for reasonable and customary use in describing the
142 | origin of the Work and reproducing the content of the NOTICE file.
143 |
144 | 7. Disclaimer of Warranty. Unless required by applicable law or
145 | agreed to in writing, Licensor provides the Work (and each
146 | Contributor provides its Contributions) on an "AS IS" BASIS,
147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148 | implied, including, without limitation, any warranties or conditions
149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150 | PARTICULAR PURPOSE. You are solely responsible for determining the
151 | appropriateness of using or redistributing the Work and assume any
152 | risks associated with Your exercise of permissions under this License.
153 |
154 | 8. Limitation of Liability. In no event and under no legal theory,
155 | whether in tort (including negligence), contract, or otherwise,
156 | unless required by applicable law (such as deliberate and grossly
157 | negligent acts) or agreed to in writing, shall any Contributor be
158 | liable to You for damages, including any direct, indirect, special,
159 | incidental, or consequential damages of any character arising as a
160 | result of this License or out of the use or inability to use the
161 | Work (including but not limited to damages for loss of goodwill,
162 | work stoppage, computer failure or malfunction, or any and all
163 | other commercial damages or losses), even if such Contributor
164 | has been advised of the possibility of such damages.
165 |
166 | 9. Accepting Warranty or Additional Liability. While redistributing
167 | the Work or Derivative Works thereof, You may choose to offer,
168 | and charge a fee for, acceptance of support, warranty, indemnity,
169 | or other liability obligations and/or rights consistent with this
170 | License. However, in accepting such obligations, You may act only
171 | on Your own behalf and on Your sole responsibility, not on behalf
172 | of any other Contributor, and only if You agree to indemnify,
173 | defend, and hold each Contributor harmless for any liability
174 | incurred by, or claims asserted against, such Contributor by reason
175 | of your accepting any such warranty or additional liability.
176 |
177 | END OF TERMS AND CONDITIONS
178 |
179 | APPENDIX: How to apply the Apache License to your work.
180 |
181 | To apply the Apache License to your work, attach the following
182 | boilerplate notice, with the fields enclosed by brackets "[]"
183 | replaced with your own identifying information. (Don't include
184 | the brackets!) The text should be enclosed in the appropriate
185 | comment syntax for the file format. We also recommend that a
186 | file or class name and description of purpose be included on the
187 | same "printed page" as the copyright notice for easier
188 | identification within third-party archives.
189 |
190 | Copyright [yyyy] [name of copyright owner]
191 |
192 | Licensed under the Apache License, Version 2.0 (the "License");
193 | you may not use this file except in compliance with the License.
194 | You may obtain a copy of the License at
195 |
196 | http://www.apache.org/licenses/LICENSE-2.0
197 |
198 | Unless required by applicable law or agreed to in writing, software
199 | distributed under the License is distributed on an "AS IS" BASIS,
200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201 | See the License for the specific language governing permissions and
202 | limitations under the License.
203 |
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/NOTICE:
--------------------------------------------------------------------------------
1 | AWS Signature Version 4 Test Suite
2 | Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 |
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-header-key-duplicate/get-header-key-duplicate.authz:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=c9d5ea9f3f72853aea855b47ea873832890dbdd183b4468f858259531a5138ea
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-header-key-duplicate/get-header-key-duplicate.creq:
--------------------------------------------------------------------------------
1 | GET
2 | /
3 |
4 | host:example.amazonaws.com
5 | my-header1:value2,value2,value1
6 | x-amz-date:20150830T123600Z
7 |
8 | host;my-header1;x-amz-date
9 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-header-key-duplicate/get-header-key-duplicate.req:
--------------------------------------------------------------------------------
1 | GET / HTTP/1.1
2 | Host:example.amazonaws.com
3 | My-Header1:value2
4 | My-Header1:value2
5 | My-Header1:value1
6 | X-Amz-Date:20150830T123600Z
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-header-key-duplicate/get-header-key-duplicate.sreq:
--------------------------------------------------------------------------------
1 | GET / HTTP/1.1
2 | Host:example.amazonaws.com
3 | My-Header1:value2
4 | My-Header1:value2
5 | My-Header1:value1
6 | X-Amz-Date:20150830T123600Z
7 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=c9d5ea9f3f72853aea855b47ea873832890dbdd183b4468f858259531a5138ea
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-header-key-duplicate/get-header-key-duplicate.sts:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256
2 | 20150830T123600Z
3 | 20150830/us-east-1/service/aws4_request
4 | dc7f04a3abfde8d472b0ab1a418b741b7c67174dad1551b4117b15527fbe966c
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-header-value-multiline/get-header-value-multiline.authz:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=ba17b383a53190154eb5fa66a1b836cc297cc0a3d70a5d00705980573d8ff790
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-header-value-multiline/get-header-value-multiline.creq:
--------------------------------------------------------------------------------
1 | GET
2 | /
3 |
4 | host:example.amazonaws.com
5 | my-header1:value1,value2,value3
6 | x-amz-date:20150830T123600Z
7 |
8 | host;my-header1;x-amz-date
9 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-header-value-multiline/get-header-value-multiline.req:
--------------------------------------------------------------------------------
1 | GET / HTTP/1.1
2 | Host:example.amazonaws.com
3 | My-Header1:value1
4 | value2
5 | value3
6 | X-Amz-Date:20150830T123600Z
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-header-value-multiline/get-header-value-multiline.sreq:
--------------------------------------------------------------------------------
1 | GET / HTTP/1.1
2 | Host:example.amazonaws.com
3 | My-Header1:value1
4 | value2
5 | value3
6 | X-Amz-Date:20150830T123600Z
7 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=ba17b383a53190154eb5fa66a1b836cc297cc0a3d70a5d00705980573d8ff790
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-header-value-multiline/get-header-value-multiline.sts:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256
2 | 20150830T123600Z
3 | 20150830/us-east-1/service/aws4_request
4 | b7b6cbfd8a0430b78891e986784da2630c8a135a8595cec25b26ea94f926ee55
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-header-value-order/get-header-value-order.authz:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=08c7e5a9acfcfeb3ab6b2185e75ce8b1deb5e634ec47601a50643f830c755c01
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-header-value-order/get-header-value-order.creq:
--------------------------------------------------------------------------------
1 | GET
2 | /
3 |
4 | host:example.amazonaws.com
5 | my-header1:value4,value1,value3,value2
6 | x-amz-date:20150830T123600Z
7 |
8 | host;my-header1;x-amz-date
9 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-header-value-order/get-header-value-order.req:
--------------------------------------------------------------------------------
1 | GET / HTTP/1.1
2 | Host:example.amazonaws.com
3 | My-Header1:value4
4 | My-Header1:value1
5 | My-Header1:value3
6 | My-Header1:value2
7 | X-Amz-Date:20150830T123600Z
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-header-value-order/get-header-value-order.sreq:
--------------------------------------------------------------------------------
1 | GET / HTTP/1.1
2 | Host:example.amazonaws.com
3 | My-Header1:value4
4 | My-Header1:value1
5 | My-Header1:value3
6 | My-Header1:value2
7 | X-Amz-Date:20150830T123600Z
8 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=08c7e5a9acfcfeb3ab6b2185e75ce8b1deb5e634ec47601a50643f830c755c01
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-header-value-order/get-header-value-order.sts:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256
2 | 20150830T123600Z
3 | 20150830/us-east-1/service/aws4_request
4 | 31ce73cd3f3d9f66977ad3dd957dc47af14df92fcd8509f59b349e9137c58b86
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-header-value-trim/get-header-value-trim.authz:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;my-header2;x-amz-date, Signature=acc3ed3afb60bb290fc8d2dd0098b9911fcaa05412b367055dee359757a9c736
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-header-value-trim/get-header-value-trim.creq:
--------------------------------------------------------------------------------
1 | GET
2 | /
3 |
4 | host:example.amazonaws.com
5 | my-header1:value1
6 | my-header2:"a b c"
7 | x-amz-date:20150830T123600Z
8 |
9 | host;my-header1;my-header2;x-amz-date
10 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-header-value-trim/get-header-value-trim.req:
--------------------------------------------------------------------------------
1 | GET / HTTP/1.1
2 | Host:example.amazonaws.com
3 | My-Header1: value1
4 | My-Header2: "a b c"
5 | X-Amz-Date:20150830T123600Z
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-header-value-trim/get-header-value-trim.sreq:
--------------------------------------------------------------------------------
1 | GET / HTTP/1.1
2 | Host:example.amazonaws.com
3 | My-Header1: value1
4 | My-Header2: "a b c"
5 | X-Amz-Date:20150830T123600Z
6 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;my-header2;x-amz-date, Signature=acc3ed3afb60bb290fc8d2dd0098b9911fcaa05412b367055dee359757a9c736
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-header-value-trim/get-header-value-trim.sts:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256
2 | 20150830T123600Z
3 | 20150830/us-east-1/service/aws4_request
4 | a726db9b0df21c14f559d0a978e563112acb1b9e05476f0a6a1c7d68f28605c7
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-unreserved/get-unreserved.authz:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=07ef7494c76fa4850883e2b006601f940f8a34d404d0cfa977f52a65bbf5f24f
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-unreserved/get-unreserved.creq:
--------------------------------------------------------------------------------
1 | GET
2 | /-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
3 |
4 | host:example.amazonaws.com
5 | x-amz-date:20150830T123600Z
6 |
7 | host;x-amz-date
8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-unreserved/get-unreserved.req:
--------------------------------------------------------------------------------
1 | GET /-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-unreserved/get-unreserved.sreq:
--------------------------------------------------------------------------------
1 | GET /-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
4 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=07ef7494c76fa4850883e2b006601f940f8a34d404d0cfa977f52a65bbf5f24f
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-unreserved/get-unreserved.sts:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256
2 | 20150830T123600Z
3 | 20150830/us-east-1/service/aws4_request
4 | 6a968768eefaa713e2a6b16b589a8ea192661f098f37349f4e2c0082757446f9
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-utf8/get-utf8.authz:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=8318018e0b0f223aa2bbf98705b62bb787dc9c0e678f255a891fd03141be5d85
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-utf8/get-utf8.creq:
--------------------------------------------------------------------------------
1 | GET
2 | /%E1%88%B4
3 |
4 | host:example.amazonaws.com
5 | x-amz-date:20150830T123600Z
6 |
7 | host;x-amz-date
8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-utf8/get-utf8.req:
--------------------------------------------------------------------------------
1 | GET /ሴ HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-utf8/get-utf8.sreq:
--------------------------------------------------------------------------------
1 | GET /ሴ HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
4 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=8318018e0b0f223aa2bbf98705b62bb787dc9c0e678f255a891fd03141be5d85
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-utf8/get-utf8.sts:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256
2 | 20150830T123600Z
3 | 20150830/us-east-1/service/aws4_request
4 | 2a0a97d02205e45ce2e994789806b19270cfbbb0921b278ccf58f5249ac42102
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.authz:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=a67d582fa61cc504c4bae71f336f98b97f1ea3c7a6bfe1b6e45aec72011b9aeb
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.creq:
--------------------------------------------------------------------------------
1 | GET
2 | /
3 | Param1=value1
4 | host:example.amazonaws.com
5 | x-amz-date:20150830T123600Z
6 |
7 | host;x-amz-date
8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.req:
--------------------------------------------------------------------------------
1 | GET /?Param1=value1 HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.sreq:
--------------------------------------------------------------------------------
1 | GET /?Param1=value1 HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
4 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=a67d582fa61cc504c4bae71f336f98b97f1ea3c7a6bfe1b6e45aec72011b9aeb
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.sts:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256
2 | 20150830T123600Z
3 | 20150830/us-east-1/service/aws4_request
4 | 1e24db194ed7d0eec2de28d7369675a243488e08526e8c1c73571282f7c517ab
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.authz:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=b97d918cfa904a5beff61c982a1b6f458b799221646efd99d3219ec94cdf2500
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.creq:
--------------------------------------------------------------------------------
1 | GET
2 | /
3 | Param1=value1&Param2=value2
4 | host:example.amazonaws.com
5 | x-amz-date:20150830T123600Z
6 |
7 | host;x-amz-date
8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.req:
--------------------------------------------------------------------------------
1 | GET /?Param2=value2&Param1=value1 HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.sreq:
--------------------------------------------------------------------------------
1 | GET /?Param2=value2&Param1=value1 HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
4 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=b97d918cfa904a5beff61c982a1b6f458b799221646efd99d3219ec94cdf2500
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.sts:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256
2 | 20150830T123600Z
3 | 20150830/us-east-1/service/aws4_request
4 | 816cd5b414d056048ba4f7c5386d6e0533120fb1fcfa93762cf0fc39e2cf19e0
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-vanilla-query-order-key/get-vanilla-query-order-key.authz:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=eedbc4e291e521cf13422ffca22be7d2eb8146eecf653089df300a15b2382bd1
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-vanilla-query-order-key/get-vanilla-query-order-key.creq:
--------------------------------------------------------------------------------
1 | GET
2 | /
3 | Param1=Value1&Param1=value2
4 | host:example.amazonaws.com
5 | x-amz-date:20150830T123600Z
6 |
7 | host;x-amz-date
8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-vanilla-query-order-key/get-vanilla-query-order-key.req:
--------------------------------------------------------------------------------
1 | GET /?Param1=value2&Param1=Value1 HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-vanilla-query-order-key/get-vanilla-query-order-key.sreq:
--------------------------------------------------------------------------------
1 | GET /?Param1=value2&Param1=Value1 HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
4 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=eedbc4e291e521cf13422ffca22be7d2eb8146eecf653089df300a15b2382bd1
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-vanilla-query-order-key/get-vanilla-query-order-key.sts:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256
2 | 20150830T123600Z
3 | 20150830/us-east-1/service/aws4_request
4 | 704b4cef673542d84cdff252633f065e8daeba5f168b77116f8b1bcaf3d38f89
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-vanilla-query-order-value/get-vanilla-query-order-value.authz:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5772eed61e12b33fae39ee5e7012498b51d56abc0abb7c60486157bd471c4694
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-vanilla-query-order-value/get-vanilla-query-order-value.creq:
--------------------------------------------------------------------------------
1 | GET
2 | /
3 | Param1=value1&Param1=value2
4 | host:example.amazonaws.com
5 | x-amz-date:20150830T123600Z
6 |
7 | host;x-amz-date
8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-vanilla-query-order-value/get-vanilla-query-order-value.req:
--------------------------------------------------------------------------------
1 | GET /?Param1=value2&Param1=value1 HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-vanilla-query-order-value/get-vanilla-query-order-value.sreq:
--------------------------------------------------------------------------------
1 | GET /?Param1=value2&Param1=value1 HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
4 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5772eed61e12b33fae39ee5e7012498b51d56abc0abb7c60486157bd471c4694
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-vanilla-query-order-value/get-vanilla-query-order-value.sts:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256
2 | 20150830T123600Z
3 | 20150830/us-east-1/service/aws4_request
4 | c968629d70850097a2d8781c9bf7edcb988b04cac14cca9be4acc3595f884606
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.authz:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=9c3e54bfcdf0b19771a7f523ee5669cdf59bc7cc0884027167c21bb143a40197
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.creq:
--------------------------------------------------------------------------------
1 | GET
2 | /
3 | -._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz=-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
4 | host:example.amazonaws.com
5 | x-amz-date:20150830T123600Z
6 |
7 | host;x-amz-date
8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.req:
--------------------------------------------------------------------------------
1 | GET /?-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz=-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.sreq:
--------------------------------------------------------------------------------
1 | GET /?-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz=-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
4 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=9c3e54bfcdf0b19771a7f523ee5669cdf59bc7cc0884027167c21bb143a40197
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.sts:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256
2 | 20150830T123600Z
3 | 20150830/us-east-1/service/aws4_request
4 | c30d4703d9f799439be92736156d47ccfb2d879ddf56f5befa6d1d6aab979177
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-vanilla-query-uri-config/get-vanilla-query-uri-config.authz:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=b97d918cfa904a5beff61c982a1b6f458b799221646efd99d3219ec94cdf2500
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-vanilla-query-uri-config/get-vanilla-query-uri-config.params:
--------------------------------------------------------------------------------
1 | { "Param2": "value2" }
2 |
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-vanilla-query-uri-config/get-vanilla-query-uri-config.req:
--------------------------------------------------------------------------------
1 | GET /?Param1=value1 HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
4 |
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-vanilla-query/get-vanilla-query.authz:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-vanilla-query/get-vanilla-query.creq:
--------------------------------------------------------------------------------
1 | GET
2 | /
3 |
4 | host:example.amazonaws.com
5 | x-amz-date:20150830T123600Z
6 |
7 | host;x-amz-date
8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-vanilla-query/get-vanilla-query.req:
--------------------------------------------------------------------------------
1 | GET / HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-vanilla-query/get-vanilla-query.sreq:
--------------------------------------------------------------------------------
1 | GET / HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
4 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-vanilla-query/get-vanilla-query.sts:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256
2 | 20150830T123600Z
3 | 20150830/us-east-1/service/aws4_request
4 | bb579772317eb040ac9ed261061d46c1f17a8133879d6129b6e1c25292927e63
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-vanilla-utf8-query/get-vanilla-utf8-query.authz:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=2cdec8eed098649ff3a119c94853b13c643bcf08f8b0a1d91e12c9027818dd04
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-vanilla-utf8-query/get-vanilla-utf8-query.creq:
--------------------------------------------------------------------------------
1 | GET
2 | /
3 | %E1%88%B4=bar
4 | host:example.amazonaws.com
5 | x-amz-date:20150830T123600Z
6 |
7 | host;x-amz-date
8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-vanilla-utf8-query/get-vanilla-utf8-query.req:
--------------------------------------------------------------------------------
1 | GET /?ሴ=bar HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-vanilla-utf8-query/get-vanilla-utf8-query.sreq:
--------------------------------------------------------------------------------
1 | GET /?ሴ=bar HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
4 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=2cdec8eed098649ff3a119c94853b13c643bcf08f8b0a1d91e12c9027818dd04
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-vanilla-utf8-query/get-vanilla-utf8-query.sts:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256
2 | 20150830T123600Z
3 | 20150830/us-east-1/service/aws4_request
4 | eb30c5bed55734080471a834cc727ae56beb50e5f39d1bff6d0d38cb192a7073
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-vanilla/get-vanilla.authz:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-vanilla/get-vanilla.creq:
--------------------------------------------------------------------------------
1 | GET
2 | /
3 |
4 | host:example.amazonaws.com
5 | x-amz-date:20150830T123600Z
6 |
7 | host;x-amz-date
8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-vanilla/get-vanilla.req:
--------------------------------------------------------------------------------
1 | GET / HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-vanilla/get-vanilla.sreq:
--------------------------------------------------------------------------------
1 | GET / HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
4 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/get-vanilla/get-vanilla.sts:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256
2 | 20150830T123600Z
3 | 20150830/us-east-1/service/aws4_request
4 | bb579772317eb040ac9ed261061d46c1f17a8133879d6129b6e1c25292927e63
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/normalize-path/get-relative-relative/get-relative-relative.authz:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/normalize-path/get-relative-relative/get-relative-relative.creq:
--------------------------------------------------------------------------------
1 | GET
2 | /
3 |
4 | host:example.amazonaws.com
5 | x-amz-date:20150830T123600Z
6 |
7 | host;x-amz-date
8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/normalize-path/get-relative-relative/get-relative-relative.req:
--------------------------------------------------------------------------------
1 | GET /example1/example2/../.. HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/normalize-path/get-relative-relative/get-relative-relative.sreq:
--------------------------------------------------------------------------------
1 | GET /example1/example2/../.. HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
4 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/normalize-path/get-relative-relative/get-relative-relative.sts:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256
2 | 20150830T123600Z
3 | 20150830/us-east-1/service/aws4_request
4 | bb579772317eb040ac9ed261061d46c1f17a8133879d6129b6e1c25292927e63
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/normalize-path/get-relative/get-relative.authz:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/normalize-path/get-relative/get-relative.creq:
--------------------------------------------------------------------------------
1 | GET
2 | /
3 |
4 | host:example.amazonaws.com
5 | x-amz-date:20150830T123600Z
6 |
7 | host;x-amz-date
8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/normalize-path/get-relative/get-relative.req:
--------------------------------------------------------------------------------
1 | GET /example/.. HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/normalize-path/get-relative/get-relative.sreq:
--------------------------------------------------------------------------------
1 | GET /example/.. HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
4 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/normalize-path/get-relative/get-relative.sts:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256
2 | 20150830T123600Z
3 | 20150830/us-east-1/service/aws4_request
4 | bb579772317eb040ac9ed261061d46c1f17a8133879d6129b6e1c25292927e63
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.authz:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.creq:
--------------------------------------------------------------------------------
1 | GET
2 | /
3 |
4 | host:example.amazonaws.com
5 | x-amz-date:20150830T123600Z
6 |
7 | host;x-amz-date
8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.req:
--------------------------------------------------------------------------------
1 | GET /./ HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.sreq:
--------------------------------------------------------------------------------
1 | GET /./ HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
4 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.sts:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256
2 | 20150830T123600Z
3 | 20150830/us-east-1/service/aws4_request
4 | bb579772317eb040ac9ed261061d46c1f17a8133879d6129b6e1c25292927e63
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.authz:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=ef75d96142cf21edca26f06005da7988e4f8dc83a165a80865db7089db637ec5
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.creq:
--------------------------------------------------------------------------------
1 | GET
2 | /example
3 |
4 | host:example.amazonaws.com
5 | x-amz-date:20150830T123600Z
6 |
7 | host;x-amz-date
8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.req:
--------------------------------------------------------------------------------
1 | GET /./example HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.sreq:
--------------------------------------------------------------------------------
1 | GET /./example HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
4 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=ef75d96142cf21edca26f06005da7988e4f8dc83a165a80865db7089db637ec5
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.sts:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256
2 | 20150830T123600Z
3 | 20150830/us-east-1/service/aws4_request
4 | 214d50c111a8edc4819da6a636336472c916b5240f51e9a51b5c3305180cf702
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/normalize-path/get-slash/get-slash.authz:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/normalize-path/get-slash/get-slash.creq:
--------------------------------------------------------------------------------
1 | GET
2 | /
3 |
4 | host:example.amazonaws.com
5 | x-amz-date:20150830T123600Z
6 |
7 | host;x-amz-date
8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/normalize-path/get-slash/get-slash.req:
--------------------------------------------------------------------------------
1 | GET // HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/normalize-path/get-slash/get-slash.sreq:
--------------------------------------------------------------------------------
1 | GET // HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
4 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/normalize-path/get-slash/get-slash.sts:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256
2 | 20150830T123600Z
3 | 20150830/us-east-1/service/aws4_request
4 | bb579772317eb040ac9ed261061d46c1f17a8133879d6129b6e1c25292927e63
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/normalize-path/get-slashes/get-slashes.authz:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=9a624bd73a37c9a373b5312afbebe7a714a789de108f0bdfe846570885f57e84
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/normalize-path/get-slashes/get-slashes.creq:
--------------------------------------------------------------------------------
1 | GET
2 | /example/
3 |
4 | host:example.amazonaws.com
5 | x-amz-date:20150830T123600Z
6 |
7 | host;x-amz-date
8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/normalize-path/get-slashes/get-slashes.req:
--------------------------------------------------------------------------------
1 | GET //example// HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/normalize-path/get-slashes/get-slashes.sreq:
--------------------------------------------------------------------------------
1 | GET //example// HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
4 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=9a624bd73a37c9a373b5312afbebe7a714a789de108f0bdfe846570885f57e84
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/normalize-path/get-slashes/get-slashes.sts:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256
2 | 20150830T123600Z
3 | 20150830/us-east-1/service/aws4_request
4 | cb96b4ac96d501f7c5c15bc6d67b3035061cfced4af6585ad927f7e6c985c015
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/normalize-path/get-space/get-space.authz:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=652487583200325589f1fba4c7e578f72c47cb61beeca81406b39ddec1366741
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/normalize-path/get-space/get-space.creq:
--------------------------------------------------------------------------------
1 | GET
2 | /example%20space/
3 |
4 | host:example.amazonaws.com
5 | x-amz-date:20150830T123600Z
6 |
7 | host;x-amz-date
8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/normalize-path/get-space/get-space.req:
--------------------------------------------------------------------------------
1 | GET /example space/ HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/normalize-path/get-space/get-space.sreq:
--------------------------------------------------------------------------------
1 | GET /example space/ HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
4 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=652487583200325589f1fba4c7e578f72c47cb61beeca81406b39ddec1366741
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/normalize-path/get-space/get-space.sts:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256
2 | 20150830T123600Z
3 | 20150830/us-east-1/service/aws4_request
4 | 63ee75631ed7234ae61b5f736dfc7754cdccfedbff4b5128a915706ee9390d86
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/normalize-path/normalize-path.txt:
--------------------------------------------------------------------------------
1 | A note about signing requests to Amazon S3:
2 |
3 | In exception to this, you do not normalize URI paths for requests to Amazon S3. For example, if you have a bucket with an object named my-object//example//photo.user, use that path. Normalizing the path to my-object/example/photo.user will cause the request to fail. For more information, see Task 1: Create a Canonical Request in the Amazon Simple Storage Service API Reference: http://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-header-based-auth.html#canonical-request
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-header-key-case/post-header-key-case.authz:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5da7c1a2acd57cee7505fc6676e4e544621c30862966e37dddb68e92efbe5d6b
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-header-key-case/post-header-key-case.creq:
--------------------------------------------------------------------------------
1 | POST
2 | /
3 |
4 | host:example.amazonaws.com
5 | x-amz-date:20150830T123600Z
6 |
7 | host;x-amz-date
8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-header-key-case/post-header-key-case.req:
--------------------------------------------------------------------------------
1 | POST / HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-header-key-case/post-header-key-case.sreq:
--------------------------------------------------------------------------------
1 | POST / HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
4 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5da7c1a2acd57cee7505fc6676e4e544621c30862966e37dddb68e92efbe5d6b
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-header-key-case/post-header-key-case.sts:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256
2 | 20150830T123600Z
3 | 20150830/us-east-1/service/aws4_request
4 | 553f88c9e4d10fc9e109e2aeb65f030801b70c2f6468faca261d401ae622fc87
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-header-key-sort/post-header-key-sort.authz:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=c5410059b04c1ee005303aed430f6e6645f61f4dc9e1461ec8f8916fdf18852c
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-header-key-sort/post-header-key-sort.creq:
--------------------------------------------------------------------------------
1 | POST
2 | /
3 |
4 | host:example.amazonaws.com
5 | my-header1:value1
6 | x-amz-date:20150830T123600Z
7 |
8 | host;my-header1;x-amz-date
9 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-header-key-sort/post-header-key-sort.req:
--------------------------------------------------------------------------------
1 | POST / HTTP/1.1
2 | Host:example.amazonaws.com
3 | My-Header1:value1
4 | X-Amz-Date:20150830T123600Z
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-header-key-sort/post-header-key-sort.sreq:
--------------------------------------------------------------------------------
1 | POST / HTTP/1.1
2 | Host:example.amazonaws.com
3 | My-Header1:value1
4 | X-Amz-Date:20150830T123600Z
5 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=c5410059b04c1ee005303aed430f6e6645f61f4dc9e1461ec8f8916fdf18852c
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-header-key-sort/post-header-key-sort.sts:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256
2 | 20150830T123600Z
3 | 20150830/us-east-1/service/aws4_request
4 | 9368318c2967cf6de74404b30c65a91e8f6253e0a8659d6d5319f1a812f87d65
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-header-value-case/post-header-value-case.authz:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=cdbc9802e29d2942e5e10b5bccfdd67c5f22c7c4e8ae67b53629efa58b974b7d
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-header-value-case/post-header-value-case.creq:
--------------------------------------------------------------------------------
1 | POST
2 | /
3 |
4 | host:example.amazonaws.com
5 | my-header1:VALUE1
6 | x-amz-date:20150830T123600Z
7 |
8 | host;my-header1;x-amz-date
9 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-header-value-case/post-header-value-case.req:
--------------------------------------------------------------------------------
1 | POST / HTTP/1.1
2 | Host:example.amazonaws.com
3 | My-Header1:VALUE1
4 | X-Amz-Date:20150830T123600Z
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-header-value-case/post-header-value-case.sreq:
--------------------------------------------------------------------------------
1 | POST / HTTP/1.1
2 | Host:example.amazonaws.com
3 | My-Header1:VALUE1
4 | X-Amz-Date:20150830T123600Z
5 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=cdbc9802e29d2942e5e10b5bccfdd67c5f22c7c4e8ae67b53629efa58b974b7d
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-header-value-case/post-header-value-case.sts:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256
2 | 20150830T123600Z
3 | 20150830/us-east-1/service/aws4_request
4 | d51ced243e649e3de6ef63afbbdcbca03131a21a7103a1583706a64618606a93
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-sts-token/post-sts-header-after/post-sts-header-after.authz:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5da7c1a2acd57cee7505fc6676e4e544621c30862966e37dddb68e92efbe5d6b
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-sts-token/post-sts-header-after/post-sts-header-after.creq:
--------------------------------------------------------------------------------
1 | POST
2 | /
3 |
4 | host:example.amazonaws.com
5 | x-amz-date:20150830T123600Z
6 |
7 | host;x-amz-date
8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-sts-token/post-sts-header-after/post-sts-header-after.req:
--------------------------------------------------------------------------------
1 | POST / HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-sts-token/post-sts-header-after/post-sts-header-after.sreq:
--------------------------------------------------------------------------------
1 | POST / HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
4 | X-Amz-Security-Token:AQoDYXdzEPT//////////wEXAMPLEtc764bNrC9SAPBSM22wDOk4x4HIZ8j4FZTwdQWLWsKWHGBuFqwAeMicRXmxfpSPfIeoIYRqTflfKD8YUuwthAx7mSEI/qkPpKPi/kMcGdQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA==
5 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5da7c1a2acd57cee7505fc6676e4e544621c30862966e37dddb68e92efbe5d6b
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-sts-token/post-sts-header-after/post-sts-header-after.sts:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256
2 | 20150830T123600Z
3 | 20150830/us-east-1/service/aws4_request
4 | 553f88c9e4d10fc9e109e2aeb65f030801b70c2f6468faca261d401ae622fc87
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-sts-token/post-sts-header-before/post-sts-header-before.authz:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date;x-amz-security-token, Signature=85d96828115b5dc0cfc3bd16ad9e210dd772bbebba041836c64533a82be05ead
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-sts-token/post-sts-header-before/post-sts-header-before.creq:
--------------------------------------------------------------------------------
1 | POST
2 | /
3 |
4 | host:example.amazonaws.com
5 | x-amz-date:20150830T123600Z
6 | x-amz-security-token:AQoDYXdzEPT//////////wEXAMPLEtc764bNrC9SAPBSM22wDOk4x4HIZ8j4FZTwdQWLWsKWHGBuFqwAeMicRXmxfpSPfIeoIYRqTflfKD8YUuwthAx7mSEI/qkPpKPi/kMcGdQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA==
7 |
8 | host;x-amz-date;x-amz-security-token
9 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-sts-token/post-sts-header-before/post-sts-header-before.req:
--------------------------------------------------------------------------------
1 | POST / HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
4 | X-Amz-Security-Token:AQoDYXdzEPT//////////wEXAMPLEtc764bNrC9SAPBSM22wDOk4x4HIZ8j4FZTwdQWLWsKWHGBuFqwAeMicRXmxfpSPfIeoIYRqTflfKD8YUuwthAx7mSEI/qkPpKPi/kMcGdQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA==
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-sts-token/post-sts-header-before/post-sts-header-before.sreq:
--------------------------------------------------------------------------------
1 | POST / HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
4 | X-Amz-Security-Token:AQoDYXdzEPT//////////wEXAMPLEtc764bNrC9SAPBSM22wDOk4x4HIZ8j4FZTwdQWLWsKWHGBuFqwAeMicRXmxfpSPfIeoIYRqTflfKD8YUuwthAx7mSEI/qkPpKPi/kMcGdQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA==
5 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date;x-amz-security-token, Signature=85d96828115b5dc0cfc3bd16ad9e210dd772bbebba041836c64533a82be05ead
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-sts-token/post-sts-header-before/post-sts-header-before.sts:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256
2 | 20150830T123600Z
3 | 20150830/us-east-1/service/aws4_request
4 | c237e1b440d4c63c32ca95b5b99481081cb7b13c7e40434868e71567c1a882f6
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-sts-token/readme.txt:
--------------------------------------------------------------------------------
1 | A note about using temporary security credentials:
2 |
3 | You can use temporary security credentials provided by the AWS Security Token Service (AWS STS) to sign a request. The process is the same as using long-term credentials but requires an additional HTTP header or query string parameter for the security token. The name of the header or query string parameter is X-Amz-Security-Token, and the value is the session token (the string that you received from AWS STS when you obtained temporary security credentials).
4 |
5 | When you add X-Amz-Security-Token, some services require that you include this parameter in the canonical (signed) request. For other services, you add this parameter at the end, after you calculate the signature. For details see the API reference documentation for that service.
6 |
7 | The test suite has 2 examples:
8 |
9 | post-sts-header-before - The X-Amz-Security-Token header is part of the canonical request.
10 |
11 | post-sts-header-after - The X-Amz-Security-Token header is added to the request after you calculate the signature.
12 |
13 | The test suite uses this example value for X-Amz-Security-Token:
14 |
15 | AQoDYXdzEPT//////////wEXAMPLEtc764bNrC9SAPBSM22wDOk4x4HIZ8j4FZTwdQWLWsKWHGBuFqwAeMicRXmxfpSPfIeoIYRqTflfKD8YUuwthAx7mSEI/qkPpKPi/kMcGdQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA==
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.authz:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=28038455d6de14eafc1f9222cf5aa6f1a96197d7deb8263271d420d138af7f11
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.creq:
--------------------------------------------------------------------------------
1 | POST
2 | /
3 | Param1=value1
4 | host:example.amazonaws.com
5 | x-amz-date:20150830T123600Z
6 |
7 | host;x-amz-date
8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.req:
--------------------------------------------------------------------------------
1 | POST /?Param1=value1 HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.sreq:
--------------------------------------------------------------------------------
1 | POST /?Param1=value1 HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
4 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=28038455d6de14eafc1f9222cf5aa6f1a96197d7deb8263271d420d138af7f11
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.sts:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256
2 | 20150830T123600Z
3 | 20150830/us-east-1/service/aws4_request
4 | 9d659678c1756bb3113e2ce898845a0a79dbbc57b740555917687f1b3340fbbd
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-vanilla-query/post-vanilla-query.authz:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=28038455d6de14eafc1f9222cf5aa6f1a96197d7deb8263271d420d138af7f11
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-vanilla-query/post-vanilla-query.creq:
--------------------------------------------------------------------------------
1 | POST
2 | /
3 | Param1=value1
4 | host:example.amazonaws.com
5 | x-amz-date:20150830T123600Z
6 |
7 | host;x-amz-date
8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-vanilla-query/post-vanilla-query.req:
--------------------------------------------------------------------------------
1 | POST /?Param1=value1 HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-vanilla-query/post-vanilla-query.sreq:
--------------------------------------------------------------------------------
1 | POST /?Param1=value1 HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
4 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=28038455d6de14eafc1f9222cf5aa6f1a96197d7deb8263271d420d138af7f11
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-vanilla-query/post-vanilla-query.sts:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256
2 | 20150830T123600Z
3 | 20150830/us-east-1/service/aws4_request
4 | 9d659678c1756bb3113e2ce898845a0a79dbbc57b740555917687f1b3340fbbd
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-vanilla/post-vanilla.authz:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5da7c1a2acd57cee7505fc6676e4e544621c30862966e37dddb68e92efbe5d6b
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-vanilla/post-vanilla.creq:
--------------------------------------------------------------------------------
1 | POST
2 | /
3 |
4 | host:example.amazonaws.com
5 | x-amz-date:20150830T123600Z
6 |
7 | host;x-amz-date
8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-vanilla/post-vanilla.req:
--------------------------------------------------------------------------------
1 | POST / HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-vanilla/post-vanilla.sreq:
--------------------------------------------------------------------------------
1 | POST / HTTP/1.1
2 | Host:example.amazonaws.com
3 | X-Amz-Date:20150830T123600Z
4 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5da7c1a2acd57cee7505fc6676e4e544621c30862966e37dddb68e92efbe5d6b
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-vanilla/post-vanilla.sts:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256
2 | 20150830T123600Z
3 | 20150830/us-east-1/service/aws4_request
4 | 553f88c9e4d10fc9e109e2aeb65f030801b70c2f6468faca261d401ae622fc87
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.authz:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=1a72ec8f64bd914b0e42e42607c7fbce7fb2c7465f63e3092b3b0d39fa77a6fe
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.creq:
--------------------------------------------------------------------------------
1 | POST
2 | /
3 |
4 | content-type:application/x-www-form-urlencoded; charset=utf8
5 | host:example.amazonaws.com
6 | x-amz-date:20150830T123600Z
7 |
8 | content-type;host;x-amz-date
9 | 9095672bbd1f56dfc5b65f3e153adc8731a4a654192329106275f4c7b24d0b6e
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.req:
--------------------------------------------------------------------------------
1 | POST / HTTP/1.1
2 | Content-Type:application/x-www-form-urlencoded; charset=utf8
3 | Host:example.amazonaws.com
4 | X-Amz-Date:20150830T123600Z
5 |
6 | Param1=value1
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.sreq:
--------------------------------------------------------------------------------
1 | POST / HTTP/1.1
2 | Content-Type:application/x-www-form-urlencoded; charset=utf8
3 | Host:example.amazonaws.com
4 | X-Amz-Date:20150830T123600Z
5 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=1a72ec8f64bd914b0e42e42607c7fbce7fb2c7465f63e3092b3b0d39fa77a6fe
6 |
7 | Param1=value1
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.sts:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256
2 | 20150830T123600Z
3 | 20150830/us-east-1/service/aws4_request
4 | 2e1cf7ed91881a30569e46552437e4156c823447bf1781b921b5d486c568dd1c
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.authz:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=ff11897932ad3f4e8b18135d722051e5ac45fc38421b1da7b9d196a0fe09473a
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.creq:
--------------------------------------------------------------------------------
1 | POST
2 | /
3 |
4 | content-type:application/x-www-form-urlencoded
5 | host:example.amazonaws.com
6 | x-amz-date:20150830T123600Z
7 |
8 | content-type;host;x-amz-date
9 | 9095672bbd1f56dfc5b65f3e153adc8731a4a654192329106275f4c7b24d0b6e
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.req:
--------------------------------------------------------------------------------
1 | POST / HTTP/1.1
2 | Content-Type:application/x-www-form-urlencoded
3 | Host:example.amazonaws.com
4 | X-Amz-Date:20150830T123600Z
5 |
6 | Param1=value1
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.sreq:
--------------------------------------------------------------------------------
1 | POST / HTTP/1.1
2 | Content-Type:application/x-www-form-urlencoded
3 | Host:example.amazonaws.com
4 | X-Amz-Date:20150830T123600Z
5 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=ff11897932ad3f4e8b18135d722051e5ac45fc38421b1da7b9d196a0fe09473a
6 |
7 | Param1=value1
--------------------------------------------------------------------------------
/test/aws-sig-v4-test-suite/aws-sig-v4-test-suite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.sts:
--------------------------------------------------------------------------------
1 | AWS4-HMAC-SHA256
2 | 20150830T123600Z
3 | 20150830/us-east-1/service/aws4_request
4 | 42a5e5bb34198acb3e84da4f085bb7927f2bc277ca766e6d19c73c2154021281
--------------------------------------------------------------------------------