diff --git a/botocore/auth.py b/botocore/auth.py index 2b553eb51d..eee0a5124c 100644 --- a/botocore/auth.py +++ b/botocore/auth.py @@ -12,28 +12,21 @@ # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. import base64 +import calendar import datetime +import functools +from email.utils import formatdate from hashlib import sha256 -from hashlib import sha1 import hmac import logging -from email.utils import formatdate -from operator import itemgetter -import functools import time -import calendar -import json +from botocore.compat import ( + encodebytes, ensure_unicode, HTTPHeaders, json, parse_qs, quote, + six, urlsplit, urlunsplit, MD5_AVAILABLE +) from botocore.exceptions import NoCredentialsError from botocore.utils import normalize_url_path, percent_encode_sequence -from botocore.compat import HTTPHeaders -from botocore.compat import quote, unquote, urlsplit, parse_qs -from botocore.compat import urlunsplit -from botocore.compat import encodebytes -from botocore.compat import six -from botocore.compat import json -from botocore.compat import MD5_AVAILABLE -from botocore.compat import ensure_unicode logger = logging.getLogger(__name__) @@ -54,6 +47,36 @@ UNSIGNED_PAYLOAD = 'UNSIGNED-PAYLOAD' +def _host_from_url(url): + # Given URL, derive value for host header. Ensure that value: + # 1) is lowercase + # 2) excludes port, if it was the default port + # 3) excludes userinfo + url_parts = urlsplit(url) + host = url_parts.hostname # urlsplit's hostname is always lowercase + default_ports = { + 'http': 80, + 'https': 443 + } + if url_parts.port is not None: + if url_parts.port != default_ports.get(url_parts.scheme): + host = '%s:%d' % (host, url_parts.port) + return host + + +def _get_body_as_dict(request): + # For query services, request.data is form-encoded and is already a + # dict, but for other services such as rest-json it could be a json + # string or bytes. In those cases we attempt to load the data as a + # dict. + data = request.data + if isinstance(data, six.binary_type): + data = json.loads(data.decode('utf-8')) + elif isinstance(data, six.string_types): + data = json.loads(data) + return data + + class BaseSigner(object): REQUIRES_REGION = False @@ -104,7 +127,7 @@ def add_auth(self, request): # from the request body so we can update them with # the sigv2 auth params. if self.credentials is None: - raise NoCredentialsError + raise NoCredentialsError() if request.data: # POST params = request.data @@ -128,7 +151,7 @@ def __init__(self, credentials): def add_auth(self, request): if self.credentials is None: - raise NoCredentialsError + raise NoCredentialsError() if 'Date' in request.headers: del request.headers['Date'] request.headers['Date'] = formatdate(usegmt=True) @@ -180,26 +203,11 @@ def headers_to_sign(self, request): if lname not in SIGNED_HEADERS_BLACKLIST: header_map[lname] = value if 'host' not in header_map: - # Ensure we sign the lowercased version of the host, as that - # is what will ultimately be sent on the wire. # TODO: We should set the host ourselves, instead of relying on our # HTTP client to set it for us. - header_map['host'] = self._canonical_host(request.url).lower() + header_map['host'] = _host_from_url(request.url) return header_map - def _canonical_host(self, url): - url_parts = urlsplit(url) - default_ports = { - 'http': 80, - 'https': 443 - } - if any(url_parts.scheme == scheme and url_parts.port == port - for scheme, port in default_ports.items()): - # No need to include the port if it's the default port. - return url_parts.hostname - # Strip out auth if it's present in the netloc. - return url_parts.netloc.rsplit('@', 1)[-1] - def canonical_query_string(self, request): # The query string can come from two parts. One is the # params attribute of the request. The other is from the request @@ -211,13 +219,19 @@ def canonical_query_string(self, request): return self._canonical_query_string_url(urlsplit(request.url)) def _canonical_query_string_params(self, params): - l = [] - for param in sorted(params): - value = str(params[param]) - l.append('%s=%s' % (quote(param, safe='-_.~'), - quote(value, safe='-_.~'))) - cqs = '&'.join(l) - return cqs + # [(key, value), (key2, value2)] + key_val_pairs = [] + for key in params: + value = str(params[key]) + key_val_pairs.append((quote(key, safe='-_.~'), + quote(value, safe='-_.~'))) + sorted_key_vals = [] + # Sort by the URI-encoded key names, and in the case of + # repeated keys, then sort by the value. + for key, value in sorted(key_val_pairs): + sorted_key_vals.append('%s=%s' % (key, value)) + canonical_query_string = '&'.join(sorted_key_vals) + return canonical_query_string def _canonical_query_string_url(self, parts): canonical_query_string = '' @@ -228,7 +242,7 @@ def _canonical_query_string_url(self, parts): key, _, value = pair.partition('=') key_val_pairs.append((key, value)) sorted_key_vals = [] - # Sort by the key names, and in the case of + # Sort by the URI-encoded key names, and in the case of # repeated keys, then sort by the value. for key, value in sorted(key_val_pairs): sorted_key_vals.append('%s=%s' % (key, value)) @@ -246,7 +260,7 @@ def canonical_headers(self, headers_to_sign): sorted_header_names = sorted(set(headers_to_sign)) for key in sorted_header_names: value = ','.join(self._header_value(v) for v in - sorted(headers_to_sign.get_all(key))) + headers_to_sign.get_all(key)) headers.append('%s:%s' % (key, ensure_unicode(value))) return '\n'.join(headers) @@ -354,7 +368,7 @@ def signature(self, string_to_sign, request): def add_auth(self, request): if self.credentials is None: - raise NoCredentialsError + raise NoCredentialsError() datetime_now = datetime.datetime.utcnow() request.context['timestamp'] = datetime_now.strftime(SIGV4_TIMESTAMP) # This could be a retry. Make sure the previous @@ -509,7 +523,7 @@ def _modify_request_before_signing(self, request): if request.data: # We also need to move the body params into the query string. To # do this, we first have to convert it to a dict. - query_dict.update(self._get_body_as_dict(request)) + query_dict.update(_get_body_as_dict(request)) request.data = '' if query_dict: operation_params = percent_encode_sequence(query_dict) + '&' @@ -527,18 +541,6 @@ def _modify_request_before_signing(self, request): new_url_parts = (p[0], p[1], p[2], new_query_string, p[4]) request.url = urlunsplit(new_url_parts) - def _get_body_as_dict(self, request): - # For query services, request.data is form-encoded and is already a - # dict, but for other services such as rest-json it could be a json - # string or bytes. In those cases we attempt to load the data as a - # dict. - data = request.data - if isinstance(data, six.binary_type): - data = json.loads(data.decode('utf-8')) - elif isinstance(data, six.string_types): - data = json.loads(data) - return data - def _inject_signature_to_request(self, request, signature): # Rather than calculating an "Authorization" header, for the query # param quth, we just append an 'X-Amz-Signature' param to the end diff --git a/botocore/crt/__init__.py b/botocore/crt/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/botocore/crt/auth.py b/botocore/crt/auth.py new file mode 100644 index 0000000000..dafe82b11d --- /dev/null +++ b/botocore/crt/auth.py @@ -0,0 +1,296 @@ +import datetime +from io import BytesIO + +import awscrt.auth + +from botocore.auth import ( + _host_from_url, _get_body_as_dict, BaseSigner, + SIGNED_HEADERS_BLACKLIST, UNSIGNED_PAYLOAD +) +from botocore.compat import HTTPHeaders, parse_qs, urlsplit, urlunsplit +from botocore.utils import percent_encode_sequence +from botocore.exceptions import NoCredentialsError + +class CrtSigV4Auth(BaseSigner): + REQUIRES_REGION = True + _PRESIGNED_HEADERS_BLACKLIST = [ + 'Authorization', + 'X-Amz-Date', + 'X-Amz-Content-SHA256', + 'X-Amz-Security-Token', + ] + _SIGNATURE_TYPE = awscrt.auth.AwsSignatureType.HTTP_REQUEST_HEADERS + _USE_DOUBLE_URI_ENCODE = True + _SHOULD_NORMALIZE_URI_PATH = True + + def __init__(self, credentials, service_name, region_name): + self.credentials = credentials + self._service_name = service_name + self._region_name = region_name + self._expiration_in_seconds = None + + def add_auth(self, request): + if self.credentials is None: + raise NoCredentialsError() + + # Use utcnow() because that's what gets mocked by tests, but set + # timezone because CRT assumes naive datetime is local time. + datetime_now = datetime.datetime.utcnow().replace( + tzinfo=datetime.timezone.utc) + + # Use existing 'X-Amz-Content-SHA256' header if able + existing_sha256 = self._get_existing_sha256(request) + + self._modify_request_before_signing(request) + + credentials_provider = awscrt.auth.AwsCredentialsProvider.new_static( + access_key_id=self.credentials.access_key, + secret_access_key=self.credentials.secret_key, + session_token=self.credentials.token) + + if self._should_sha256_sign_payload(request): + if existing_sha256: + explicit_payload = existing_sha256 + else: + explicit_payload = None # to be calculated during signing + else: + explicit_payload = UNSIGNED_PAYLOAD + + if self._should_add_content_sha256_header(explicit_payload): + body_header = \ + awscrt.auth.AwsSignedBodyHeaderType.X_AMZ_CONTENT_SHA_256 + else: + body_header = awscrt.auth.AwsSignedBodyHeaderType.NONE + + signing_config = awscrt.auth.AwsSigningConfig( + algorithm=awscrt.auth.AwsSigningAlgorithm.V4, + signature_type=self._SIGNATURE_TYPE, + credentials_provider=credentials_provider, + region=self._region_name, + service=self._service_name, + date=datetime_now, + should_sign_header=self._should_sign_header, + use_double_uri_encode=self._USE_DOUBLE_URI_ENCODE, + should_normalize_uri_path=self._SHOULD_NORMALIZE_URI_PATH, + signed_body_value=explicit_payload, + signed_body_header_type=body_header, + expiration_in_seconds=self._expiration_in_seconds, + ) + crt_request = self._crt_request_from_aws_request(request) + future = awscrt.auth.aws_sign_request(crt_request, signing_config) + future.result() + self._apply_signing_changes(request, crt_request) + + def _crt_request_from_aws_request(self, aws_request): + url_parts = urlsplit(aws_request.url) + crt_path = url_parts.path if url_parts.path else '/' + if aws_request.params: + array = [] + for (param, value) in aws_request.params.items(): + value = str(value) + array.append('%s=%s' % (param, value)) + crt_path = crt_path + '?' + '&'.join(array) + elif url_parts.query: + crt_path = '%s?%s' % (crt_path, url_parts.query) + + crt_headers = awscrt.http.HttpHeaders(aws_request.headers.items()) + + # CRT requires body (if it exists) to be an I/O stream. + crt_body_stream = None + if aws_request.body: + if hasattr(aws_request.body, 'seek'): + crt_body_stream = aws_request.body + else: + crt_body_stream = BytesIO(aws_request.body) + + crt_request = awscrt.http.HttpRequest( + method=aws_request.method, + path=crt_path, + headers=crt_headers, + body_stream=crt_body_stream) + return crt_request + + def _apply_signing_changes(self, aws_request, signed_crt_request): + # Apply changes from signed CRT request to the AWSRequest + aws_request.headers = HTTPHeaders.from_pairs( + list(signed_crt_request.headers)) + + def _should_sign_header(self, name, **kwargs): + return name.lower() not in SIGNED_HEADERS_BLACKLIST + + def _modify_request_before_signing(self, request): + # This could be a retry. Make sure the previous + # authorization headers are removed first. + for h in self._PRESIGNED_HEADERS_BLACKLIST: + if h in request.headers: + del request.headers[h] + # If necessary, add the host header + if 'host' not in request.headers: + request.headers['host'] = _host_from_url(request.url) + + def _get_existing_sha256(self, request): + return request.headers.get('X-Amz-Content-SHA256') + + def _should_sha256_sign_payload(self, request): + # Payloads will always be signed over insecure connections. + if not request.url.startswith('https'): + return True + + # Certain operations may have payload signing disabled by default. + # Since we don't have access to the operation model, we pass in this + # bit of metadata through the request context. + return request.context.get('payload_signing_enabled', True) + + def _should_add_content_sha256_header(self, explicit_payload): + # only add X-Amz-Content-SHA256 header if payload is explicitly set + return explicit_payload is not None + + +class CrtS3SigV4Auth(CrtSigV4Auth): + # For S3, we do not normalize the path. + _USE_DOUBLE_URI_ENCODE = False + _SHOULD_NORMALIZE_URI_PATH = False + + def _get_existing_sha256(self, request): + # always recalculate + return None + + def _should_sha256_sign_payload(self, request): + # S3 allows optional body signing, so to minimize the performance + # impact, we opt to not SHA256 sign the body on streaming uploads, + # provided that we're on https. + client_config = request.context.get('client_config') + s3_config = getattr(client_config, 's3', None) + + # The config could be None if it isn't set, or if the customer sets it + # to None. + if s3_config is None: + s3_config = {} + + # The explicit configuration takes precedence over any implicit + # configuration. + sign_payload = s3_config.get('payload_signing_enabled', None) + if sign_payload is not None: + return sign_payload + + # We require that both content-md5 be present and https be enabled + # to implicitly disable body signing. The combination of TLS and + # content-md5 is sufficiently secure and durable for us to be + # confident in the request without body signing. + if not request.url.startswith('https') or \ + 'Content-MD5' not in request.headers: + return True + + # If the input is streaming we disable body signing by default. + if request.context.get('has_streaming_input', False): + return False + + # If the S3-specific checks had no results, delegate to the generic + # checks. + return super()._should_sha256_sign_payload(request) + + def _should_add_content_sha256_header(self, explicit_payload): + # Always add X-Amz-Content-SHA256 header + return True + + +class CrtSigV4QueryAuth(CrtSigV4Auth): + DEFAULT_EXPIRES = 3600 + _SIGNATURE_TYPE = awscrt.auth.AwsSignatureType.HTTP_REQUEST_QUERY_PARAMS + + def __init__(self, credentials, service_name, region_name, + expires=DEFAULT_EXPIRES): + super().__init__(credentials, service_name, region_name) + self._expiration_in_seconds = expires + + def _modify_request_before_signing(self, request): + super()._modify_request_before_signing(request) + + # We automatically set this header, so if it's the auto-set value we + # want to get rid of it since it doesn't make sense for presigned urls. + content_type = request.headers.get('content-type') + if content_type == 'application/x-www-form-urlencoded; charset=utf-8': + del request.headers['content-type'] + + # Now parse the original query string to a dict, inject our new query + # params, and serialize back to a query string. + url_parts = urlsplit(request.url) + # parse_qs makes each value a list, but in our case we know we won't + # have repeated keys so we know we have single element lists which we + # can convert back to scalar values. + query_dict = dict( + [(k, v[0]) for k, v in + parse_qs(url_parts.query, keep_blank_values=True).items()]) + # The spec is particular about this. It *has* to be: + # https://?& + # You can't mix the two types of params together, i.e just keep doing + # new_query_params.update(op_params) + # new_query_params.update(auth_params) + # percent_encode_sequence(new_query_params) + if request.data: + # We also need to move the body params into the query string. To + # do this, we first have to convert it to a dict. + query_dict.update(_get_body_as_dict(request)) + request.data = '' + new_query_string = percent_encode_sequence(query_dict) + # url_parts is a tuple (and therefore immutable) so we need to create + # a new url_parts with the new query string. + # - + # scheme - 0 + # netloc - 1 + # path - 2 + # query - 3 <-- we're replacing this. + # fragment - 4 + p = url_parts + new_url_parts = (p[0], p[1], p[2], new_query_string, p[4]) + request.url = urlunsplit(new_url_parts) + + def _apply_signing_changes(self, aws_request, signed_crt_request): + # Apply changes from signed CRT request to the AWSRequest + super()._apply_signing_changes(aws_request, signed_crt_request) + + signed_query = urlsplit(signed_crt_request.path).query + p = urlsplit(aws_request.url) + # urlsplit() returns a tuple (and therefore immutable) so we + # need to create new url with the new query string. + # - + # scheme - 0 + # netloc - 1 + # path - 2 + # query - 3 <-- we're replacing this. + # fragment - 4 + aws_request.url = urlunsplit((p[0], p[1], p[2], signed_query, p[4])) + + +class CrtS3SigV4QueryAuth(CrtSigV4QueryAuth): + """S3 SigV4 auth using query parameters. + This signer will sign a request using query parameters and signature + version 4, i.e a "presigned url" signer. + Based off of: + http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html + """ + + # For S3, we do not normalize the path. + _USE_DOUBLE_URI_ENCODE = False + _SHOULD_NORMALIZE_URI_PATH = False + + def _should_sha256_sign_payload(self, request): + # From the doc link above: + # "You don't include a payload hash in the Canonical Request, because + # when you create a presigned URL, you don't know anything about the + # payload. Instead, you use a constant string "UNSIGNED-PAYLOAD". + return False + + def _should_add_content_sha256_header(self, explicit_payload): + # Never add X-Amz-Content-SHA256 header + return False + + +# Defined at the bottom of module to ensure all Auth +# classes are defined. +CRT_AUTH_TYPE_MAPS = { + 'v4': CrtSigV4Auth, + 'v4-query': CrtSigV4QueryAuth, + 's3v4': CrtS3SigV4Auth, + 's3v4-query': CrtS3SigV4QueryAuth, +} diff --git a/setup.cfg b/setup.cfg index 26da11c0de..2397f9d674 100644 --- a/setup.cfg +++ b/setup.cfg @@ -6,3 +6,4 @@ requires_dist = python-dateutil>=2.1,<3.0.0 jmespath>=0.7.1,<1.0.0 urllib3>=1.25.4,<1.27 + awscrt==0.11.24 diff --git a/setup.py b/setup.py index e04f0ae07c..75ec1f7fb4 100644 --- a/setup.py +++ b/setup.py @@ -27,6 +27,7 @@ def find_version(*file_paths): 'jmespath>=0.7.1,<1.0.0', 'python-dateutil>=2.1,<3.0.0', 'urllib3>=1.25.4,<1.27', + 'awscrt==0.11.24', ] diff --git a/tests/unit/auth/aws4_testsuite/LICENSE b/tests/unit/auth/aws4_testsuite/LICENSE new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/tests/unit/auth/aws4_testsuite/NOTICE b/tests/unit/auth/aws4_testsuite/NOTICE new file mode 100644 index 0000000000..a0821aefa0 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/NOTICE @@ -0,0 +1,2 @@ +AWS Signature Version 4 Test Suite +Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/tests/unit/auth/aws4_testsuite/get-header-key-duplicate.authz b/tests/unit/auth/aws4_testsuite/get-header-key-duplicate.authz deleted file mode 100644 index ac05e355f3..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-header-key-duplicate.authz +++ /dev/null @@ -1 +0,0 @@ -AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host;zoo, Signature=54afcaaf45b331f81cd2edb974f7b824ff4dd594cbbaa945ed636b48477368ed \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-header-key-duplicate.creq b/tests/unit/auth/aws4_testsuite/get-header-key-duplicate.creq deleted file mode 100644 index ee898f78a4..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-header-key-duplicate.creq +++ /dev/null @@ -1,9 +0,0 @@ -POST -/ - -date:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com -zoo:foobar,zoobar,zoobar - -date;host;zoo -e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-header-key-duplicate.req b/tests/unit/auth/aws4_testsuite/get-header-key-duplicate.req deleted file mode 100644 index a2b039ae34..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-header-key-duplicate.req +++ /dev/null @@ -1,7 +0,0 @@ -POST / http/1.1 -DATE:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com -ZOO:zoobar -zoo:foobar -zoo:zoobar - diff --git a/tests/unit/auth/aws4_testsuite/get-header-key-duplicate.sreq b/tests/unit/auth/aws4_testsuite/get-header-key-duplicate.sreq deleted file mode 100644 index 72bae43430..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-header-key-duplicate.sreq +++ /dev/null @@ -1,8 +0,0 @@ -POST / http/1.1 -DATE:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com -ZOO:zoobar -zoo:foobar -zoo:zoobar -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host;zoo, Signature=54afcaaf45b331f81cd2edb974f7b824ff4dd594cbbaa945ed636b48477368ed - diff --git a/tests/unit/auth/aws4_testsuite/get-header-key-duplicate.sts b/tests/unit/auth/aws4_testsuite/get-header-key-duplicate.sts deleted file mode 100644 index 64b7ff9587..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-header-key-duplicate.sts +++ /dev/null @@ -1,4 +0,0 @@ -AWS4-HMAC-SHA256 -20110909T233600Z -20110909/us-east-1/host/aws4_request -3c52f0eaae2b61329c0a332e3fa15842a37bc5812cf4d80eb64784308850e313 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-header-key-duplicate/get-header-key-duplicate.authz b/tests/unit/auth/aws4_testsuite/get-header-key-duplicate/get-header-key-duplicate.authz new file mode 100644 index 0000000000..ade3ec7537 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-header-key-duplicate/get-header-key-duplicate.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=c9d5ea9f3f72853aea855b47ea873832890dbdd183b4468f858259531a5138ea \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-header-key-duplicate/get-header-key-duplicate.creq b/tests/unit/auth/aws4_testsuite/get-header-key-duplicate/get-header-key-duplicate.creq new file mode 100644 index 0000000000..fa8f49a1cf --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-header-key-duplicate/get-header-key-duplicate.creq @@ -0,0 +1,9 @@ +GET +/ + +host:example.amazonaws.com +my-header1:value2,value2,value1 +x-amz-date:20150830T123600Z + +host;my-header1;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-header-key-duplicate/get-header-key-duplicate.req b/tests/unit/auth/aws4_testsuite/get-header-key-duplicate/get-header-key-duplicate.req new file mode 100644 index 0000000000..08a0364c82 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-header-key-duplicate/get-header-key-duplicate.req @@ -0,0 +1,6 @@ +GET / HTTP/1.1 +Host:example.amazonaws.com +My-Header1:value2 +My-Header1:value2 +My-Header1:value1 +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-header-key-duplicate/get-header-key-duplicate.sreq b/tests/unit/auth/aws4_testsuite/get-header-key-duplicate/get-header-key-duplicate.sreq new file mode 100644 index 0000000000..f0166e18c2 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-header-key-duplicate/get-header-key-duplicate.sreq @@ -0,0 +1,7 @@ +GET / HTTP/1.1 +Host:example.amazonaws.com +My-Header1:value2 +My-Header1:value2 +My-Header1:value1 +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=c9d5ea9f3f72853aea855b47ea873832890dbdd183b4468f858259531a5138ea \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-header-key-duplicate/get-header-key-duplicate.sts b/tests/unit/auth/aws4_testsuite/get-header-key-duplicate/get-header-key-duplicate.sts new file mode 100644 index 0000000000..48a135eced --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-header-key-duplicate/get-header-key-duplicate.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +dc7f04a3abfde8d472b0ab1a418b741b7c67174dad1551b4117b15527fbe966c \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-header-value-multiline/get-header-value-multiline.authz b/tests/unit/auth/aws4_testsuite/get-header-value-multiline/get-header-value-multiline.authz new file mode 100644 index 0000000000..9f455693b0 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-header-value-multiline/get-header-value-multiline.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=cfd34249e4b1c8d6b91ef74165d41a32e5fab3306300901bb65a51a73575eefd \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-header-value-multiline/get-header-value-multiline.creq b/tests/unit/auth/aws4_testsuite/get-header-value-multiline/get-header-value-multiline.creq new file mode 100644 index 0000000000..8cb54769dd --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-header-value-multiline/get-header-value-multiline.creq @@ -0,0 +1,9 @@ +GET +/ + +host:example.amazonaws.com +my-header1:value1 value2 value3 +x-amz-date:20150830T123600Z + +host;my-header1;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-header-value-multiline/get-header-value-multiline.req b/tests/unit/auth/aws4_testsuite/get-header-value-multiline/get-header-value-multiline.req new file mode 100644 index 0000000000..7caa6acc23 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-header-value-multiline/get-header-value-multiline.req @@ -0,0 +1,6 @@ +GET / HTTP/1.1 +Host:example.amazonaws.com +My-Header1:value1 + value2 + value3 +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-header-value-multiline/get-header-value-multiline.sreq b/tests/unit/auth/aws4_testsuite/get-header-value-multiline/get-header-value-multiline.sreq new file mode 100644 index 0000000000..49513e3bd5 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-header-value-multiline/get-header-value-multiline.sreq @@ -0,0 +1,7 @@ +GET / HTTP/1.1 +Host:example.amazonaws.com +My-Header1:value1 + value2 + value3 +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=cfd34249e4b1c8d6b91ef74165d41a32e5fab3306300901bb65a51a73575eefd \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-header-value-multiline/get-header-value-multiline.sts b/tests/unit/auth/aws4_testsuite/get-header-value-multiline/get-header-value-multiline.sts new file mode 100644 index 0000000000..97c7430991 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-header-value-multiline/get-header-value-multiline.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +e99419459a677bc11de234014be3c4e72c1ea5b454ceb58b613061f5d7a162e8 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-header-value-order.authz b/tests/unit/auth/aws4_testsuite/get-header-value-order.authz deleted file mode 100644 index c80262a698..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-header-value-order.authz +++ /dev/null @@ -1 +0,0 @@ -AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host;p, Signature=d2973954263943b11624a11d1c963ca81fb274169c7868b2858c04f083199e3d \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-header-value-order.creq b/tests/unit/auth/aws4_testsuite/get-header-value-order.creq deleted file mode 100644 index 3655ad6235..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-header-value-order.creq +++ /dev/null @@ -1,9 +0,0 @@ -POST -/ - -date:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com -p:a,a,p,z - -date;host;p -e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-header-value-order.req b/tests/unit/auth/aws4_testsuite/get-header-value-order.req deleted file mode 100644 index 795fdb8cfc..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-header-value-order.req +++ /dev/null @@ -1,8 +0,0 @@ -POST / http/1.1 -DATE:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com -p:z -p:a -p:p -p:a - diff --git a/tests/unit/auth/aws4_testsuite/get-header-value-order.sreq b/tests/unit/auth/aws4_testsuite/get-header-value-order.sreq deleted file mode 100644 index 8b2531fd06..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-header-value-order.sreq +++ /dev/null @@ -1,9 +0,0 @@ -POST / http/1.1 -DATE:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com -p:z -p:a -p:p -p:a -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host;p, Signature=d2973954263943b11624a11d1c963ca81fb274169c7868b2858c04f083199e3d - diff --git a/tests/unit/auth/aws4_testsuite/get-header-value-order.sts b/tests/unit/auth/aws4_testsuite/get-header-value-order.sts deleted file mode 100644 index 76b1b8e383..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-header-value-order.sts +++ /dev/null @@ -1,4 +0,0 @@ -AWS4-HMAC-SHA256 -20110909T233600Z -20110909/us-east-1/host/aws4_request -94c0389fefe0988cbbedc8606f0ca0b485b48da010d09fc844b45b697c8924fe \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-header-value-order/get-header-value-order.authz b/tests/unit/auth/aws4_testsuite/get-header-value-order/get-header-value-order.authz new file mode 100644 index 0000000000..c0409ab2a3 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-header-value-order/get-header-value-order.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=08c7e5a9acfcfeb3ab6b2185e75ce8b1deb5e634ec47601a50643f830c755c01 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-header-value-order/get-header-value-order.creq b/tests/unit/auth/aws4_testsuite/get-header-value-order/get-header-value-order.creq new file mode 100644 index 0000000000..e336bc94b9 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-header-value-order/get-header-value-order.creq @@ -0,0 +1,9 @@ +GET +/ + +host:example.amazonaws.com +my-header1:value4,value1,value3,value2 +x-amz-date:20150830T123600Z + +host;my-header1;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-header-value-order/get-header-value-order.req b/tests/unit/auth/aws4_testsuite/get-header-value-order/get-header-value-order.req new file mode 100644 index 0000000000..f7bd9e6685 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-header-value-order/get-header-value-order.req @@ -0,0 +1,7 @@ +GET / HTTP/1.1 +Host:example.amazonaws.com +My-Header1:value4 +My-Header1:value1 +My-Header1:value3 +My-Header1:value2 +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-header-value-order/get-header-value-order.sreq b/tests/unit/auth/aws4_testsuite/get-header-value-order/get-header-value-order.sreq new file mode 100644 index 0000000000..79e16a9537 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-header-value-order/get-header-value-order.sreq @@ -0,0 +1,8 @@ +GET / HTTP/1.1 +Host:example.amazonaws.com +My-Header1:value4 +My-Header1:value1 +My-Header1:value3 +My-Header1:value2 +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=08c7e5a9acfcfeb3ab6b2185e75ce8b1deb5e634ec47601a50643f830c755c01 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-header-value-order/get-header-value-order.sts b/tests/unit/auth/aws4_testsuite/get-header-value-order/get-header-value-order.sts new file mode 100644 index 0000000000..711a8d4d69 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-header-value-order/get-header-value-order.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +31ce73cd3f3d9f66977ad3dd957dc47af14df92fcd8509f59b349e9137c58b86 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-header-value-trim.authz b/tests/unit/auth/aws4_testsuite/get-header-value-trim.authz deleted file mode 100644 index 2d870cc079..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-header-value-trim.authz +++ /dev/null @@ -1 +0,0 @@ -AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host;p, Signature=debf546796015d6f6ded8626f5ce98597c33b47b9164cf6b17b4642036fcb592 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-header-value-trim.creq b/tests/unit/auth/aws4_testsuite/get-header-value-trim.creq deleted file mode 100644 index 02555106d7..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-header-value-trim.creq +++ /dev/null @@ -1,9 +0,0 @@ -POST -/ - -date:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com -p:phfft - -date;host;p -e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-header-value-trim.req b/tests/unit/auth/aws4_testsuite/get-header-value-trim.req deleted file mode 100644 index eedd9c5db9..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-header-value-trim.req +++ /dev/null @@ -1,5 +0,0 @@ -POST / http/1.1 -DATE:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com -p: phfft - diff --git a/tests/unit/auth/aws4_testsuite/get-header-value-trim.sreq b/tests/unit/auth/aws4_testsuite/get-header-value-trim.sreq deleted file mode 100644 index 3c6a38ef7c..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-header-value-trim.sreq +++ /dev/null @@ -1,6 +0,0 @@ -POST / http/1.1 -DATE:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com -p: phfft -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host;p, Signature=debf546796015d6f6ded8626f5ce98597c33b47b9164cf6b17b4642036fcb592 - diff --git a/tests/unit/auth/aws4_testsuite/get-header-value-trim.sts b/tests/unit/auth/aws4_testsuite/get-header-value-trim.sts deleted file mode 100644 index 27cc5441d3..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-header-value-trim.sts +++ /dev/null @@ -1,4 +0,0 @@ -AWS4-HMAC-SHA256 -20110909T233600Z -20110909/us-east-1/host/aws4_request -dddd1902add08da1ac94782b05f9278c08dc7468db178a84f8950d93b30b1f35 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-header-value-trim/get-header-value-trim.authz b/tests/unit/auth/aws4_testsuite/get-header-value-trim/get-header-value-trim.authz new file mode 100644 index 0000000000..4874ac0b1f --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-header-value-trim/get-header-value-trim.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;my-header2;x-amz-date, Signature=acc3ed3afb60bb290fc8d2dd0098b9911fcaa05412b367055dee359757a9c736 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-header-value-trim/get-header-value-trim.creq b/tests/unit/auth/aws4_testsuite/get-header-value-trim/get-header-value-trim.creq new file mode 100644 index 0000000000..a59087c9a4 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-header-value-trim/get-header-value-trim.creq @@ -0,0 +1,10 @@ +GET +/ + +host:example.amazonaws.com +my-header1:value1 +my-header2:"a b c" +x-amz-date:20150830T123600Z + +host;my-header1;my-header2;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-header-value-trim/get-header-value-trim.req b/tests/unit/auth/aws4_testsuite/get-header-value-trim/get-header-value-trim.req new file mode 100644 index 0000000000..901f36c359 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-header-value-trim/get-header-value-trim.req @@ -0,0 +1,5 @@ +GET / HTTP/1.1 +Host:example.amazonaws.com +My-Header1: value1 +My-Header2: "a b c" +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-header-value-trim/get-header-value-trim.sreq b/tests/unit/auth/aws4_testsuite/get-header-value-trim/get-header-value-trim.sreq new file mode 100644 index 0000000000..98224c9bde --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-header-value-trim/get-header-value-trim.sreq @@ -0,0 +1,6 @@ +GET / HTTP/1.1 +Host:example.amazonaws.com +My-Header1: value1 +My-Header2: "a b c" +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;my-header2;x-amz-date, Signature=acc3ed3afb60bb290fc8d2dd0098b9911fcaa05412b367055dee359757a9c736 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-header-value-trim/get-header-value-trim.sts b/tests/unit/auth/aws4_testsuite/get-header-value-trim/get-header-value-trim.sts new file mode 100644 index 0000000000..a0b15cc704 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-header-value-trim/get-header-value-trim.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +a726db9b0df21c14f559d0a978e563112acb1b9e05476f0a6a1c7d68f28605c7 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-relative-relative.authz b/tests/unit/auth/aws4_testsuite/get-relative-relative.authz deleted file mode 100644 index 06bd81300e..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-relative-relative.authz +++ /dev/null @@ -1 +0,0 @@ -AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=b27ccfbfa7df52a200ff74193ca6e32d4b48b8856fab7ebf1c595d0670a7e470 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-relative-relative.req b/tests/unit/auth/aws4_testsuite/get-relative-relative.req deleted file mode 100644 index cd49cc99f4..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-relative-relative.req +++ /dev/null @@ -1,4 +0,0 @@ -GET /foo/bar/../.. http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com - diff --git a/tests/unit/auth/aws4_testsuite/get-relative-relative.sreq b/tests/unit/auth/aws4_testsuite/get-relative-relative.sreq deleted file mode 100644 index 1889ce7fe4..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-relative-relative.sreq +++ /dev/null @@ -1,5 +0,0 @@ -GET /foo/bar/../.. http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=b27ccfbfa7df52a200ff74193ca6e32d4b48b8856fab7ebf1c595d0670a7e470 - diff --git a/tests/unit/auth/aws4_testsuite/get-relative-relative.sts b/tests/unit/auth/aws4_testsuite/get-relative-relative.sts deleted file mode 100644 index f5b8bbe5e7..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-relative-relative.sts +++ /dev/null @@ -1,4 +0,0 @@ -AWS4-HMAC-SHA256 -20110909T233600Z -20110909/us-east-1/host/aws4_request -366b91fb121d72a00f46bbe8d395f53a102b06dfb7e79636515208ed3fa606b1 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-relative.authz b/tests/unit/auth/aws4_testsuite/get-relative.authz deleted file mode 100644 index 06bd81300e..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-relative.authz +++ /dev/null @@ -1 +0,0 @@ -AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=b27ccfbfa7df52a200ff74193ca6e32d4b48b8856fab7ebf1c595d0670a7e470 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-relative.req b/tests/unit/auth/aws4_testsuite/get-relative.req deleted file mode 100644 index d9b1610da3..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-relative.req +++ /dev/null @@ -1,4 +0,0 @@ -GET /foo/.. http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com - diff --git a/tests/unit/auth/aws4_testsuite/get-relative.sreq b/tests/unit/auth/aws4_testsuite/get-relative.sreq deleted file mode 100644 index ceae4e5029..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-relative.sreq +++ /dev/null @@ -1,5 +0,0 @@ -GET /foo/.. http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=b27ccfbfa7df52a200ff74193ca6e32d4b48b8856fab7ebf1c595d0670a7e470 - diff --git a/tests/unit/auth/aws4_testsuite/get-relative.sts b/tests/unit/auth/aws4_testsuite/get-relative.sts deleted file mode 100644 index f5b8bbe5e7..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-relative.sts +++ /dev/null @@ -1,4 +0,0 @@ -AWS4-HMAC-SHA256 -20110909T233600Z -20110909/us-east-1/host/aws4_request -366b91fb121d72a00f46bbe8d395f53a102b06dfb7e79636515208ed3fa606b1 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-slash-dot-slash.authz b/tests/unit/auth/aws4_testsuite/get-slash-dot-slash.authz deleted file mode 100644 index 06bd81300e..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-slash-dot-slash.authz +++ /dev/null @@ -1 +0,0 @@ -AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=b27ccfbfa7df52a200ff74193ca6e32d4b48b8856fab7ebf1c595d0670a7e470 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-slash-dot-slash.req b/tests/unit/auth/aws4_testsuite/get-slash-dot-slash.req deleted file mode 100644 index 3d31b71e9d..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-slash-dot-slash.req +++ /dev/null @@ -1,4 +0,0 @@ -GET /./ http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com - diff --git a/tests/unit/auth/aws4_testsuite/get-slash-dot-slash.sreq b/tests/unit/auth/aws4_testsuite/get-slash-dot-slash.sreq deleted file mode 100644 index 24bd8eae89..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-slash-dot-slash.sreq +++ /dev/null @@ -1,5 +0,0 @@ -GET /./ http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=b27ccfbfa7df52a200ff74193ca6e32d4b48b8856fab7ebf1c595d0670a7e470 - diff --git a/tests/unit/auth/aws4_testsuite/get-slash-dot-slash.sts b/tests/unit/auth/aws4_testsuite/get-slash-dot-slash.sts deleted file mode 100644 index f5b8bbe5e7..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-slash-dot-slash.sts +++ /dev/null @@ -1,4 +0,0 @@ -AWS4-HMAC-SHA256 -20110909T233600Z -20110909/us-east-1/host/aws4_request -366b91fb121d72a00f46bbe8d395f53a102b06dfb7e79636515208ed3fa606b1 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-slash-pointless-dot.authz b/tests/unit/auth/aws4_testsuite/get-slash-pointless-dot.authz deleted file mode 100644 index ffa78cf7f4..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-slash-pointless-dot.authz +++ /dev/null @@ -1 +0,0 @@ -AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=910e4d6c9abafaf87898e1eb4c929135782ea25bb0279703146455745391e63a \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-slash-pointless-dot.creq b/tests/unit/auth/aws4_testsuite/get-slash-pointless-dot.creq deleted file mode 100644 index 1ef5be2e71..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-slash-pointless-dot.creq +++ /dev/null @@ -1,8 +0,0 @@ -GET -/foo - -date:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com - -date;host -e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-slash-pointless-dot.req b/tests/unit/auth/aws4_testsuite/get-slash-pointless-dot.req deleted file mode 100644 index a74d988c8c..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-slash-pointless-dot.req +++ /dev/null @@ -1,4 +0,0 @@ -GET /./foo http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com - diff --git a/tests/unit/auth/aws4_testsuite/get-slash-pointless-dot.sreq b/tests/unit/auth/aws4_testsuite/get-slash-pointless-dot.sreq deleted file mode 100644 index 27908e75df..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-slash-pointless-dot.sreq +++ /dev/null @@ -1,5 +0,0 @@ -GET /./foo http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=910e4d6c9abafaf87898e1eb4c929135782ea25bb0279703146455745391e63a - diff --git a/tests/unit/auth/aws4_testsuite/get-slash-pointless-dot.sts b/tests/unit/auth/aws4_testsuite/get-slash-pointless-dot.sts deleted file mode 100644 index d4fed40e46..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-slash-pointless-dot.sts +++ /dev/null @@ -1,4 +0,0 @@ -AWS4-HMAC-SHA256 -20110909T233600Z -20110909/us-east-1/host/aws4_request -8021a97572ee460f87ca67f4e8c0db763216d84715f5424a843a5312a3321e2d \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-slash.authz b/tests/unit/auth/aws4_testsuite/get-slash.authz deleted file mode 100644 index 06bd81300e..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-slash.authz +++ /dev/null @@ -1 +0,0 @@ -AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=b27ccfbfa7df52a200ff74193ca6e32d4b48b8856fab7ebf1c595d0670a7e470 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-slash.req b/tests/unit/auth/aws4_testsuite/get-slash.req deleted file mode 100644 index 1797eb76b6..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-slash.req +++ /dev/null @@ -1,4 +0,0 @@ -GET // http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com - diff --git a/tests/unit/auth/aws4_testsuite/get-slash.sreq b/tests/unit/auth/aws4_testsuite/get-slash.sreq deleted file mode 100644 index d82981d0d3..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-slash.sreq +++ /dev/null @@ -1,5 +0,0 @@ -GET // http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=b27ccfbfa7df52a200ff74193ca6e32d4b48b8856fab7ebf1c595d0670a7e470 - diff --git a/tests/unit/auth/aws4_testsuite/get-slash.sts b/tests/unit/auth/aws4_testsuite/get-slash.sts deleted file mode 100644 index f5b8bbe5e7..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-slash.sts +++ /dev/null @@ -1,4 +0,0 @@ -AWS4-HMAC-SHA256 -20110909T233600Z -20110909/us-east-1/host/aws4_request -366b91fb121d72a00f46bbe8d395f53a102b06dfb7e79636515208ed3fa606b1 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-slashes.authz b/tests/unit/auth/aws4_testsuite/get-slashes.authz deleted file mode 100644 index 9c720f3474..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-slashes.authz +++ /dev/null @@ -1 +0,0 @@ -AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=b00392262853cfe3201e47ccf945601079e9b8a7f51ee4c3d9ee4f187aa9bf19 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-slashes.creq b/tests/unit/auth/aws4_testsuite/get-slashes.creq deleted file mode 100644 index 7bfb9997b4..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-slashes.creq +++ /dev/null @@ -1,8 +0,0 @@ -GET -/foo/ - -date:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com - -date;host -e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-slashes.req b/tests/unit/auth/aws4_testsuite/get-slashes.req deleted file mode 100644 index 56f323278c..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-slashes.req +++ /dev/null @@ -1,4 +0,0 @@ -GET //foo// http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com - diff --git a/tests/unit/auth/aws4_testsuite/get-slashes.sreq b/tests/unit/auth/aws4_testsuite/get-slashes.sreq deleted file mode 100644 index e1aa5a4a63..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-slashes.sreq +++ /dev/null @@ -1,5 +0,0 @@ -GET //foo// http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=b00392262853cfe3201e47ccf945601079e9b8a7f51ee4c3d9ee4f187aa9bf19 - diff --git a/tests/unit/auth/aws4_testsuite/get-slashes.sts b/tests/unit/auth/aws4_testsuite/get-slashes.sts deleted file mode 100644 index 721628afa9..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-slashes.sts +++ /dev/null @@ -1,4 +0,0 @@ -AWS4-HMAC-SHA256 -20110909T233600Z -20110909/us-east-1/host/aws4_request -6bb4476ee8745730c9cb79f33a0c70baa6d8af29c0077fa12e4e8f1dd17e7098 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-space.authz b/tests/unit/auth/aws4_testsuite/get-space.authz deleted file mode 100644 index 2b3e745924..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-space.authz +++ /dev/null @@ -1 +0,0 @@ -AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=2be9e587d1ee1f0fd02128724b86b4358ba3630d39f493b6e06610a19a50779e \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-space.creq b/tests/unit/auth/aws4_testsuite/get-space.creq deleted file mode 100644 index 3da7362767..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-space.creq +++ /dev/null @@ -1,8 +0,0 @@ -GET -/%2520/foo - -date:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com - -date;host -e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-space.req b/tests/unit/auth/aws4_testsuite/get-space.req deleted file mode 100644 index aad5a16fe9..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-space.req +++ /dev/null @@ -1,4 +0,0 @@ -GET /%20/foo http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com - diff --git a/tests/unit/auth/aws4_testsuite/get-space.sreq b/tests/unit/auth/aws4_testsuite/get-space.sreq deleted file mode 100644 index be3411b075..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-space.sreq +++ /dev/null @@ -1,5 +0,0 @@ -GET /%20/foo http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=f309cfbd10197a230c42dd17dbf5cca8a0722564cb40a872d25623cfa758e374 - diff --git a/tests/unit/auth/aws4_testsuite/get-space.sts b/tests/unit/auth/aws4_testsuite/get-space.sts deleted file mode 100644 index 253063437f..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-space.sts +++ /dev/null @@ -1,4 +0,0 @@ -AWS4-HMAC-SHA256 -20110909T233600Z -20110909/us-east-1/host/aws4_request -35975885599128f8963ce9be7219598b2b5a344321bae304529556c891e9e6ba \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-unreserved.authz b/tests/unit/auth/aws4_testsuite/get-unreserved.authz deleted file mode 100644 index 99d2016103..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-unreserved.authz +++ /dev/null @@ -1 +0,0 @@ -AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=830cc36d03f0f84e6ee4953fbe701c1c8b71a0372c63af9255aa364dd183281e \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-unreserved.req b/tests/unit/auth/aws4_testsuite/get-unreserved.req deleted file mode 100644 index a23f6a462d..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-unreserved.req +++ /dev/null @@ -1,4 +0,0 @@ -GET /-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com - diff --git a/tests/unit/auth/aws4_testsuite/get-unreserved.sreq b/tests/unit/auth/aws4_testsuite/get-unreserved.sreq deleted file mode 100644 index fa941a7459..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-unreserved.sreq +++ /dev/null @@ -1,5 +0,0 @@ -GET /-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=830cc36d03f0f84e6ee4953fbe701c1c8b71a0372c63af9255aa364dd183281e - diff --git a/tests/unit/auth/aws4_testsuite/get-unreserved.sts b/tests/unit/auth/aws4_testsuite/get-unreserved.sts deleted file mode 100644 index 3a293dad01..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-unreserved.sts +++ /dev/null @@ -1,4 +0,0 @@ -AWS4-HMAC-SHA256 -20110909T233600Z -20110909/us-east-1/host/aws4_request -df63ee3247c0356c696a3b21f8d8490b01fa9cd5bc6550ef5ef5f4636b7b8901 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-unreserved/get-unreserved.authz b/tests/unit/auth/aws4_testsuite/get-unreserved/get-unreserved.authz new file mode 100644 index 0000000000..2943ec89d2 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-unreserved/get-unreserved.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=07ef7494c76fa4850883e2b006601f940f8a34d404d0cfa977f52a65bbf5f24f \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-unreserved.creq b/tests/unit/auth/aws4_testsuite/get-unreserved/get-unreserved.creq similarity index 66% rename from tests/unit/auth/aws4_testsuite/get-unreserved.creq rename to tests/unit/auth/aws4_testsuite/get-unreserved/get-unreserved.creq index 2ba315fc7b..8af54df27e 100644 --- a/tests/unit/auth/aws4_testsuite/get-unreserved.creq +++ b/tests/unit/auth/aws4_testsuite/get-unreserved/get-unreserved.creq @@ -1,8 +1,8 @@ -GET -/-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz - -date:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com - -date;host +GET +/-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz + +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-unreserved/get-unreserved.req b/tests/unit/auth/aws4_testsuite/get-unreserved/get-unreserved.req new file mode 100644 index 0000000000..da760cdb32 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-unreserved/get-unreserved.req @@ -0,0 +1,3 @@ +GET /-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-unreserved/get-unreserved.sreq b/tests/unit/auth/aws4_testsuite/get-unreserved/get-unreserved.sreq new file mode 100644 index 0000000000..8001b3d6b5 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-unreserved/get-unreserved.sreq @@ -0,0 +1,4 @@ +GET /-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=07ef7494c76fa4850883e2b006601f940f8a34d404d0cfa977f52a65bbf5f24f \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-unreserved/get-unreserved.sts b/tests/unit/auth/aws4_testsuite/get-unreserved/get-unreserved.sts new file mode 100644 index 0000000000..e9dc541460 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-unreserved/get-unreserved.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +6a968768eefaa713e2a6b16b589a8ea192661f098f37349f4e2c0082757446f9 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-utf8.authz b/tests/unit/auth/aws4_testsuite/get-utf8.authz deleted file mode 100644 index 584bac518d..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-utf8.authz +++ /dev/null @@ -1 +0,0 @@ -AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=57b1eb3df3b16a8479c0097b66c0b261cfd65b829419a3f2c3d05319722490b8 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-utf8.creq b/tests/unit/auth/aws4_testsuite/get-utf8.creq deleted file mode 100644 index e146d7ed10..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-utf8.creq +++ /dev/null @@ -1,8 +0,0 @@ -GET -/%25E1%2588%25B4 - -date:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com - -date;host -e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-utf8.req b/tests/unit/auth/aws4_testsuite/get-utf8.req deleted file mode 100644 index e9c45cb744..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-utf8.req +++ /dev/null @@ -1,4 +0,0 @@ -GET /%E1%88%B4 http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com - diff --git a/tests/unit/auth/aws4_testsuite/get-utf8.sreq b/tests/unit/auth/aws4_testsuite/get-utf8.sreq deleted file mode 100644 index b348afa4c3..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-utf8.sreq +++ /dev/null @@ -1,5 +0,0 @@ -GET /%E1%88%B4 http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=8d6634c189aa8c75c2e51e106b6b5121bed103fdb351f7d7d4381c738823af74 - diff --git a/tests/unit/auth/aws4_testsuite/get-utf8.sts b/tests/unit/auth/aws4_testsuite/get-utf8.sts deleted file mode 100644 index dbea34252b..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-utf8.sts +++ /dev/null @@ -1,4 +0,0 @@ -AWS4-HMAC-SHA256 -20110909T233600Z -20110909/us-east-1/host/aws4_request -47f4456c465167f4db3490a68903fe057412e6e030de38f71d9006467eb4922a \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-utf8/get-utf8.authz b/tests/unit/auth/aws4_testsuite/get-utf8/get-utf8.authz new file mode 100644 index 0000000000..738b3fbd86 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-utf8/get-utf8.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=8318018e0b0f223aa2bbf98705b62bb787dc9c0e678f255a891fd03141be5d85 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-utf8/get-utf8.creq b/tests/unit/auth/aws4_testsuite/get-utf8/get-utf8.creq new file mode 100644 index 0000000000..5d4b9f619d --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-utf8/get-utf8.creq @@ -0,0 +1,8 @@ +GET +/%E1%88%B4 + +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-utf8/get-utf8.req b/tests/unit/auth/aws4_testsuite/get-utf8/get-utf8.req new file mode 100644 index 0000000000..da4808d0bc --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-utf8/get-utf8.req @@ -0,0 +1,3 @@ +GET /ሴ HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-utf8/get-utf8.sreq b/tests/unit/auth/aws4_testsuite/get-utf8/get-utf8.sreq new file mode 100644 index 0000000000..94eadb6d2b --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-utf8/get-utf8.sreq @@ -0,0 +1,4 @@ +GET /ሴ HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=8318018e0b0f223aa2bbf98705b62bb787dc9c0e678f255a891fd03141be5d85 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-utf8/get-utf8.sts b/tests/unit/auth/aws4_testsuite/get-utf8/get-utf8.sts new file mode 100644 index 0000000000..5edc8f456b --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-utf8/get-utf8.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +2a0a97d02205e45ce2e994789806b19270cfbbb0921b278ccf58f5249ac42102 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key.authz b/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key.authz deleted file mode 100644 index cb7a1cc7d5..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key.authz +++ /dev/null @@ -1 +0,0 @@ -AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=56c054473fd260c13e4e7393eb203662195f5d4a1fada5314b8b52b23f985e9f \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key.creq b/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key.creq deleted file mode 100644 index 0f6a483c41..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key.creq +++ /dev/null @@ -1,8 +0,0 @@ -GET -/ -foo=bar -date:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com - -date;host -e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key.req b/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key.req deleted file mode 100644 index 5f54fba79e..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key.req +++ /dev/null @@ -1,4 +0,0 @@ -GET /?foo=bar http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com - diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key.sreq b/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key.sreq deleted file mode 100644 index 32d45afbc7..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key.sreq +++ /dev/null @@ -1,5 +0,0 @@ -GET /?foo=bar http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=56c054473fd260c13e4e7393eb203662195f5d4a1fada5314b8b52b23f985e9f - diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key.sts b/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key.sts deleted file mode 100644 index 59fbf6552b..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key.sts +++ /dev/null @@ -1,4 +0,0 @@ -AWS4-HMAC-SHA256 -20110909T233600Z -20110909/us-east-1/host/aws4_request -0846c2945b0832deb7a463c66af5c4f8bd54ec28c438e67a214445b157c9ddf8 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.authz b/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.authz new file mode 100644 index 0000000000..65b5c7ce4e --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=a67d582fa61cc504c4bae71f336f98b97f1ea3c7a6bfe1b6e45aec72011b9aeb \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.creq b/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.creq new file mode 100644 index 0000000000..c6cdceda17 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.creq @@ -0,0 +1,8 @@ +GET +/ +Param1=value1 +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.req b/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.req new file mode 100644 index 0000000000..970d0a050e --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.req @@ -0,0 +1,3 @@ +GET /?Param1=value1 HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.sreq b/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.sreq new file mode 100644 index 0000000000..f0815913fb --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.sreq @@ -0,0 +1,4 @@ +GET /?Param1=value1 HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=a67d582fa61cc504c4bae71f336f98b97f1ea3c7a6bfe1b6e45aec72011b9aeb \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.sts b/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.sts new file mode 100644 index 0000000000..c4ed216c13 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +1e24db194ed7d0eec2de28d7369675a243488e08526e8c1c73571282f7c517ab \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-encoded/get-vanilla-query-order-encoded.authz b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-encoded/get-vanilla-query-order-encoded.authz new file mode 100644 index 0000000000..99e9725717 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-encoded/get-vanilla-query-order-encoded.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=371d3713e185cc334048618a97f809c9ffe339c62934c032af5a0e595648fcac \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-encoded/get-vanilla-query-order-encoded.creq b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-encoded/get-vanilla-query-order-encoded.creq new file mode 100644 index 0000000000..0c8ba21f3d --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-encoded/get-vanilla-query-order-encoded.creq @@ -0,0 +1,8 @@ +GET +/ +%E1%88%B4=Value1&Param=Value2&Param-3=Value3 +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-encoded/get-vanilla-query-order-encoded.req b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-encoded/get-vanilla-query-order-encoded.req new file mode 100644 index 0000000000..c539437dde --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-encoded/get-vanilla-query-order-encoded.req @@ -0,0 +1,3 @@ +GET /?Param-3=Value3&Param=Value2&%E1%88%B4=Value1 HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-encoded/get-vanilla-query-order-encoded.sreq b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-encoded/get-vanilla-query-order-encoded.sreq new file mode 100644 index 0000000000..7d43616449 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-encoded/get-vanilla-query-order-encoded.sreq @@ -0,0 +1,4 @@ +GET /?Param-3=Value3&Param=Value2&%E1%88%B4=Value1 HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=371d3713e185cc334048618a97f809c9ffe339c62934c032af5a0e595648fcac \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-encoded/get-vanilla-query-order-encoded.sts b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-encoded/get-vanilla-query-order-encoded.sts new file mode 100644 index 0000000000..bf674ad638 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-encoded/get-vanilla-query-order-encoded.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +868294f5c38bd141c4972a373a76654f1418a8e4fc18b2e7903ae45e8ae0ec71 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case.authz b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case.authz deleted file mode 100644 index 10fe960b7d..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case.authz +++ /dev/null @@ -1 +0,0 @@ -AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=be7148d34ebccdc6423b19085378aa0bee970bdc61d144bd1a8c48c33079ab09 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case.creq b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case.creq deleted file mode 100644 index 4f00eb7292..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case.creq +++ /dev/null @@ -1,8 +0,0 @@ -GET -/ -foo=Zoo&foo=aha -date:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com - -date;host -e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case.req b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case.req deleted file mode 100644 index fbe07221e0..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case.req +++ /dev/null @@ -1,4 +0,0 @@ -GET /?foo=Zoo&foo=aha http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com - diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case.sreq b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case.sreq deleted file mode 100644 index 90ed70eee0..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case.sreq +++ /dev/null @@ -1,5 +0,0 @@ -GET /?foo=Zoo&foo=aha http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=be7148d34ebccdc6423b19085378aa0bee970bdc61d144bd1a8c48c33079ab09 - diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case.sts b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case.sts deleted file mode 100644 index a9ca92b8ec..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case.sts +++ /dev/null @@ -1,4 +0,0 @@ -AWS4-HMAC-SHA256 -20110909T233600Z -20110909/us-east-1/host/aws4_request -e25f777ba161a0f1baf778a87faf057187cf5987f17953320e3ca399feb5f00d \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.authz b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.authz new file mode 100644 index 0000000000..c781fe665e --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=b97d918cfa904a5beff61c982a1b6f458b799221646efd99d3219ec94cdf2500 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.creq b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.creq new file mode 100644 index 0000000000..8ae02cd600 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.creq @@ -0,0 +1,8 @@ +GET +/ +Param1=value1&Param2=value2 +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.req b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.req new file mode 100644 index 0000000000..8a56f15f74 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.req @@ -0,0 +1,3 @@ +GET /?Param2=value2&Param1=value1 HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.sreq b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.sreq new file mode 100644 index 0000000000..aa3162d8e9 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.sreq @@ -0,0 +1,4 @@ +GET /?Param2=value2&Param1=value1 HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=b97d918cfa904a5beff61c982a1b6f458b799221646efd99d3219ec94cdf2500 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.sts b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.sts new file mode 100644 index 0000000000..f773de5947 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +816cd5b414d056048ba4f7c5386d6e0533120fb1fcfa93762cf0fc39e2cf19e0 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key.authz b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key.authz deleted file mode 100644 index bc5463ef53..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key.authz +++ /dev/null @@ -1 +0,0 @@ -AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=0dc122f3b28b831ab48ba65cb47300de53fbe91b577fe113edac383730254a3b \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key.creq b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key.creq deleted file mode 100644 index 7dfd7aef03..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key.creq +++ /dev/null @@ -1,8 +0,0 @@ -GET -/ -a=foo&b=foo -date:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com - -date;host -e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key.req b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key.req deleted file mode 100644 index 721e7d3936..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key.req +++ /dev/null @@ -1,4 +0,0 @@ -GET /?a=foo&b=foo http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com - diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key.sreq b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key.sreq deleted file mode 100644 index 4f5ec1968e..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key.sreq +++ /dev/null @@ -1,5 +0,0 @@ -GET /?a=foo&b=foo http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=0dc122f3b28b831ab48ba65cb47300de53fbe91b577fe113edac383730254a3b - diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key.sts b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key.sts deleted file mode 100644 index 84418df0ba..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key.sts +++ /dev/null @@ -1,4 +0,0 @@ -AWS4-HMAC-SHA256 -20110909T233600Z -20110909/us-east-1/host/aws4_request -2f23d14fe13caebf6dfda346285c6d9c14f49eaca8f5ec55c627dd7404f7a727 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key/get-vanilla-query-order-key.authz b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key/get-vanilla-query-order-key.authz new file mode 100644 index 0000000000..812cd3fdf1 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key/get-vanilla-query-order-key.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=eedbc4e291e521cf13422ffca22be7d2eb8146eecf653089df300a15b2382bd1 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key/get-vanilla-query-order-key.creq b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key/get-vanilla-query-order-key.creq new file mode 100644 index 0000000000..36c3cdfaef --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key/get-vanilla-query-order-key.creq @@ -0,0 +1,8 @@ +GET +/ +Param1=Value1&Param1=value2 +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key/get-vanilla-query-order-key.req b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key/get-vanilla-query-order-key.req new file mode 100644 index 0000000000..375a496558 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key/get-vanilla-query-order-key.req @@ -0,0 +1,3 @@ +GET /?Param1=value2&Param1=Value1 HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key/get-vanilla-query-order-key.sreq b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key/get-vanilla-query-order-key.sreq new file mode 100644 index 0000000000..bc8e652013 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key/get-vanilla-query-order-key.sreq @@ -0,0 +1,4 @@ +GET /?Param1=value2&Param1=Value1 HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=eedbc4e291e521cf13422ffca22be7d2eb8146eecf653089df300a15b2382bd1 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key/get-vanilla-query-order-key.sts b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key/get-vanilla-query-order-key.sts new file mode 100644 index 0000000000..fd43a414ce --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-key/get-vanilla-query-order-key.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +704b4cef673542d84cdff252633f065e8daeba5f168b77116f8b1bcaf3d38f89 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value.authz b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value.authz deleted file mode 100644 index 9b96017e1b..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value.authz +++ /dev/null @@ -1 +0,0 @@ -AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=feb926e49e382bec75c9d7dcb2a1b6dc8aa50ca43c25d2bc51143768c0875acc \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value.creq b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value.creq deleted file mode 100644 index 74c900d4aa..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value.creq +++ /dev/null @@ -1,8 +0,0 @@ -GET -/ -foo=a&foo=b -date:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com - -date;host -e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value.req b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value.req deleted file mode 100644 index 9808666db6..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value.req +++ /dev/null @@ -1,4 +0,0 @@ -GET /?foo=b&foo=a http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com - diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value.sreq b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value.sreq deleted file mode 100644 index 10821cf1b9..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value.sreq +++ /dev/null @@ -1,5 +0,0 @@ -GET /?foo=b&foo=a http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=feb926e49e382bec75c9d7dcb2a1b6dc8aa50ca43c25d2bc51143768c0875acc - diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value.sts b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value.sts deleted file mode 100644 index 9f14d91c11..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value.sts +++ /dev/null @@ -1,4 +0,0 @@ -AWS4-HMAC-SHA256 -20110909T233600Z -20110909/us-east-1/host/aws4_request -33dffc220e89131f8f6157a35c40903daa658608d9129ff9489e5cf5bbd9b11b \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value/get-vanilla-query-order-value.authz b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value/get-vanilla-query-order-value.authz new file mode 100644 index 0000000000..b8ad91f661 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value/get-vanilla-query-order-value.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5772eed61e12b33fae39ee5e7012498b51d56abc0abb7c60486157bd471c4694 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value/get-vanilla-query-order-value.creq b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value/get-vanilla-query-order-value.creq new file mode 100644 index 0000000000..26898ebebf --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value/get-vanilla-query-order-value.creq @@ -0,0 +1,8 @@ +GET +/ +Param1=value1&Param1=value2 +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value/get-vanilla-query-order-value.req b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value/get-vanilla-query-order-value.req new file mode 100644 index 0000000000..9255bee055 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value/get-vanilla-query-order-value.req @@ -0,0 +1,3 @@ +GET /?Param1=value2&Param1=value1 HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value/get-vanilla-query-order-value.sreq b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value/get-vanilla-query-order-value.sreq new file mode 100644 index 0000000000..4793e218c3 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value/get-vanilla-query-order-value.sreq @@ -0,0 +1,4 @@ +GET /?Param1=value2&Param1=value1 HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5772eed61e12b33fae39ee5e7012498b51d56abc0abb7c60486157bd471c4694 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value/get-vanilla-query-order-value.sts b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value/get-vanilla-query-order-value.sts new file mode 100644 index 0000000000..90e66b8da5 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-query-order-value/get-vanilla-query-order-value.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +c968629d70850097a2d8781c9bf7edcb988b04cac14cca9be4acc3595f884606 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved.authz b/tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved.authz deleted file mode 100644 index bc28668dfd..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved.authz +++ /dev/null @@ -1 +0,0 @@ -AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=f1498ddb4d6dae767d97c466fb92f1b59a2c71ca29ac954692663f9db03426fb \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved.sreq b/tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved.sreq deleted file mode 100644 index 94b221ef0b..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved.sreq +++ /dev/null @@ -1,5 +0,0 @@ -GET /?-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz=-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=f1498ddb4d6dae767d97c466fb92f1b59a2c71ca29ac954692663f9db03426fb - diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved.sts b/tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved.sts deleted file mode 100644 index d8ce95ef94..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved.sts +++ /dev/null @@ -1,4 +0,0 @@ -AWS4-HMAC-SHA256 -20110909T233600Z -20110909/us-east-1/host/aws4_request -d2578f3156d4c9d180713d1ff20601d8a3eed0dd35447d24603d7d67414bd6b5 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.authz b/tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.authz new file mode 100644 index 0000000000..a44ca5be80 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=9c3e54bfcdf0b19771a7f523ee5669cdf59bc7cc0884027167c21bb143a40197 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved.creq b/tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.creq similarity index 74% rename from tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved.creq rename to tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.creq index ba5d9159bc..5249be3bf8 100644 --- a/tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved.creq +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.creq @@ -1,8 +1,8 @@ -GET -/ --._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz=-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz -date:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com - -date;host +GET +/ +-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz=-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved.req b/tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.req similarity index 61% rename from tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved.req rename to tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.req index a64bb9186c..d2833b32f9 100644 --- a/tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved.req +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.req @@ -1,4 +1,3 @@ -GET /?-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz=-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com - +GET /?-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz=-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.sreq b/tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.sreq new file mode 100644 index 0000000000..ba1ef40235 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.sreq @@ -0,0 +1,4 @@ +GET /?-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz=-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=9c3e54bfcdf0b19771a7f523ee5669cdf59bc7cc0884027167c21bb143a40197 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.sts b/tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.sts new file mode 100644 index 0000000000..24a97d209b --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +c30d4703d9f799439be92736156d47ccfb2d879ddf56f5befa6d1d6aab979177 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query.authz b/tests/unit/auth/aws4_testsuite/get-vanilla-query.authz deleted file mode 100644 index 06bd81300e..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-vanilla-query.authz +++ /dev/null @@ -1 +0,0 @@ -AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=b27ccfbfa7df52a200ff74193ca6e32d4b48b8856fab7ebf1c595d0670a7e470 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query.req b/tests/unit/auth/aws4_testsuite/get-vanilla-query.req deleted file mode 100644 index f29d404638..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-vanilla-query.req +++ /dev/null @@ -1,4 +0,0 @@ -GET / http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com - diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query.sreq b/tests/unit/auth/aws4_testsuite/get-vanilla-query.sreq deleted file mode 100644 index ba7a966ab8..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-vanilla-query.sreq +++ /dev/null @@ -1,5 +0,0 @@ -GET / http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=b27ccfbfa7df52a200ff74193ca6e32d4b48b8856fab7ebf1c595d0670a7e470 - diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query.sts b/tests/unit/auth/aws4_testsuite/get-vanilla-query.sts deleted file mode 100644 index f5b8bbe5e7..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-vanilla-query.sts +++ /dev/null @@ -1,4 +0,0 @@ -AWS4-HMAC-SHA256 -20110909T233600Z -20110909/us-east-1/host/aws4_request -366b91fb121d72a00f46bbe8d395f53a102b06dfb7e79636515208ed3fa606b1 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query/get-vanilla-query.authz b/tests/unit/auth/aws4_testsuite/get-vanilla-query/get-vanilla-query.authz new file mode 100644 index 0000000000..551c0271d4 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-query/get-vanilla-query.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query.creq b/tests/unit/auth/aws4_testsuite/get-vanilla-query/get-vanilla-query.creq similarity index 50% rename from tests/unit/auth/aws4_testsuite/get-vanilla-query.creq rename to tests/unit/auth/aws4_testsuite/get-vanilla-query/get-vanilla-query.creq index 32a0877126..ed91561f4a 100644 --- a/tests/unit/auth/aws4_testsuite/get-vanilla-query.creq +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-query/get-vanilla-query.creq @@ -1,8 +1,8 @@ -GET -/ - -date:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com - -date;host +GET +/ + +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query/get-vanilla-query.req b/tests/unit/auth/aws4_testsuite/get-vanilla-query/get-vanilla-query.req new file mode 100644 index 0000000000..0f7a9bfae3 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-query/get-vanilla-query.req @@ -0,0 +1,3 @@ +GET / HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query/get-vanilla-query.sreq b/tests/unit/auth/aws4_testsuite/get-vanilla-query/get-vanilla-query.sreq new file mode 100644 index 0000000000..d739b01fd1 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-query/get-vanilla-query.sreq @@ -0,0 +1,4 @@ +GET / HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-query/get-vanilla-query.sts b/tests/unit/auth/aws4_testsuite/get-vanilla-query/get-vanilla-query.sts new file mode 100644 index 0000000000..b187649cb3 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-query/get-vanilla-query.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +bb579772317eb040ac9ed261061d46c1f17a8133879d6129b6e1c25292927e63 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-ut8-query.authz b/tests/unit/auth/aws4_testsuite/get-vanilla-ut8-query.authz deleted file mode 100644 index 8e925e3f02..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-vanilla-ut8-query.authz +++ /dev/null @@ -1 +0,0 @@ -AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=6fb359e9a05394cc7074e0feb42573a2601abc0c869a953e8c5c12e4e01f1a8c \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-ut8-query.req b/tests/unit/auth/aws4_testsuite/get-vanilla-ut8-query.req deleted file mode 100644 index 5a6efd074e..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-vanilla-ut8-query.req +++ /dev/null @@ -1,4 +0,0 @@ -GET /?ሴ=bar http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com - diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-ut8-query.sreq b/tests/unit/auth/aws4_testsuite/get-vanilla-ut8-query.sreq deleted file mode 100644 index f5cccbbb6a..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-vanilla-ut8-query.sreq +++ /dev/null @@ -1,5 +0,0 @@ -GET /?ሴ=bar http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=6fb359e9a05394cc7074e0feb42573a2601abc0c869a953e8c5c12e4e01f1a8c - diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-ut8-query.sts b/tests/unit/auth/aws4_testsuite/get-vanilla-ut8-query.sts deleted file mode 100644 index dc073ad8fe..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-vanilla-ut8-query.sts +++ /dev/null @@ -1,4 +0,0 @@ -AWS4-HMAC-SHA256 -20110909T233600Z -20110909/us-east-1/host/aws4_request -de5065ff39c131e6c2e2bd19cd9345a794bf3b561eab20b8d97b2093fc2a979e \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-utf8-query/get-vanilla-utf8-query.authz b/tests/unit/auth/aws4_testsuite/get-vanilla-utf8-query/get-vanilla-utf8-query.authz new file mode 100644 index 0000000000..e016c3da09 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-utf8-query/get-vanilla-utf8-query.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=2cdec8eed098649ff3a119c94853b13c643bcf08f8b0a1d91e12c9027818dd04 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-ut8-query.creq b/tests/unit/auth/aws4_testsuite/get-vanilla-utf8-query/get-vanilla-utf8-query.creq similarity index 54% rename from tests/unit/auth/aws4_testsuite/get-vanilla-ut8-query.creq rename to tests/unit/auth/aws4_testsuite/get-vanilla-utf8-query/get-vanilla-utf8-query.creq index 015e61a532..a835c9e491 100644 --- a/tests/unit/auth/aws4_testsuite/get-vanilla-ut8-query.creq +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-utf8-query/get-vanilla-utf8-query.creq @@ -1,8 +1,8 @@ -GET -/ -%E1%88%B4=bar -date:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com - -date;host +GET +/ +%E1%88%B4=bar +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-utf8-query/get-vanilla-utf8-query.req b/tests/unit/auth/aws4_testsuite/get-vanilla-utf8-query/get-vanilla-utf8-query.req new file mode 100644 index 0000000000..cc2757e167 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-utf8-query/get-vanilla-utf8-query.req @@ -0,0 +1,3 @@ +GET /?ሴ=bar HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-utf8-query/get-vanilla-utf8-query.sreq b/tests/unit/auth/aws4_testsuite/get-vanilla-utf8-query/get-vanilla-utf8-query.sreq new file mode 100644 index 0000000000..7baf4c82f3 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-utf8-query/get-vanilla-utf8-query.sreq @@ -0,0 +1,4 @@ +GET /?ሴ=bar HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=2cdec8eed098649ff3a119c94853b13c643bcf08f8b0a1d91e12c9027818dd04 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-utf8-query/get-vanilla-utf8-query.sts b/tests/unit/auth/aws4_testsuite/get-vanilla-utf8-query/get-vanilla-utf8-query.sts new file mode 100644 index 0000000000..51ee71b749 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-utf8-query/get-vanilla-utf8-query.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +eb30c5bed55734080471a834cc727ae56beb50e5f39d1bff6d0d38cb192a7073 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-with-session-token/get-vanilla-with-session-token.authz b/tests/unit/auth/aws4_testsuite/get-vanilla-with-session-token/get-vanilla-with-session-token.authz new file mode 100644 index 0000000000..cb7ae61e1a --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-with-session-token/get-vanilla-with-session-token.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date;x-amz-security-token, Signature=07ec1639c89043aa0e3e2de82b96708f198cceab042d4a97044c66dd9f74e7f8 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-with-session-token/get-vanilla-with-session-token.creq b/tests/unit/auth/aws4_testsuite/get-vanilla-with-session-token/get-vanilla-with-session-token.creq new file mode 100644 index 0000000000..ccacdeb490 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-with-session-token/get-vanilla-with-session-token.creq @@ -0,0 +1,9 @@ +GET +/ + +host:example.amazonaws.com +x-amz-date:20150830T123600Z +x-amz-security-token:6e86291e8372ff2a2260956d9b8aae1d763fbf315fa00fa31553b73ebf194267 + +host;x-amz-date;x-amz-security-token +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-with-session-token/get-vanilla-with-session-token.req b/tests/unit/auth/aws4_testsuite/get-vanilla-with-session-token/get-vanilla-with-session-token.req new file mode 100644 index 0000000000..0f7a9bfae3 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-with-session-token/get-vanilla-with-session-token.req @@ -0,0 +1,3 @@ +GET / HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-with-session-token/get-vanilla-with-session-token.sreq b/tests/unit/auth/aws4_testsuite/get-vanilla-with-session-token/get-vanilla-with-session-token.sreq new file mode 100644 index 0000000000..406ac5690c --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-with-session-token/get-vanilla-with-session-token.sreq @@ -0,0 +1,5 @@ +GET / HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +X-Amz-Security-Token:6e86291e8372ff2a2260956d9b8aae1d763fbf315fa00fa31553b73ebf194267 +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date;x-amz-security-token, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla-with-session-token/get-vanilla-with-session-token.sts b/tests/unit/auth/aws4_testsuite/get-vanilla-with-session-token/get-vanilla-with-session-token.sts new file mode 100644 index 0000000000..742b880cb0 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla-with-session-token/get-vanilla-with-session-token.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +067b36aa60031588cea4a4cde1f21215227a047690c72247f1d70b32fbbfad2b \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla.authz b/tests/unit/auth/aws4_testsuite/get-vanilla.authz deleted file mode 100644 index 06bd81300e..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-vanilla.authz +++ /dev/null @@ -1 +0,0 @@ -AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=b27ccfbfa7df52a200ff74193ca6e32d4b48b8856fab7ebf1c595d0670a7e470 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla.req b/tests/unit/auth/aws4_testsuite/get-vanilla.req deleted file mode 100644 index f29d404638..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-vanilla.req +++ /dev/null @@ -1,4 +0,0 @@ -GET / http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com - diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla.sreq b/tests/unit/auth/aws4_testsuite/get-vanilla.sreq deleted file mode 100644 index ba7a966ab8..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-vanilla.sreq +++ /dev/null @@ -1,5 +0,0 @@ -GET / http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=b27ccfbfa7df52a200ff74193ca6e32d4b48b8856fab7ebf1c595d0670a7e470 - diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla.sts b/tests/unit/auth/aws4_testsuite/get-vanilla.sts deleted file mode 100644 index f5b8bbe5e7..0000000000 --- a/tests/unit/auth/aws4_testsuite/get-vanilla.sts +++ /dev/null @@ -1,4 +0,0 @@ -AWS4-HMAC-SHA256 -20110909T233600Z -20110909/us-east-1/host/aws4_request -366b91fb121d72a00f46bbe8d395f53a102b06dfb7e79636515208ed3fa606b1 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla/get-vanilla.authz b/tests/unit/auth/aws4_testsuite/get-vanilla/get-vanilla.authz new file mode 100644 index 0000000000..551c0271d4 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla/get-vanilla.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla.creq b/tests/unit/auth/aws4_testsuite/get-vanilla/get-vanilla.creq similarity index 50% rename from tests/unit/auth/aws4_testsuite/get-vanilla.creq rename to tests/unit/auth/aws4_testsuite/get-vanilla/get-vanilla.creq index 32a0877126..ed91561f4a 100644 --- a/tests/unit/auth/aws4_testsuite/get-vanilla.creq +++ b/tests/unit/auth/aws4_testsuite/get-vanilla/get-vanilla.creq @@ -1,8 +1,8 @@ -GET -/ - -date:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com - -date;host +GET +/ + +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla/get-vanilla.req b/tests/unit/auth/aws4_testsuite/get-vanilla/get-vanilla.req new file mode 100644 index 0000000000..0f7a9bfae3 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla/get-vanilla.req @@ -0,0 +1,3 @@ +GET / HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla/get-vanilla.sreq b/tests/unit/auth/aws4_testsuite/get-vanilla/get-vanilla.sreq new file mode 100644 index 0000000000..d739b01fd1 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla/get-vanilla.sreq @@ -0,0 +1,4 @@ +GET / HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-vanilla/get-vanilla.sts b/tests/unit/auth/aws4_testsuite/get-vanilla/get-vanilla.sts new file mode 100644 index 0000000000..b187649cb3 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/get-vanilla/get-vanilla.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +bb579772317eb040ac9ed261061d46c1f17a8133879d6129b6e1c25292927e63 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/normalize-path/get-relative-relative/get-relative-relative.authz b/tests/unit/auth/aws4_testsuite/normalize-path/get-relative-relative/get-relative-relative.authz new file mode 100644 index 0000000000..551c0271d4 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/normalize-path/get-relative-relative/get-relative-relative.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-relative-relative.creq b/tests/unit/auth/aws4_testsuite/normalize-path/get-relative-relative/get-relative-relative.creq similarity index 50% rename from tests/unit/auth/aws4_testsuite/get-relative-relative.creq rename to tests/unit/auth/aws4_testsuite/normalize-path/get-relative-relative/get-relative-relative.creq index 32a0877126..ed91561f4a 100644 --- a/tests/unit/auth/aws4_testsuite/get-relative-relative.creq +++ b/tests/unit/auth/aws4_testsuite/normalize-path/get-relative-relative/get-relative-relative.creq @@ -1,8 +1,8 @@ -GET -/ - -date:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com - -date;host +GET +/ + +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/normalize-path/get-relative-relative/get-relative-relative.req b/tests/unit/auth/aws4_testsuite/normalize-path/get-relative-relative/get-relative-relative.req new file mode 100644 index 0000000000..cfd4e8b74c --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/normalize-path/get-relative-relative/get-relative-relative.req @@ -0,0 +1,3 @@ +GET /example1/example2/../.. HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/normalize-path/get-relative-relative/get-relative-relative.sreq b/tests/unit/auth/aws4_testsuite/normalize-path/get-relative-relative/get-relative-relative.sreq new file mode 100644 index 0000000000..cbdebe2cca --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/normalize-path/get-relative-relative/get-relative-relative.sreq @@ -0,0 +1,4 @@ +GET /example1/example2/../.. HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/normalize-path/get-relative-relative/get-relative-relative.sts b/tests/unit/auth/aws4_testsuite/normalize-path/get-relative-relative/get-relative-relative.sts new file mode 100644 index 0000000000..b187649cb3 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/normalize-path/get-relative-relative/get-relative-relative.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +bb579772317eb040ac9ed261061d46c1f17a8133879d6129b6e1c25292927e63 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/normalize-path/get-relative/get-relative.authz b/tests/unit/auth/aws4_testsuite/normalize-path/get-relative/get-relative.authz new file mode 100644 index 0000000000..551c0271d4 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/normalize-path/get-relative/get-relative.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-relative.creq b/tests/unit/auth/aws4_testsuite/normalize-path/get-relative/get-relative.creq similarity index 50% rename from tests/unit/auth/aws4_testsuite/get-relative.creq rename to tests/unit/auth/aws4_testsuite/normalize-path/get-relative/get-relative.creq index 32a0877126..ed91561f4a 100644 --- a/tests/unit/auth/aws4_testsuite/get-relative.creq +++ b/tests/unit/auth/aws4_testsuite/normalize-path/get-relative/get-relative.creq @@ -1,8 +1,8 @@ -GET -/ - -date:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com - -date;host +GET +/ + +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/normalize-path/get-relative/get-relative.req b/tests/unit/auth/aws4_testsuite/normalize-path/get-relative/get-relative.req new file mode 100644 index 0000000000..9d6d7ca20a --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/normalize-path/get-relative/get-relative.req @@ -0,0 +1,3 @@ +GET /example/.. HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/normalize-path/get-relative/get-relative.sreq b/tests/unit/auth/aws4_testsuite/normalize-path/get-relative/get-relative.sreq new file mode 100644 index 0000000000..4f59e7d20c --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/normalize-path/get-relative/get-relative.sreq @@ -0,0 +1,4 @@ +GET /example/.. HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/normalize-path/get-relative/get-relative.sts b/tests/unit/auth/aws4_testsuite/normalize-path/get-relative/get-relative.sts new file mode 100644 index 0000000000..b187649cb3 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/normalize-path/get-relative/get-relative.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +bb579772317eb040ac9ed261061d46c1f17a8133879d6129b6e1c25292927e63 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.authz b/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.authz new file mode 100644 index 0000000000..551c0271d4 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-slash-dot-slash.creq b/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.creq similarity index 50% rename from tests/unit/auth/aws4_testsuite/get-slash-dot-slash.creq rename to tests/unit/auth/aws4_testsuite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.creq index 32a0877126..ed91561f4a 100644 --- a/tests/unit/auth/aws4_testsuite/get-slash-dot-slash.creq +++ b/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.creq @@ -1,8 +1,8 @@ -GET -/ - -date:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com - -date;host +GET +/ + +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.req b/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.req new file mode 100644 index 0000000000..f3537b7095 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.req @@ -0,0 +1,3 @@ +GET /./ HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.sreq b/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.sreq new file mode 100644 index 0000000000..23a2b41ced --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.sreq @@ -0,0 +1,4 @@ +GET /./ HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.sts b/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.sts new file mode 100644 index 0000000000..b187649cb3 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +bb579772317eb040ac9ed261061d46c1f17a8133879d6129b6e1c25292927e63 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.authz b/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.authz new file mode 100644 index 0000000000..b76ca1e2d4 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=ef75d96142cf21edca26f06005da7988e4f8dc83a165a80865db7089db637ec5 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.creq b/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.creq new file mode 100644 index 0000000000..915c57f214 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.creq @@ -0,0 +1,8 @@ +GET +/example + +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.req b/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.req new file mode 100644 index 0000000000..3c9107171a --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.req @@ -0,0 +1,3 @@ +GET /./example HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.sreq b/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.sreq new file mode 100644 index 0000000000..8096609653 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.sreq @@ -0,0 +1,4 @@ +GET /./example HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=ef75d96142cf21edca26f06005da7988e4f8dc83a165a80865db7089db637ec5 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.sts b/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.sts new file mode 100644 index 0000000000..7429923e6b --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +214d50c111a8edc4819da6a636336472c916b5240f51e9a51b5c3305180cf702 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/normalize-path/get-slash/get-slash.authz b/tests/unit/auth/aws4_testsuite/normalize-path/get-slash/get-slash.authz new file mode 100644 index 0000000000..551c0271d4 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/normalize-path/get-slash/get-slash.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/get-slash.creq b/tests/unit/auth/aws4_testsuite/normalize-path/get-slash/get-slash.creq similarity index 50% rename from tests/unit/auth/aws4_testsuite/get-slash.creq rename to tests/unit/auth/aws4_testsuite/normalize-path/get-slash/get-slash.creq index 32a0877126..ed91561f4a 100644 --- a/tests/unit/auth/aws4_testsuite/get-slash.creq +++ b/tests/unit/auth/aws4_testsuite/normalize-path/get-slash/get-slash.creq @@ -1,8 +1,8 @@ -GET -/ - -date:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com - -date;host +GET +/ + +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/normalize-path/get-slash/get-slash.req b/tests/unit/auth/aws4_testsuite/normalize-path/get-slash/get-slash.req new file mode 100644 index 0000000000..ede8e3c8ea --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/normalize-path/get-slash/get-slash.req @@ -0,0 +1,3 @@ +GET // HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/normalize-path/get-slash/get-slash.sreq b/tests/unit/auth/aws4_testsuite/normalize-path/get-slash/get-slash.sreq new file mode 100644 index 0000000000..cde31b4381 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/normalize-path/get-slash/get-slash.sreq @@ -0,0 +1,4 @@ +GET // HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/normalize-path/get-slash/get-slash.sts b/tests/unit/auth/aws4_testsuite/normalize-path/get-slash/get-slash.sts new file mode 100644 index 0000000000..b187649cb3 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/normalize-path/get-slash/get-slash.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +bb579772317eb040ac9ed261061d46c1f17a8133879d6129b6e1c25292927e63 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/normalize-path/get-slashes/get-slashes.authz b/tests/unit/auth/aws4_testsuite/normalize-path/get-slashes/get-slashes.authz new file mode 100644 index 0000000000..307c1051d5 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/normalize-path/get-slashes/get-slashes.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=9a624bd73a37c9a373b5312afbebe7a714a789de108f0bdfe846570885f57e84 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/normalize-path/get-slashes/get-slashes.creq b/tests/unit/auth/aws4_testsuite/normalize-path/get-slashes/get-slashes.creq new file mode 100644 index 0000000000..2bdaf7479b --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/normalize-path/get-slashes/get-slashes.creq @@ -0,0 +1,8 @@ +GET +/example/ + +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/normalize-path/get-slashes/get-slashes.req b/tests/unit/auth/aws4_testsuite/normalize-path/get-slashes/get-slashes.req new file mode 100644 index 0000000000..a4307ce425 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/normalize-path/get-slashes/get-slashes.req @@ -0,0 +1,3 @@ +GET //example// HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/normalize-path/get-slashes/get-slashes.sreq b/tests/unit/auth/aws4_testsuite/normalize-path/get-slashes/get-slashes.sreq new file mode 100644 index 0000000000..c84a80d56a --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/normalize-path/get-slashes/get-slashes.sreq @@ -0,0 +1,4 @@ +GET //example// HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=9a624bd73a37c9a373b5312afbebe7a714a789de108f0bdfe846570885f57e84 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/normalize-path/get-slashes/get-slashes.sts b/tests/unit/auth/aws4_testsuite/normalize-path/get-slashes/get-slashes.sts new file mode 100644 index 0000000000..95d1fc2584 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/normalize-path/get-slashes/get-slashes.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +cb96b4ac96d501f7c5c15bc6d67b3035061cfced4af6585ad927f7e6c985c015 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/normalize-path/get-space/get-space.authz b/tests/unit/auth/aws4_testsuite/normalize-path/get-space/get-space.authz new file mode 100644 index 0000000000..832d8a50d2 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/normalize-path/get-space/get-space.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=652487583200325589f1fba4c7e578f72c47cb61beeca81406b39ddec1366741 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/normalize-path/get-space/get-space.creq b/tests/unit/auth/aws4_testsuite/normalize-path/get-space/get-space.creq new file mode 100644 index 0000000000..124a7096a1 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/normalize-path/get-space/get-space.creq @@ -0,0 +1,8 @@ +GET +/example%20space/ + +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/normalize-path/get-space/get-space.req b/tests/unit/auth/aws4_testsuite/normalize-path/get-space/get-space.req new file mode 100644 index 0000000000..b7d5e8bb95 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/normalize-path/get-space/get-space.req @@ -0,0 +1,3 @@ +GET /example space/ HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/normalize-path/get-space/get-space.sreq b/tests/unit/auth/aws4_testsuite/normalize-path/get-space/get-space.sreq new file mode 100644 index 0000000000..eefa20c48c --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/normalize-path/get-space/get-space.sreq @@ -0,0 +1,4 @@ +GET /example space/ HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=652487583200325589f1fba4c7e578f72c47cb61beeca81406b39ddec1366741 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/normalize-path/get-space/get-space.sts b/tests/unit/auth/aws4_testsuite/normalize-path/get-space/get-space.sts new file mode 100644 index 0000000000..a633f0c052 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/normalize-path/get-space/get-space.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +63ee75631ed7234ae61b5f736dfc7754cdccfedbff4b5128a915706ee9390d86 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/normalize-path/get-special-character/get-special-character.authz b/tests/unit/auth/aws4_testsuite/normalize-path/get-special-character/get-special-character.authz new file mode 100644 index 0000000000..858b601bb3 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/normalize-path/get-special-character/get-special-character.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=a853c9b21b528b19643d00910d35b83a10c366a10833ceefb45edd6c80e40f27 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/normalize-path/get-special-character/get-special-character.creq b/tests/unit/auth/aws4_testsuite/normalize-path/get-special-character/get-special-character.creq new file mode 100644 index 0000000000..236b8f27d5 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/normalize-path/get-special-character/get-special-character.creq @@ -0,0 +1,8 @@ +GET +/example/%24delete + +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/normalize-path/get-special-character/get-special-character.req b/tests/unit/auth/aws4_testsuite/normalize-path/get-special-character/get-special-character.req new file mode 100644 index 0000000000..e657d8858a --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/normalize-path/get-special-character/get-special-character.req @@ -0,0 +1,3 @@ +GET /example/$delete HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z diff --git a/tests/unit/auth/aws4_testsuite/normalize-path/get-special-character/get-special-character.sreq b/tests/unit/auth/aws4_testsuite/normalize-path/get-special-character/get-special-character.sreq new file mode 100644 index 0000000000..d3a607188a --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/normalize-path/get-special-character/get-special-character.sreq @@ -0,0 +1,4 @@ +GET /example/$delete HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=a853c9b21b528b19643d00910d35b83a10c366a10833ceefb45edd6c80e40f27 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/normalize-path/get-special-character/get-special-character.sts b/tests/unit/auth/aws4_testsuite/normalize-path/get-special-character/get-special-character.sts new file mode 100644 index 0000000000..df29bc44df --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/normalize-path/get-special-character/get-special-character.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +4053e45b5cef7cec5e17f736b1c12b3faf0388fd4c0bd24326386f132039ce5c \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/normalize-path/normalize-path.txt b/tests/unit/auth/aws4_testsuite/normalize-path/normalize-path.txt new file mode 100644 index 0000000000..caaf34fb5e --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/normalize-path/normalize-path.txt @@ -0,0 +1,3 @@ +A note about signing requests to Amazon S3: + +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 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-header-key-case.authz b/tests/unit/auth/aws4_testsuite/post-header-key-case.authz deleted file mode 100644 index a6a7cbbf1c..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-header-key-case.authz +++ /dev/null @@ -1 +0,0 @@ -AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=22902d79e148b64e7571c3565769328423fe276eae4b26f83afceda9e767f726 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-header-key-case.req b/tests/unit/auth/aws4_testsuite/post-header-key-case.req deleted file mode 100644 index b60869e4f9..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-header-key-case.req +++ /dev/null @@ -1,4 +0,0 @@ -POST / http/1.1 -DATE:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com - diff --git a/tests/unit/auth/aws4_testsuite/post-header-key-case.sreq b/tests/unit/auth/aws4_testsuite/post-header-key-case.sreq deleted file mode 100644 index f6442e0351..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-header-key-case.sreq +++ /dev/null @@ -1,5 +0,0 @@ -POST / http/1.1 -DATE:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=22902d79e148b64e7571c3565769328423fe276eae4b26f83afceda9e767f726 - diff --git a/tests/unit/auth/aws4_testsuite/post-header-key-case.sts b/tests/unit/auth/aws4_testsuite/post-header-key-case.sts deleted file mode 100644 index ad825d7baa..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-header-key-case.sts +++ /dev/null @@ -1,4 +0,0 @@ -AWS4-HMAC-SHA256 -20110909T233600Z -20110909/us-east-1/host/aws4_request -05da62cee468d24ae84faff3c39f1b85540de60243c1bcaace39c0a2acc7b2c4 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-header-key-case/post-header-key-case.authz b/tests/unit/auth/aws4_testsuite/post-header-key-case/post-header-key-case.authz new file mode 100644 index 0000000000..89e572e609 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-header-key-case/post-header-key-case.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5da7c1a2acd57cee7505fc6676e4e544621c30862966e37dddb68e92efbe5d6b \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-header-key-case.creq b/tests/unit/auth/aws4_testsuite/post-header-key-case/post-header-key-case.creq similarity index 50% rename from tests/unit/auth/aws4_testsuite/post-header-key-case.creq rename to tests/unit/auth/aws4_testsuite/post-header-key-case/post-header-key-case.creq index 2c756ba5e3..5c3a9434ec 100644 --- a/tests/unit/auth/aws4_testsuite/post-header-key-case.creq +++ b/tests/unit/auth/aws4_testsuite/post-header-key-case/post-header-key-case.creq @@ -1,8 +1,8 @@ -POST -/ - -date:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com - -date;host +POST +/ + +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-header-key-case/post-header-key-case.req b/tests/unit/auth/aws4_testsuite/post-header-key-case/post-header-key-case.req new file mode 100644 index 0000000000..3dc4179013 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-header-key-case/post-header-key-case.req @@ -0,0 +1,3 @@ +POST / HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-header-key-case/post-header-key-case.sreq b/tests/unit/auth/aws4_testsuite/post-header-key-case/post-header-key-case.sreq new file mode 100644 index 0000000000..a5ada0d940 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-header-key-case/post-header-key-case.sreq @@ -0,0 +1,4 @@ +POST / HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5da7c1a2acd57cee7505fc6676e4e544621c30862966e37dddb68e92efbe5d6b \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-header-key-case/post-header-key-case.sts b/tests/unit/auth/aws4_testsuite/post-header-key-case/post-header-key-case.sts new file mode 100644 index 0000000000..a636703949 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-header-key-case/post-header-key-case.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +553f88c9e4d10fc9e109e2aeb65f030801b70c2f6468faca261d401ae622fc87 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-header-key-sort.authz b/tests/unit/auth/aws4_testsuite/post-header-key-sort.authz deleted file mode 100644 index fdcbdd95e5..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-header-key-sort.authz +++ /dev/null @@ -1 +0,0 @@ -AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host;zoo, Signature=b7a95a52518abbca0964a999a880429ab734f35ebbf1235bd79a5de87756dc4a \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-header-key-sort.creq b/tests/unit/auth/aws4_testsuite/post-header-key-sort.creq deleted file mode 100644 index 746ab5f7fd..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-header-key-sort.creq +++ /dev/null @@ -1,9 +0,0 @@ -POST -/ - -date:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com -zoo:zoobar - -date;host;zoo -e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-header-key-sort.req b/tests/unit/auth/aws4_testsuite/post-header-key-sort.req deleted file mode 100644 index e25249a28d..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-header-key-sort.req +++ /dev/null @@ -1,5 +0,0 @@ -POST / http/1.1 -DATE:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com -ZOO:zoobar - diff --git a/tests/unit/auth/aws4_testsuite/post-header-key-sort.sreq b/tests/unit/auth/aws4_testsuite/post-header-key-sort.sreq deleted file mode 100644 index 913b954ce2..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-header-key-sort.sreq +++ /dev/null @@ -1,6 +0,0 @@ -POST / http/1.1 -DATE:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com -ZOO:zoobar -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host;zoo, Signature=b7a95a52518abbca0964a999a880429ab734f35ebbf1235bd79a5de87756dc4a - diff --git a/tests/unit/auth/aws4_testsuite/post-header-key-sort.sts b/tests/unit/auth/aws4_testsuite/post-header-key-sort.sts deleted file mode 100644 index 32e7549f40..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-header-key-sort.sts +++ /dev/null @@ -1,4 +0,0 @@ -AWS4-HMAC-SHA256 -20110909T233600Z -20110909/us-east-1/host/aws4_request -34e1bddeb99e76ee01d63b5e28656111e210529efeec6cdfd46a48e4c734545d \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-header-key-sort/post-header-key-sort.authz b/tests/unit/auth/aws4_testsuite/post-header-key-sort/post-header-key-sort.authz new file mode 100644 index 0000000000..a62589ff7e --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-header-key-sort/post-header-key-sort.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=c5410059b04c1ee005303aed430f6e6645f61f4dc9e1461ec8f8916fdf18852c \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-header-key-sort/post-header-key-sort.creq b/tests/unit/auth/aws4_testsuite/post-header-key-sort/post-header-key-sort.creq new file mode 100644 index 0000000000..ebe943e895 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-header-key-sort/post-header-key-sort.creq @@ -0,0 +1,9 @@ +POST +/ + +host:example.amazonaws.com +my-header1:value1 +x-amz-date:20150830T123600Z + +host;my-header1;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-header-key-sort/post-header-key-sort.req b/tests/unit/auth/aws4_testsuite/post-header-key-sort/post-header-key-sort.req new file mode 100644 index 0000000000..0253f19456 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-header-key-sort/post-header-key-sort.req @@ -0,0 +1,4 @@ +POST / HTTP/1.1 +Host:example.amazonaws.com +My-Header1:value1 +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-header-key-sort/post-header-key-sort.sreq b/tests/unit/auth/aws4_testsuite/post-header-key-sort/post-header-key-sort.sreq new file mode 100644 index 0000000000..b4b78a1668 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-header-key-sort/post-header-key-sort.sreq @@ -0,0 +1,5 @@ +POST / HTTP/1.1 +Host:example.amazonaws.com +My-Header1:value1 +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=c5410059b04c1ee005303aed430f6e6645f61f4dc9e1461ec8f8916fdf18852c \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-header-key-sort/post-header-key-sort.sts b/tests/unit/auth/aws4_testsuite/post-header-key-sort/post-header-key-sort.sts new file mode 100644 index 0000000000..eb66362697 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-header-key-sort/post-header-key-sort.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +9368318c2967cf6de74404b30c65a91e8f6253e0a8659d6d5319f1a812f87d65 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-header-value-case.authz b/tests/unit/auth/aws4_testsuite/post-header-value-case.authz deleted file mode 100644 index 651c954bdb..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-header-value-case.authz +++ /dev/null @@ -1 +0,0 @@ -AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host;zoo, Signature=273313af9d0c265c531e11db70bbd653f3ba074c1009239e8559d3987039cad7 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-header-value-case.creq b/tests/unit/auth/aws4_testsuite/post-header-value-case.creq deleted file mode 100644 index 10b58e0299..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-header-value-case.creq +++ /dev/null @@ -1,9 +0,0 @@ -POST -/ - -date:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com -zoo:ZOOBAR - -date;host;zoo -e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-header-value-case.req b/tests/unit/auth/aws4_testsuite/post-header-value-case.req deleted file mode 100644 index 2629262169..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-header-value-case.req +++ /dev/null @@ -1,5 +0,0 @@ -POST / http/1.1 -DATE:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com -zoo:ZOOBAR - diff --git a/tests/unit/auth/aws4_testsuite/post-header-value-case.sreq b/tests/unit/auth/aws4_testsuite/post-header-value-case.sreq deleted file mode 100644 index d37940f47a..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-header-value-case.sreq +++ /dev/null @@ -1,6 +0,0 @@ -POST / http/1.1 -DATE:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com -zoo:ZOOBAR -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host;zoo, Signature=273313af9d0c265c531e11db70bbd653f3ba074c1009239e8559d3987039cad7 - diff --git a/tests/unit/auth/aws4_testsuite/post-header-value-case.sts b/tests/unit/auth/aws4_testsuite/post-header-value-case.sts deleted file mode 100644 index eb99385cc5..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-header-value-case.sts +++ /dev/null @@ -1,4 +0,0 @@ -AWS4-HMAC-SHA256 -20110909T233600Z -20110909/us-east-1/host/aws4_request -3aae6d8274b8c03e2cc96fc7d6bda4b9bd7a0a184309344470b2c96953e124aa \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-header-value-case/post-header-value-case.authz b/tests/unit/auth/aws4_testsuite/post-header-value-case/post-header-value-case.authz new file mode 100644 index 0000000000..d9e52a379a --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-header-value-case/post-header-value-case.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=cdbc9802e29d2942e5e10b5bccfdd67c5f22c7c4e8ae67b53629efa58b974b7d \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-header-value-case/post-header-value-case.creq b/tests/unit/auth/aws4_testsuite/post-header-value-case/post-header-value-case.creq new file mode 100644 index 0000000000..af824c8899 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-header-value-case/post-header-value-case.creq @@ -0,0 +1,9 @@ +POST +/ + +host:example.amazonaws.com +my-header1:VALUE1 +x-amz-date:20150830T123600Z + +host;my-header1;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-header-value-case/post-header-value-case.req b/tests/unit/auth/aws4_testsuite/post-header-value-case/post-header-value-case.req new file mode 100644 index 0000000000..3f9987af7f --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-header-value-case/post-header-value-case.req @@ -0,0 +1,4 @@ +POST / HTTP/1.1 +Host:example.amazonaws.com +My-Header1:VALUE1 +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-header-value-case/post-header-value-case.sreq b/tests/unit/auth/aws4_testsuite/post-header-value-case/post-header-value-case.sreq new file mode 100644 index 0000000000..99c3210c99 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-header-value-case/post-header-value-case.sreq @@ -0,0 +1,5 @@ +POST / HTTP/1.1 +Host:example.amazonaws.com +My-Header1:VALUE1 +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=cdbc9802e29d2942e5e10b5bccfdd67c5f22c7c4e8ae67b53629efa58b974b7d \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-header-value-case/post-header-value-case.sts b/tests/unit/auth/aws4_testsuite/post-header-value-case/post-header-value-case.sts new file mode 100644 index 0000000000..40062c79f8 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-header-value-case/post-header-value-case.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +d51ced243e649e3de6ef63afbbdcbca03131a21a7103a1583706a64618606a93 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-after/post-sts-header-after.authz b/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-after/post-sts-header-after.authz new file mode 100644 index 0000000000..89e572e609 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-after/post-sts-header-after.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5da7c1a2acd57cee7505fc6676e4e544621c30862966e37dddb68e92efbe5d6b \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-after/post-sts-header-after.creq b/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-after/post-sts-header-after.creq new file mode 100644 index 0000000000..5c3a9434ec --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-after/post-sts-header-after.creq @@ -0,0 +1,8 @@ +POST +/ + +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-after/post-sts-header-after.req b/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-after/post-sts-header-after.req new file mode 100644 index 0000000000..3dc4179013 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-after/post-sts-header-after.req @@ -0,0 +1,3 @@ +POST / HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-after/post-sts-header-after.sreq b/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-after/post-sts-header-after.sreq new file mode 100644 index 0000000000..291ed0756b --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-after/post-sts-header-after.sreq @@ -0,0 +1,5 @@ +POST / HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +X-Amz-Security-Token:AQoDYXdzEPT//////////wEXAMPLEtc764bNrC9SAPBSM22wDOk4x4HIZ8j4FZTwdQWLWsKWHGBuFqwAeMicRXmxfpSPfIeoIYRqTflfKD8YUuwthAx7mSEI/qkPpKPi/kMcGdQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA== +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5da7c1a2acd57cee7505fc6676e4e544621c30862966e37dddb68e92efbe5d6b \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-after/post-sts-header-after.sts b/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-after/post-sts-header-after.sts new file mode 100644 index 0000000000..a636703949 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-after/post-sts-header-after.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +553f88c9e4d10fc9e109e2aeb65f030801b70c2f6468faca261d401ae622fc87 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-before/post-sts-header-before.authz b/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-before/post-sts-header-before.authz new file mode 100644 index 0000000000..64aa046dbb --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-before/post-sts-header-before.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date;x-amz-security-token, Signature=85d96828115b5dc0cfc3bd16ad9e210dd772bbebba041836c64533a82be05ead \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-before/post-sts-header-before.creq b/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-before/post-sts-header-before.creq new file mode 100644 index 0000000000..1d5a462ee2 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-before/post-sts-header-before.creq @@ -0,0 +1,9 @@ +POST +/ + +host:example.amazonaws.com +x-amz-date:20150830T123600Z +x-amz-security-token:AQoDYXdzEPT//////////wEXAMPLEtc764bNrC9SAPBSM22wDOk4x4HIZ8j4FZTwdQWLWsKWHGBuFqwAeMicRXmxfpSPfIeoIYRqTflfKD8YUuwthAx7mSEI/qkPpKPi/kMcGdQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA== + +host;x-amz-date;x-amz-security-token +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-before/post-sts-header-before.req b/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-before/post-sts-header-before.req new file mode 100644 index 0000000000..9d917755f4 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-before/post-sts-header-before.req @@ -0,0 +1,4 @@ +POST / HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +X-Amz-Security-Token:AQoDYXdzEPT//////////wEXAMPLEtc764bNrC9SAPBSM22wDOk4x4HIZ8j4FZTwdQWLWsKWHGBuFqwAeMicRXmxfpSPfIeoIYRqTflfKD8YUuwthAx7mSEI/qkPpKPi/kMcGdQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA== \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-before/post-sts-header-before.sreq b/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-before/post-sts-header-before.sreq new file mode 100644 index 0000000000..37b2f04190 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-before/post-sts-header-before.sreq @@ -0,0 +1,5 @@ +POST / HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +X-Amz-Security-Token:AQoDYXdzEPT//////////wEXAMPLEtc764bNrC9SAPBSM22wDOk4x4HIZ8j4FZTwdQWLWsKWHGBuFqwAeMicRXmxfpSPfIeoIYRqTflfKD8YUuwthAx7mSEI/qkPpKPi/kMcGdQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA== +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date;x-amz-security-token, Signature=85d96828115b5dc0cfc3bd16ad9e210dd772bbebba041836c64533a82be05ead \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-before/post-sts-header-before.sts b/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-before/post-sts-header-before.sts new file mode 100644 index 0000000000..bc39ccfc5b --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-sts-token/post-sts-header-before/post-sts-header-before.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +c237e1b440d4c63c32ca95b5b99481081cb7b13c7e40434868e71567c1a882f6 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-sts-token/readme.txt b/tests/unit/auth/aws4_testsuite/post-sts-token/readme.txt new file mode 100644 index 0000000000..3731a30128 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-sts-token/readme.txt @@ -0,0 +1,15 @@ +A note about using temporary security credentials: + +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). + +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. + +The test suite has 2 examples: + +post-sts-header-before - The X-Amz-Security-Token header is part of the canonical request. + +post-sts-header-after - The X-Amz-Security-Token header is added to the request after you calculate the signature. + +The test suite uses this example value for X-Amz-Security-Token: + +AQoDYXdzEPT//////////wEXAMPLEtc764bNrC9SAPBSM22wDOk4x4HIZ8j4FZTwdQWLWsKWHGBuFqwAeMicRXmxfpSPfIeoIYRqTflfKD8YUuwthAx7mSEI/qkPpKPi/kMcGdQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA== \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value.authz b/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value.authz deleted file mode 100644 index acfa0fe218..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value.authz +++ /dev/null @@ -1 +0,0 @@ -AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=b6e3b79003ce0743a491606ba1035a804593b0efb1e20a11cba83f8c25a57a92 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value.creq b/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value.creq deleted file mode 100644 index 2c5879ae6b..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value.creq +++ /dev/null @@ -1,8 +0,0 @@ -POST -/ -foo=bar -date:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com - -date;host -e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value.req b/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value.req deleted file mode 100644 index fb2bd64c6c..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value.req +++ /dev/null @@ -1,4 +0,0 @@ -POST /?foo=bar http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com - diff --git a/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value.sreq b/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value.sreq deleted file mode 100644 index 1a31692b78..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value.sreq +++ /dev/null @@ -1,5 +0,0 @@ -POST /?foo=bar http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=b6e3b79003ce0743a491606ba1035a804593b0efb1e20a11cba83f8c25a57a92 - diff --git a/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value.sts b/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value.sts deleted file mode 100644 index ad4553ad65..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value.sts +++ /dev/null @@ -1,4 +0,0 @@ -AWS4-HMAC-SHA256 -20110909T233600Z -20110909/us-east-1/host/aws4_request -cd4f39132d8e60bb388831d734230460872b564871c47f5de62e62d1a68dbe1e \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.authz b/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.authz new file mode 100644 index 0000000000..44280cd7bb --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=28038455d6de14eafc1f9222cf5aa6f1a96197d7deb8263271d420d138af7f11 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.creq b/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.creq new file mode 100644 index 0000000000..f5058d430b --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.creq @@ -0,0 +1,8 @@ +POST +/ +Param1=value1 +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.req b/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.req new file mode 100644 index 0000000000..9157bc74de --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.req @@ -0,0 +1,3 @@ +POST /?Param1=value1 HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.sreq b/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.sreq new file mode 100644 index 0000000000..82af1505e2 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.sreq @@ -0,0 +1,4 @@ +POST /?Param1=value1 HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=28038455d6de14eafc1f9222cf5aa6f1a96197d7deb8263271d420d138af7f11 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.sts b/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.sts new file mode 100644 index 0000000000..ca7cc661d1 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +9d659678c1756bb3113e2ce898845a0a79dbbc57b740555917687f1b3340fbbd \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-vanilla-query-nonunreserved.authz b/tests/unit/auth/aws4_testsuite/post-vanilla-query-nonunreserved.authz deleted file mode 100644 index e97bdaa1dc..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-vanilla-query-nonunreserved.authz +++ /dev/null @@ -1 +0,0 @@ -AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=28675d93ac1d686ab9988d6617661da4dffe7ba848a2285cb75eac6512e861f9 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-vanilla-query-nonunreserved.creq b/tests/unit/auth/aws4_testsuite/post-vanilla-query-nonunreserved.creq deleted file mode 100644 index 1f2fd47c5f..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-vanilla-query-nonunreserved.creq +++ /dev/null @@ -1,8 +0,0 @@ -POST -/ -%20=%2F%2C%3F%3E%3C%60%22%3B%3A%5C%7C%5D%5B%7B%7D&%40%23%24%25%5E= -date:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com - -date;host -e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-vanilla-query-nonunreserved.req b/tests/unit/auth/aws4_testsuite/post-vanilla-query-nonunreserved.req deleted file mode 100644 index 07dd561f2e..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-vanilla-query-nonunreserved.req +++ /dev/null @@ -1,4 +0,0 @@ -POST /?@#$%^&+=/,?><`";:\|][{} =@#$%^&+=/,?><`";:\|][{} http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com - diff --git a/tests/unit/auth/aws4_testsuite/post-vanilla-query-nonunreserved.sreq b/tests/unit/auth/aws4_testsuite/post-vanilla-query-nonunreserved.sreq deleted file mode 100644 index a0837a911d..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-vanilla-query-nonunreserved.sreq +++ /dev/null @@ -1,5 +0,0 @@ -POST /?@#$%^&+=/,?><`";:\|][{} =@#$%^&+=/,?><`";:\|][{} http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=28675d93ac1d686ab9988d6617661da4dffe7ba848a2285cb75eac6512e861f9 - diff --git a/tests/unit/auth/aws4_testsuite/post-vanilla-query-nonunreserved.sts b/tests/unit/auth/aws4_testsuite/post-vanilla-query-nonunreserved.sts deleted file mode 100644 index 320db25a6e..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-vanilla-query-nonunreserved.sts +++ /dev/null @@ -1,4 +0,0 @@ -AWS4-HMAC-SHA256 -20110909T233600Z -20110909/us-east-1/host/aws4_request -eb3f16b23b20c91e1b5d6f3cd1c1f8c32a6ddcae6024e44bcfa980fbf8561f6c \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-vanilla-query-space.authz b/tests/unit/auth/aws4_testsuite/post-vanilla-query-space.authz deleted file mode 100644 index 59ccfcbc5d..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-vanilla-query-space.authz +++ /dev/null @@ -1 +0,0 @@ -AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=b7eb653abe5f846e7eee4d1dba33b15419dc424aaf215d49b1240732b10cc4ca \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-vanilla-query-space.creq b/tests/unit/auth/aws4_testsuite/post-vanilla-query-space.creq deleted file mode 100644 index c45c9fd9c4..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-vanilla-query-space.creq +++ /dev/null @@ -1,8 +0,0 @@ -POST -/ -f= -date:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com - -date;host -e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-vanilla-query-space.req b/tests/unit/auth/aws4_testsuite/post-vanilla-query-space.req deleted file mode 100644 index b58c3cd9af..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-vanilla-query-space.req +++ /dev/null @@ -1,4 +0,0 @@ -POST /?f oo=b ar http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com - diff --git a/tests/unit/auth/aws4_testsuite/post-vanilla-query-space.sreq b/tests/unit/auth/aws4_testsuite/post-vanilla-query-space.sreq deleted file mode 100644 index fe33e8328a..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-vanilla-query-space.sreq +++ /dev/null @@ -1,5 +0,0 @@ -POST /?f oo=b ar http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=b7eb653abe5f846e7eee4d1dba33b15419dc424aaf215d49b1240732b10cc4ca - diff --git a/tests/unit/auth/aws4_testsuite/post-vanilla-query-space.sts b/tests/unit/auth/aws4_testsuite/post-vanilla-query-space.sts deleted file mode 100644 index d6d8e6500e..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-vanilla-query-space.sts +++ /dev/null @@ -1,4 +0,0 @@ -AWS4-HMAC-SHA256 -20110909T233600Z -20110909/us-east-1/host/aws4_request -0d5f8ed88e9cd0a2a093e1719fff945e3718d30a6b240b9de994cdf9442c89f5 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-vanilla-query.authz b/tests/unit/auth/aws4_testsuite/post-vanilla-query.authz deleted file mode 100644 index acfa0fe218..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-vanilla-query.authz +++ /dev/null @@ -1 +0,0 @@ -AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=b6e3b79003ce0743a491606ba1035a804593b0efb1e20a11cba83f8c25a57a92 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-vanilla-query.creq b/tests/unit/auth/aws4_testsuite/post-vanilla-query.creq deleted file mode 100644 index 2c5879ae6b..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-vanilla-query.creq +++ /dev/null @@ -1,8 +0,0 @@ -POST -/ -foo=bar -date:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com - -date;host -e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-vanilla-query.req b/tests/unit/auth/aws4_testsuite/post-vanilla-query.req deleted file mode 100644 index fb2bd64c6c..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-vanilla-query.req +++ /dev/null @@ -1,4 +0,0 @@ -POST /?foo=bar http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com - diff --git a/tests/unit/auth/aws4_testsuite/post-vanilla-query.sreq b/tests/unit/auth/aws4_testsuite/post-vanilla-query.sreq deleted file mode 100644 index 1a31692b78..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-vanilla-query.sreq +++ /dev/null @@ -1,5 +0,0 @@ -POST /?foo=bar http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=b6e3b79003ce0743a491606ba1035a804593b0efb1e20a11cba83f8c25a57a92 - diff --git a/tests/unit/auth/aws4_testsuite/post-vanilla-query.sts b/tests/unit/auth/aws4_testsuite/post-vanilla-query.sts deleted file mode 100644 index ad4553ad65..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-vanilla-query.sts +++ /dev/null @@ -1,4 +0,0 @@ -AWS4-HMAC-SHA256 -20110909T233600Z -20110909/us-east-1/host/aws4_request -cd4f39132d8e60bb388831d734230460872b564871c47f5de62e62d1a68dbe1e \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-vanilla-query/post-vanilla-query.authz b/tests/unit/auth/aws4_testsuite/post-vanilla-query/post-vanilla-query.authz new file mode 100644 index 0000000000..44280cd7bb --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-vanilla-query/post-vanilla-query.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=28038455d6de14eafc1f9222cf5aa6f1a96197d7deb8263271d420d138af7f11 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-vanilla-query/post-vanilla-query.creq b/tests/unit/auth/aws4_testsuite/post-vanilla-query/post-vanilla-query.creq new file mode 100644 index 0000000000..f5058d430b --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-vanilla-query/post-vanilla-query.creq @@ -0,0 +1,8 @@ +POST +/ +Param1=value1 +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-vanilla-query/post-vanilla-query.req b/tests/unit/auth/aws4_testsuite/post-vanilla-query/post-vanilla-query.req new file mode 100644 index 0000000000..9157bc74de --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-vanilla-query/post-vanilla-query.req @@ -0,0 +1,3 @@ +POST /?Param1=value1 HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-vanilla-query/post-vanilla-query.sreq b/tests/unit/auth/aws4_testsuite/post-vanilla-query/post-vanilla-query.sreq new file mode 100644 index 0000000000..82af1505e2 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-vanilla-query/post-vanilla-query.sreq @@ -0,0 +1,4 @@ +POST /?Param1=value1 HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=28038455d6de14eafc1f9222cf5aa6f1a96197d7deb8263271d420d138af7f11 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-vanilla-query/post-vanilla-query.sts b/tests/unit/auth/aws4_testsuite/post-vanilla-query/post-vanilla-query.sts new file mode 100644 index 0000000000..ca7cc661d1 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-vanilla-query/post-vanilla-query.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +9d659678c1756bb3113e2ce898845a0a79dbbc57b740555917687f1b3340fbbd \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-vanilla.authz b/tests/unit/auth/aws4_testsuite/post-vanilla.authz deleted file mode 100644 index a6a7cbbf1c..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-vanilla.authz +++ /dev/null @@ -1 +0,0 @@ -AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=22902d79e148b64e7571c3565769328423fe276eae4b26f83afceda9e767f726 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-vanilla.req b/tests/unit/auth/aws4_testsuite/post-vanilla.req deleted file mode 100644 index 04996ea1a2..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-vanilla.req +++ /dev/null @@ -1,4 +0,0 @@ -POST / http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com - diff --git a/tests/unit/auth/aws4_testsuite/post-vanilla.sreq b/tests/unit/auth/aws4_testsuite/post-vanilla.sreq deleted file mode 100644 index 9b645dd42f..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-vanilla.sreq +++ /dev/null @@ -1,5 +0,0 @@ -POST / http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=22902d79e148b64e7571c3565769328423fe276eae4b26f83afceda9e767f726 - diff --git a/tests/unit/auth/aws4_testsuite/post-vanilla.sts b/tests/unit/auth/aws4_testsuite/post-vanilla.sts deleted file mode 100644 index ad825d7baa..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-vanilla.sts +++ /dev/null @@ -1,4 +0,0 @@ -AWS4-HMAC-SHA256 -20110909T233600Z -20110909/us-east-1/host/aws4_request -05da62cee468d24ae84faff3c39f1b85540de60243c1bcaace39c0a2acc7b2c4 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-vanilla/post-vanilla.authz b/tests/unit/auth/aws4_testsuite/post-vanilla/post-vanilla.authz new file mode 100644 index 0000000000..89e572e609 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-vanilla/post-vanilla.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5da7c1a2acd57cee7505fc6676e4e544621c30862966e37dddb68e92efbe5d6b \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-vanilla.creq b/tests/unit/auth/aws4_testsuite/post-vanilla/post-vanilla.creq similarity index 50% rename from tests/unit/auth/aws4_testsuite/post-vanilla.creq rename to tests/unit/auth/aws4_testsuite/post-vanilla/post-vanilla.creq index 2c756ba5e3..5c3a9434ec 100644 --- a/tests/unit/auth/aws4_testsuite/post-vanilla.creq +++ b/tests/unit/auth/aws4_testsuite/post-vanilla/post-vanilla.creq @@ -1,8 +1,8 @@ -POST -/ - -date:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com - -date;host +POST +/ + +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +host;x-amz-date e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-vanilla/post-vanilla.req b/tests/unit/auth/aws4_testsuite/post-vanilla/post-vanilla.req new file mode 100644 index 0000000000..3dc4179013 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-vanilla/post-vanilla.req @@ -0,0 +1,3 @@ +POST / HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-vanilla/post-vanilla.sreq b/tests/unit/auth/aws4_testsuite/post-vanilla/post-vanilla.sreq new file mode 100644 index 0000000000..a5ada0d940 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-vanilla/post-vanilla.sreq @@ -0,0 +1,4 @@ +POST / HTTP/1.1 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5da7c1a2acd57cee7505fc6676e4e544621c30862966e37dddb68e92efbe5d6b \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-vanilla/post-vanilla.sts b/tests/unit/auth/aws4_testsuite/post-vanilla/post-vanilla.sts new file mode 100644 index 0000000000..a636703949 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-vanilla/post-vanilla.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +553f88c9e4d10fc9e109e2aeb65f030801b70c2f6468faca261d401ae622fc87 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters.authz b/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters.authz deleted file mode 100644 index 438b01c285..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters.authz +++ /dev/null @@ -1 +0,0 @@ -AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=content-type;date;host, Signature=b105eb10c6d318d2294de9d49dd8b031b55e3c3fe139f2e637da70511e9e7b71 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters.creq b/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters.creq deleted file mode 100644 index 42ec859b1e..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters.creq +++ /dev/null @@ -1,9 +0,0 @@ -POST -/ - -content-type:application/x-www-form-urlencoded; charset=utf8 -date:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com - -content-type;date;host -3ba8907e7a252327488df390ed517c45b96dead033600219bdca7107d1d3f88a \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters.req b/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters.req deleted file mode 100644 index 9f9469e019..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters.req +++ /dev/null @@ -1,6 +0,0 @@ -POST / http/1.1 -Content-Type:application/x-www-form-urlencoded; charset=utf8 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com - -foo=bar \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters.sreq b/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters.sreq deleted file mode 100644 index e8a26c07f2..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters.sreq +++ /dev/null @@ -1,7 +0,0 @@ -POST / http/1.1 -Content-Type:application/x-www-form-urlencoded; charset=utf8 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=content-type;date;host, Signature=b105eb10c6d318d2294de9d49dd8b031b55e3c3fe139f2e637da70511e9e7b71 - -foo=bar \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters.sts b/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters.sts deleted file mode 100644 index 5d0d51da6d..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters.sts +++ /dev/null @@ -1,4 +0,0 @@ -AWS4-HMAC-SHA256 -20110909T233600Z -20110909/us-east-1/host/aws4_request -c4115f9e54b5cecf192b1eaa23b8e88ed8dc5391bd4fde7b3fff3d9c9fe0af1f \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.authz b/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.authz new file mode 100644 index 0000000000..531b89b45b --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=1a72ec8f64bd914b0e42e42607c7fbce7fb2c7465f63e3092b3b0d39fa77a6fe \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.creq b/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.creq new file mode 100644 index 0000000000..8ec0d6cf0a --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.creq @@ -0,0 +1,9 @@ +POST +/ + +content-type:application/x-www-form-urlencoded; charset=utf8 +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +content-type;host;x-amz-date +9095672bbd1f56dfc5b65f3e153adc8731a4a654192329106275f4c7b24d0b6e \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.req b/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.req new file mode 100644 index 0000000000..5ce537e674 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.req @@ -0,0 +1,6 @@ +POST / HTTP/1.1 +Content-Type:application/x-www-form-urlencoded; charset=utf8 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z + +Param1=value1 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.sreq b/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.sreq new file mode 100644 index 0000000000..88beb82a38 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.sreq @@ -0,0 +1,7 @@ +POST / HTTP/1.1 +Content-Type:application/x-www-form-urlencoded; charset=utf8 +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=1a72ec8f64bd914b0e42e42607c7fbce7fb2c7465f63e3092b3b0d39fa77a6fe + +Param1=value1 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.sts b/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.sts new file mode 100644 index 0000000000..3e83c524b0 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +2e1cf7ed91881a30569e46552437e4156c823447bf1781b921b5d486c568dd1c \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded.authz b/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded.authz deleted file mode 100644 index 73b64780a4..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded.authz +++ /dev/null @@ -1 +0,0 @@ -AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=content-type;date;host, Signature=5a15b22cf462f047318703b92e6f4f38884e4a7ab7b1d6426ca46a8bd1c26cbc \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded.creq b/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded.creq deleted file mode 100644 index ad0a961035..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded.creq +++ /dev/null @@ -1,9 +0,0 @@ -POST -/ - -content-type:application/x-www-form-urlencoded -date:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com - -content-type;date;host -3ba8907e7a252327488df390ed517c45b96dead033600219bdca7107d1d3f88a \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded.req b/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded.req deleted file mode 100644 index 4907c92171..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded.req +++ /dev/null @@ -1,6 +0,0 @@ -POST / http/1.1 -Content-Type:application/x-www-form-urlencoded -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com - -foo=bar \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded.sreq b/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded.sreq deleted file mode 100644 index 7e1bc7578b..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded.sreq +++ /dev/null @@ -1,7 +0,0 @@ -POST / http/1.1 -Content-Type:application/x-www-form-urlencoded -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=content-type;date;host, Signature=5a15b22cf462f047318703b92e6f4f38884e4a7ab7b1d6426ca46a8bd1c26cbc - -foo=bar \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded.sts b/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded.sts deleted file mode 100644 index a8873a0f21..0000000000 --- a/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded.sts +++ /dev/null @@ -1,4 +0,0 @@ -AWS4-HMAC-SHA256 -20110909T233600Z -20110909/us-east-1/host/aws4_request -4c5c6e4b52fb5fb947a8733982a8a5a61b14f04345cbfe6e739236c76dd48f74 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.authz b/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.authz new file mode 100644 index 0000000000..d7baf53540 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.authz @@ -0,0 +1 @@ +AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=ff11897932ad3f4e8b18135d722051e5ac45fc38421b1da7b9d196a0fe09473a \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.creq b/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.creq new file mode 100644 index 0000000000..d7197f17ec --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.creq @@ -0,0 +1,9 @@ +POST +/ + +content-type:application/x-www-form-urlencoded +host:example.amazonaws.com +x-amz-date:20150830T123600Z + +content-type;host;x-amz-date +9095672bbd1f56dfc5b65f3e153adc8731a4a654192329106275f4c7b24d0b6e \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.req b/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.req new file mode 100644 index 0000000000..ada7f87760 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.req @@ -0,0 +1,6 @@ +POST / HTTP/1.1 +Content-Type:application/x-www-form-urlencoded +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z + +Param1=value1 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.sreq b/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.sreq new file mode 100644 index 0000000000..9bac9311ba --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.sreq @@ -0,0 +1,7 @@ +POST / HTTP/1.1 +Content-Type:application/x-www-form-urlencoded +Host:example.amazonaws.com +X-Amz-Date:20150830T123600Z +Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=ff11897932ad3f4e8b18135d722051e5ac45fc38421b1da7b9d196a0fe09473a + +Param1=value1 \ No newline at end of file diff --git a/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.sts b/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.sts new file mode 100644 index 0000000000..65ab663719 --- /dev/null +++ b/tests/unit/auth/aws4_testsuite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.sts @@ -0,0 +1,4 @@ +AWS4-HMAC-SHA256 +20150830T123600Z +20150830/us-east-1/service/aws4_request +42a5e5bb34198acb3e84da4f085bb7927f2bc277ca766e6d19c73c2154021281 \ No newline at end of file diff --git a/tests/unit/auth/test_signers.py b/tests/unit/auth/test_signers.py index d3ebf987a3..b16f839dc3 100644 --- a/tests/unit/auth/test_signers.py +++ b/tests/unit/auth/test_signers.py @@ -28,11 +28,11 @@ class BaseTestWithFixedDate(unittest.TestCase): def setUp(self): - self.datetime_patch = mock.patch('botocore.auth.datetime') - self.datetime_mock = self.datetime_patch.start() self.fixed_date = datetime.datetime(2014, 3, 10, 17, 2, 55, 0) - self.datetime_mock.datetime.utcnow.return_value = self.fixed_date - self.datetime_mock.datetime.strptime.return_value = self.fixed_date + self.datetime_patch = mock.patch('botocore.auth.datetime.datetime') + self.datetime_mock = self.datetime_patch.start() + self.datetime_mock.utcnow.return_value = self.fixed_date + self.datetime_mock.strptime.return_value = self.fixed_date def tearDown(self): self.datetime_patch.stop() @@ -158,13 +158,14 @@ def test_resign_with_token(self): class TestS3SigV4Auth(BaseTestWithFixedDate): + AuthClass = botocore.auth.S3SigV4Auth maxDiff = None def setUp(self): super(TestS3SigV4Auth, self).setUp() self.credentials = botocore.credentials.Credentials( access_key='foo', secret_key='bar', token='baz') - self.auth = botocore.auth.S3SigV4Auth( + self.auth = self.AuthClass( self.credentials, 'ec2', 'eu-central-1') self.request = AWSRequest(data=six.BytesIO(b"foo bar baz")) self.request.method = 'PUT' @@ -192,12 +193,16 @@ def test_signature_is_not_normalized(self): request.method = 'GET' credentials = botocore.credentials.Credentials('access_key', 'secret_key') - auth = botocore.auth.S3SigV4Auth(credentials, 's3', 'us-east-1') + auth = self.AuthClass(credentials, 's3', 'us-east-1') auth.add_auth(request) self.assertTrue( request.headers['Authorization'].startswith('AWS4-HMAC-SHA256')) def test_query_string_params_in_urls(self): + if not hasattr(self.AuthClass, 'canonical_query_string'): + raise unittest.SkipTest('%s does not expose interim steps' % + self.AuthClass.__name__) + request = AWSRequest() request.url = ( 'https://s3.amazonaws.com/bucket?' @@ -219,7 +224,7 @@ def _test_blacklist_header(self, header, value): request.headers[header] = value credentials = botocore.credentials.Credentials('access_key', 'secret_key') - auth = botocore.auth.S3SigV4Auth(credentials, 's3', 'us-east-1') + auth = self.AuthClass(credentials, 's3', 'us-east-1') auth.add_auth(request) self.assertNotIn(header, request.headers['Authorization']) @@ -457,13 +462,13 @@ def test_strips_default_port_and_http_auth(self): class TestSigV4Resign(BaseTestWithFixedDate): maxDiff = None + AuthClass = botocore.auth.SigV4Auth def setUp(self): super(TestSigV4Resign, self).setUp() self.credentials = botocore.credentials.Credentials( access_key='foo', secret_key='bar', token='baz') - self.auth = botocore.auth.SigV4Auth(self.credentials, - 'ec2', 'us-west-2') + self.auth = self.AuthClass(self.credentials, 'ec2', 'us-west-2') self.request = AWSRequest() self.request.method = 'PUT' self.request.url = 'https://ec2.amazonaws.com/' @@ -500,6 +505,7 @@ def get_parsed_query_string(self, request): class TestSigV4Presign(BasePresignTest): maxDiff = None + AuthClass = botocore.auth.SigV4QueryAuth def setUp(self): self.access_key = 'access_key' @@ -508,7 +514,7 @@ def setUp(self): self.secret_key) self.service_name = 'myservice' self.region_name = 'myregion' - self.auth = botocore.auth.SigV4QueryAuth( + self.auth = self.AuthClass( self.credentials, self.service_name, self.region_name, expires=60) self.datetime_patcher = mock.patch.object( botocore.auth.datetime, 'datetime', diff --git a/tests/unit/auth/test_sigv4.py b/tests/unit/auth/test_sigv4.py index 2d28a0008e..c7a1968c0d 100644 --- a/tests/unit/auth/test_sigv4.py +++ b/tests/unit/auth/test_sigv4.py @@ -15,7 +15,7 @@ AWS provides a test suite for signature version 4: - http://docs.aws.amazon.com/general/latest/gr/signature-v4-test-suite.html +https://github.com/awslabs/aws-c-auth/tree/v0.3.15/tests/aws-sig-v4-test-suite This module contains logic to run these tests. The test files were placed in ./aws4_testsuite, and we're using nose's test generators to @@ -26,26 +26,22 @@ import logging import io import datetime -from botocore.compat import six +import re +from botocore.compat import six, urlsplit, parse_qsl import mock import botocore.auth +import botocore.crt.auth from botocore.awsrequest import AWSRequest from botocore.credentials import Credentials -try: - from urllib.parse import urlsplit - from urllib.parse import parse_qsl -except ImportError: - from urlparse import urlsplit - from urlparse import parse_qsl - -CREDENTIAL_SCOPE = "KEYNAME/20110909/us-west-1/s3/aws4_request" SECRET_KEY = "wJalrXUtnFEMI/K7MDENG+bPxRfiCYEXAMPLEKEY" ACCESS_KEY = 'AKIDEXAMPLE' -DATE_STRING = 'Mon, 09 Sep 2011 23:36:00 GMT' +DATE = datetime.datetime(2015, 8, 30, 12, 36, 0) +SERVICE = 'service' +REGION = 'us-east-1' TESTSUITE_DIR = os.path.join( os.path.dirname(os.path.abspath(__file__)), 'aws4_testsuite') @@ -53,15 +49,11 @@ # The following tests are not run. Each test has a comment as # to why the test is being ignored. TESTS_TO_IGNORE = [ - # Bad POST syntax, python's HTTP parser chokes on this. - 'post-vanilla-query-space', - # Bad POST syntax, python's HTTP parser chokes on this. - 'post-vanilla-query-nonunreserved', - # Multiple query params of the same key not supported by - # the SDKs. + # Bad request-line syntax, python's HTTP parser chokes on this. + 'normalize-path/get-space', + # Multiple query params of the same key not supported by the SDKs. 'get-vanilla-query-order-key-case', - # Multiple query params of the same key not supported by - # the SDKs. + 'get-vanilla-query-order-key', 'get-vanilla-query-order-value', ] if not six.PY3: @@ -95,30 +87,28 @@ def test_generator(): mock.Mock(wraps=datetime.datetime) ) mocked_datetime = datetime_patcher.start() - mocked_datetime.utcnow.return_value = datetime.datetime(2011, 9, 9, 23, 36) - formatdate_patcher = mock.patch('botocore.auth.formatdate') - formatdate = formatdate_patcher.start() - # We have to change this because Sep 9, 2011 was actually - # a Friday, but the tests have this set to a Monday. - formatdate.return_value = 'Mon, 09 Sep 2011 23:36:00 GMT' - for test_case in set(os.path.splitext(i)[0] - for i in os.listdir(TESTSUITE_DIR)): + mocked_datetime.utcnow.return_value = DATE + for (dirpath, dirnames, filenames) in os.walk(TESTSUITE_DIR): + if not any(f.endswith('.req') for f in filenames): + continue + + test_case = os.path.relpath(dirpath, TESTSUITE_DIR) if test_case in TESTS_TO_IGNORE: log.debug("Skipping test: %s", test_case) continue + + yield (_test_crt_signature_version_4, test_case) yield (_test_signature_version_4, test_case) datetime_patcher.stop() - formatdate_patcher.stop() def create_request_from_raw_request(raw_request): - raw_request = raw_request.replace('http/1.1', 'HTTP/1.1') request = AWSRequest() raw = RawHTTPRequest(raw_request) if raw.error_code is not None: raise Exception(raw.error_message) request.method = raw.command - datetime_now = datetime.datetime(2011, 9, 9, 23, 36) + datetime_now = DATE request.context['timestamp'] = datetime_now.strftime('%Y%m%dT%H%M%SZ') for key, val in raw.headers.items(): request.headers[key] = val @@ -144,17 +134,35 @@ def _test_signature_version_4(test_case): test_case = _SignatureTestCase(test_case) request = create_request_from_raw_request(test_case.raw_request) - auth = botocore.auth.SigV4Auth(test_case.credentials, 'host', 'us-east-1') - + auth = botocore.auth.SigV4Auth(test_case.credentials, SERVICE, REGION) actual_canonical_request = auth.canonical_request(request) - assert_equal(actual_canonical_request, test_case.canonical_request, - test_case.raw_request, 'canonical_request') - actual_string_to_sign = auth.string_to_sign(request, actual_canonical_request) - assert_equal(actual_string_to_sign, test_case.string_to_sign, - test_case.raw_request, 'string_to_sign') + auth.add_auth(request) + actual_auth_header = request.headers['Authorization'] + + # Some stuff only works right when you go through auth.add_auth() + # So don't assert the interim steps unless the end result was wrong. + if actual_auth_header != test_case.authorization_header: + assert_equal(actual_canonical_request, test_case.canonical_request, + test_case.raw_request, 'canonical_request') + + assert_equal(actual_string_to_sign, test_case.string_to_sign, + test_case.raw_request, 'string_to_sign') + + assert_equal(actual_auth_header, test_case.authorization_header, + test_case.raw_request, 'authheader') + + +def _test_crt_signature_version_4(test_case): + test_case = _SignatureTestCase(test_case) + request = create_request_from_raw_request(test_case.raw_request) + # Use CRT logging to diagnose interim steps (canonical request, etc) + # import awscrt.io + # awscrt.io.init_logging(awscrt.io.LogLevel.Trace, 'stdout') + auth = botocore.crt.auth.CrtSigV4Auth(test_case.credentials, + SERVICE, REGION) auth.add_auth(request) actual_auth_header = request.headers['Authorization'] assert_equal(actual_auth_header, test_case.authorization_header, @@ -171,21 +179,26 @@ def assert_equal(actual, expected, raw_request, part): class _SignatureTestCase(object): def __init__(self, test_case): - p = os.path.join + filepath = os.path.join(TESTSUITE_DIR, test_case, + os.path.basename(test_case)) # We're using io.open() because we need to open these files with # a specific encoding, and in 2.x io.open is the best way to do this. - self.raw_request = io.open(p(TESTSUITE_DIR, test_case + '.req'), + self.raw_request = io.open(filepath + '.req', encoding='utf-8').read() self.canonical_request = io.open( - p(TESTSUITE_DIR, test_case + '.creq'), + filepath + '.creq', encoding='utf-8').read().replace('\r', '') self.string_to_sign = io.open( - p(TESTSUITE_DIR, test_case + '.sts'), + filepath + '.sts', encoding='utf-8').read().replace('\r', '') self.authorization_header = io.open( - p(TESTSUITE_DIR, test_case + '.authz'), + filepath + '.authz', encoding='utf-8').read().replace('\r', '') - self.signed_request = io.open(p(TESTSUITE_DIR, test_case + '.sreq'), + self.signed_request = io.open(filepath + '.sreq', encoding='utf-8').read() - self.credentials = Credentials(ACCESS_KEY, SECRET_KEY) + token_pattern = r'^x-amz-security-token:(.*)$' + token_match = re.search(token_pattern, self.canonical_request, + re.MULTILINE) + token = token_match.group(1) if token_match else None + self.credentials = Credentials(ACCESS_KEY, SECRET_KEY, token) diff --git a/tests/unit/crt/__init__.py b/tests/unit/crt/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/unit/crt/auth/__init__.py b/tests/unit/crt/auth/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/unit/crt/auth/test_crt_signers.py b/tests/unit/crt/auth/test_crt_signers.py new file mode 100644 index 0000000000..3dce0ea716 --- /dev/null +++ b/tests/unit/crt/auth/test_crt_signers.py @@ -0,0 +1,18 @@ +import botocore.crt.auth + +from tests.unit.auth.test_signers import ( + TestS3SigV4Auth, TestSigV4Presign, TestSigV4Resign +) + + +class TestCrtS3SigV4Auth(TestS3SigV4Auth): + # Repeat TestS3SigV4Auth tests, but using CRT signer + AuthClass = botocore.crt.auth.CrtS3SigV4Auth + + +class TestCrtSigV4Resign(TestSigV4Resign): + AuthClass = botocore.crt.auth.CrtSigV4Auth + + +class TestCrtSigV4Presign(TestSigV4Presign): + AuthClass = botocore.crt.auth.CrtSigV4QueryAuth