From 5ac350746668db6c03c755c024d2a1db596f4c75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nagy=20Kriszti=C3=A1n?= Date: Sat, 24 Feb 2024 05:37:33 +0000 Subject: [PATCH] SECURITY-9304: compatibility with the central test suite Co-authored-by: Laszlo Hammerl Co-authored-by: Laszlo Losonczy Co-authored-by: Dora Kaszasne Sztanko --- .github/workflows/python.yml | 10 +- .gitmodules | 3 + Dockerfile | 11 + Makefile | 3 + docker-compose.yml | 6 + escherauth/escherauth.py | 227 ++++++++++++++---- requirements-dev.txt | 7 +- setup.py | 2 +- test-cases | 1 + .../get-header-key-duplicate.authz | 1 - .../get-header-key-duplicate.creq | 10 - .../get-header-key-duplicate.req | 8 - .../get-header-key-duplicate.sreq | 9 - .../get-header-key-duplicate.sts | 4 - .../get-header-value-multiline.req | 8 - .../get-header-value-order.authz | 1 - .../get-header-value-order.creq | 10 - .../aws4_testsuite/get-header-value-order.req | 9 - .../get-header-value-order.sreq | 10 - .../aws4_testsuite/get-header-value-order.sts | 4 - .../get-header-value-trim.authz | 1 - .../aws4_testsuite/get-header-value-trim.creq | 9 - .../aws4_testsuite/get-header-value-trim.req | 5 - .../aws4_testsuite/get-header-value-trim.sreq | 7 - .../aws4_testsuite/get-header-value-trim.sts | 4 - .../get-relative-relative.authz | 1 - .../aws4_testsuite/get-relative-relative.creq | 8 - .../aws4_testsuite/get-relative-relative.req | 4 - .../aws4_testsuite/get-relative-relative.sreq | 6 - .../aws4_testsuite/get-relative-relative.sts | 4 - tests/aws4_testsuite/get-relative.authz | 1 - tests/aws4_testsuite/get-relative.creq | 8 - tests/aws4_testsuite/get-relative.req | 4 - tests/aws4_testsuite/get-relative.sreq | 6 - tests/aws4_testsuite/get-relative.sts | 4 - .../aws4_testsuite/get-slash-dot-slash.authz | 1 - tests/aws4_testsuite/get-slash-dot-slash.creq | 8 - tests/aws4_testsuite/get-slash-dot-slash.req | 4 - tests/aws4_testsuite/get-slash-dot-slash.sreq | 6 - tests/aws4_testsuite/get-slash-dot-slash.sts | 4 - .../get-slash-pointless-dot.authz | 1 - .../get-slash-pointless-dot.creq | 8 - .../get-slash-pointless-dot.req | 4 - .../get-slash-pointless-dot.sreq | 6 - .../get-slash-pointless-dot.sts | 4 - tests/aws4_testsuite/get-slash.authz | 1 - tests/aws4_testsuite/get-slash.creq | 8 - tests/aws4_testsuite/get-slash.req | 4 - tests/aws4_testsuite/get-slash.sreq | 6 - tests/aws4_testsuite/get-slash.sts | 4 - tests/aws4_testsuite/get-slashes.authz | 1 - tests/aws4_testsuite/get-slashes.creq | 8 - tests/aws4_testsuite/get-slashes.req | 4 - tests/aws4_testsuite/get-slashes.sreq | 6 - tests/aws4_testsuite/get-slashes.sts | 4 - tests/aws4_testsuite/get-space.authz | 1 - tests/aws4_testsuite/get-space.creq | 8 - tests/aws4_testsuite/get-space.req | 4 - tests/aws4_testsuite/get-space.sreq | 6 - tests/aws4_testsuite/get-space.sts | 4 - tests/aws4_testsuite/get-unreserved.authz | 1 - tests/aws4_testsuite/get-unreserved.creq | 8 - tests/aws4_testsuite/get-unreserved.req | 4 - tests/aws4_testsuite/get-unreserved.sreq | 6 - tests/aws4_testsuite/get-unreserved.sts | 4 - tests/aws4_testsuite/get-utf8.authz | 1 - tests/aws4_testsuite/get-utf8.creq | 8 - tests/aws4_testsuite/get-utf8.req | 4 - tests/aws4_testsuite/get-utf8.sreq | 6 - tests/aws4_testsuite/get-utf8.sts | 4 - .../get-vanilla-empty-query-key.authz | 1 - .../get-vanilla-empty-query-key.creq | 8 - .../get-vanilla-empty-query-key.req | 4 - .../get-vanilla-empty-query-key.sreq | 6 - .../get-vanilla-empty-query-key.sts | 4 - .../get-vanilla-query-order-key-case.authz | 1 - .../get-vanilla-query-order-key-case.creq | 8 - .../get-vanilla-query-order-key-case.req | 4 - .../get-vanilla-query-order-key-case.sreq | 6 - .../get-vanilla-query-order-key-case.sts | 4 - .../get-vanilla-query-order-key.authz | 1 - .../get-vanilla-query-order-key.creq | 8 - .../get-vanilla-query-order-key.req | 4 - .../get-vanilla-query-order-key.sreq | 6 - .../get-vanilla-query-order-key.sts | 4 - .../get-vanilla-query-order-value.authz | 1 - .../get-vanilla-query-order-value.creq | 8 - .../get-vanilla-query-order-value.req | 4 - .../get-vanilla-query-order-value.sreq | 6 - .../get-vanilla-query-order-value.sts | 4 - .../get-vanilla-query-unreserved.authz | 1 - .../get-vanilla-query-unreserved.creq | 8 - .../get-vanilla-query-unreserved.req | 4 - .../get-vanilla-query-unreserved.sreq | 6 - .../get-vanilla-query-unreserved.sts | 4 - tests/aws4_testsuite/get-vanilla-query.authz | 1 - tests/aws4_testsuite/get-vanilla-query.creq | 8 - tests/aws4_testsuite/get-vanilla-query.req | 4 - tests/aws4_testsuite/get-vanilla-query.sreq | 6 - tests/aws4_testsuite/get-vanilla-query.sts | 4 - .../get-vanilla-ut8-query.authz | 1 - .../aws4_testsuite/get-vanilla-ut8-query.creq | 8 - .../aws4_testsuite/get-vanilla-ut8-query.req | 4 - .../aws4_testsuite/get-vanilla-ut8-query.sreq | 6 - .../aws4_testsuite/get-vanilla-ut8-query.sts | 4 - tests/aws4_testsuite/get-vanilla.authz | 1 - tests/aws4_testsuite/get-vanilla.creq | 8 - tests/aws4_testsuite/get-vanilla.req | 4 - tests/aws4_testsuite/get-vanilla.sreq | 6 - tests/aws4_testsuite/get-vanilla.sts | 4 - .../aws4_testsuite/post-header-key-case.authz | 1 - .../aws4_testsuite/post-header-key-case.creq | 8 - tests/aws4_testsuite/post-header-key-case.req | 4 - .../aws4_testsuite/post-header-key-case.sreq | 6 - tests/aws4_testsuite/post-header-key-case.sts | 4 - .../aws4_testsuite/post-header-key-sort.authz | 1 - .../aws4_testsuite/post-header-key-sort.creq | 9 - tests/aws4_testsuite/post-header-key-sort.req | 5 - .../aws4_testsuite/post-header-key-sort.sreq | 7 - tests/aws4_testsuite/post-header-key-sort.sts | 4 - .../post-header-value-case.authz | 1 - .../post-header-value-case.creq | 9 - .../aws4_testsuite/post-header-value-case.req | 5 - .../post-header-value-case.sreq | 7 - .../aws4_testsuite/post-header-value-case.sts | 4 - .../post-vanilla-empty-query-value.authz | 1 - .../post-vanilla-empty-query-value.creq | 8 - .../post-vanilla-empty-query-value.req | 4 - .../post-vanilla-empty-query-value.sreq | 6 - .../post-vanilla-empty-query-value.sts | 4 - .../post-vanilla-query-nonunreserved.authz | 1 - .../post-vanilla-query-nonunreserved.creq | 8 - .../post-vanilla-query-nonunreserved.req | 4 - .../post-vanilla-query-nonunreserved.sreq | 6 - .../post-vanilla-query-nonunreserved.sts | 4 - .../post-vanilla-query-space.authz | 1 - .../post-vanilla-query-space.creq | 8 - .../post-vanilla-query-space.req | 4 - .../post-vanilla-query-space.sreq | 6 - .../post-vanilla-query-space.sts | 4 - tests/aws4_testsuite/post-vanilla-query.authz | 1 - tests/aws4_testsuite/post-vanilla-query.creq | 8 - tests/aws4_testsuite/post-vanilla-query.req | 4 - tests/aws4_testsuite/post-vanilla-query.sreq | 6 - tests/aws4_testsuite/post-vanilla-query.sts | 4 - tests/aws4_testsuite/post-vanilla.authz | 1 - tests/aws4_testsuite/post-vanilla.creq | 8 - tests/aws4_testsuite/post-vanilla.req | 4 - tests/aws4_testsuite/post-vanilla.sreq | 6 - tests/aws4_testsuite/post-vanilla.sts | 4 - ...ost-x-www-form-urlencoded-parameters.authz | 1 - ...post-x-www-form-urlencoded-parameters.creq | 9 - .../post-x-www-form-urlencoded-parameters.req | 6 - ...post-x-www-form-urlencoded-parameters.sreq | 8 - .../post-x-www-form-urlencoded-parameters.sts | 4 - .../post-x-www-form-urlencoded.authz | 1 - .../post-x-www-form-urlencoded.creq | 9 - .../post-x-www-form-urlencoded.req | 6 - .../post-x-www-form-urlencoded.sreq | 8 - .../post-x-www-form-urlencoded.sts | 4 - .../get-header-key-duplicate.authz | 1 - .../get-header-key-duplicate.creq | 9 - .../get-header-key-duplicate.req | 7 - .../get-header-key-duplicate.sreq | 8 - .../get-header-key-duplicate.sts | 4 - .../get-header-value-order.authz | 1 - .../get-header-value-order.creq | 9 - .../get-header-value-order.req | 8 - .../get-header-value-order.sreq | 9 - .../get-header-value-order.sts | 4 - .../post-header-key-order.authz | 1 - .../post-header-key-order.creq | 9 - .../post-header-key-order.req | 6 - .../post-header-key-order.sreq | 7 - .../post-header-key-order.sts | 4 - ...st-header-value-spaces-within-quotes.authz | 1 - ...ost-header-value-spaces-within-quotes.creq | 9 - ...post-header-value-spaces-within-quotes.req | 5 - ...ost-header-value-spaces-within-quotes.sreq | 6 - ...post-header-value-spaces-within-quotes.sts | 4 - .../post-header-value-spaces.authz | 1 - .../post-header-value-spaces.creq | 9 - .../post-header-value-spaces.req | 6 - .../post-header-value-spaces.sreq | 7 - .../post-header-value-spaces.sts | 4 - tests/test_authenticate.py | 44 ++-- tests/test_escherauth.py | 149 ++++++++++++ tests/test_escherauth_amazon.py | 83 ------- tests/test_escherrequest.py | 10 +- 189 files changed, 385 insertions(+), 1047 deletions(-) create mode 100644 .gitmodules create mode 100644 Dockerfile create mode 100644 Makefile create mode 100644 docker-compose.yml create mode 160000 test-cases delete mode 100644 tests/aws4_testsuite/get-header-key-duplicate.authz delete mode 100644 tests/aws4_testsuite/get-header-key-duplicate.creq delete mode 100644 tests/aws4_testsuite/get-header-key-duplicate.req delete mode 100644 tests/aws4_testsuite/get-header-key-duplicate.sreq delete mode 100644 tests/aws4_testsuite/get-header-key-duplicate.sts delete mode 100644 tests/aws4_testsuite/get-header-value-multiline.req delete mode 100644 tests/aws4_testsuite/get-header-value-order.authz delete mode 100644 tests/aws4_testsuite/get-header-value-order.creq delete mode 100644 tests/aws4_testsuite/get-header-value-order.req delete mode 100644 tests/aws4_testsuite/get-header-value-order.sreq delete mode 100644 tests/aws4_testsuite/get-header-value-order.sts delete mode 100644 tests/aws4_testsuite/get-header-value-trim.authz delete mode 100644 tests/aws4_testsuite/get-header-value-trim.creq delete mode 100644 tests/aws4_testsuite/get-header-value-trim.req delete mode 100644 tests/aws4_testsuite/get-header-value-trim.sreq delete mode 100644 tests/aws4_testsuite/get-header-value-trim.sts delete mode 100644 tests/aws4_testsuite/get-relative-relative.authz delete mode 100644 tests/aws4_testsuite/get-relative-relative.creq delete mode 100644 tests/aws4_testsuite/get-relative-relative.req delete mode 100644 tests/aws4_testsuite/get-relative-relative.sreq delete mode 100644 tests/aws4_testsuite/get-relative-relative.sts delete mode 100644 tests/aws4_testsuite/get-relative.authz delete mode 100644 tests/aws4_testsuite/get-relative.creq delete mode 100644 tests/aws4_testsuite/get-relative.req delete mode 100644 tests/aws4_testsuite/get-relative.sreq delete mode 100644 tests/aws4_testsuite/get-relative.sts delete mode 100644 tests/aws4_testsuite/get-slash-dot-slash.authz delete mode 100644 tests/aws4_testsuite/get-slash-dot-slash.creq delete mode 100644 tests/aws4_testsuite/get-slash-dot-slash.req delete mode 100644 tests/aws4_testsuite/get-slash-dot-slash.sreq delete mode 100644 tests/aws4_testsuite/get-slash-dot-slash.sts delete mode 100644 tests/aws4_testsuite/get-slash-pointless-dot.authz delete mode 100644 tests/aws4_testsuite/get-slash-pointless-dot.creq delete mode 100644 tests/aws4_testsuite/get-slash-pointless-dot.req delete mode 100644 tests/aws4_testsuite/get-slash-pointless-dot.sreq delete mode 100644 tests/aws4_testsuite/get-slash-pointless-dot.sts delete mode 100644 tests/aws4_testsuite/get-slash.authz delete mode 100644 tests/aws4_testsuite/get-slash.creq delete mode 100644 tests/aws4_testsuite/get-slash.req delete mode 100644 tests/aws4_testsuite/get-slash.sreq delete mode 100644 tests/aws4_testsuite/get-slash.sts delete mode 100644 tests/aws4_testsuite/get-slashes.authz delete mode 100644 tests/aws4_testsuite/get-slashes.creq delete mode 100644 tests/aws4_testsuite/get-slashes.req delete mode 100644 tests/aws4_testsuite/get-slashes.sreq delete mode 100644 tests/aws4_testsuite/get-slashes.sts delete mode 100644 tests/aws4_testsuite/get-space.authz delete mode 100644 tests/aws4_testsuite/get-space.creq delete mode 100644 tests/aws4_testsuite/get-space.req delete mode 100644 tests/aws4_testsuite/get-space.sreq delete mode 100644 tests/aws4_testsuite/get-space.sts delete mode 100644 tests/aws4_testsuite/get-unreserved.authz delete mode 100644 tests/aws4_testsuite/get-unreserved.creq delete mode 100644 tests/aws4_testsuite/get-unreserved.req delete mode 100644 tests/aws4_testsuite/get-unreserved.sreq delete mode 100644 tests/aws4_testsuite/get-unreserved.sts delete mode 100644 tests/aws4_testsuite/get-utf8.authz delete mode 100644 tests/aws4_testsuite/get-utf8.creq delete mode 100644 tests/aws4_testsuite/get-utf8.req delete mode 100644 tests/aws4_testsuite/get-utf8.sreq delete mode 100644 tests/aws4_testsuite/get-utf8.sts delete mode 100644 tests/aws4_testsuite/get-vanilla-empty-query-key.authz delete mode 100644 tests/aws4_testsuite/get-vanilla-empty-query-key.creq delete mode 100644 tests/aws4_testsuite/get-vanilla-empty-query-key.req delete mode 100644 tests/aws4_testsuite/get-vanilla-empty-query-key.sreq delete mode 100644 tests/aws4_testsuite/get-vanilla-empty-query-key.sts delete mode 100644 tests/aws4_testsuite/get-vanilla-query-order-key-case.authz delete mode 100644 tests/aws4_testsuite/get-vanilla-query-order-key-case.creq delete mode 100644 tests/aws4_testsuite/get-vanilla-query-order-key-case.req delete mode 100644 tests/aws4_testsuite/get-vanilla-query-order-key-case.sreq delete mode 100644 tests/aws4_testsuite/get-vanilla-query-order-key-case.sts delete mode 100644 tests/aws4_testsuite/get-vanilla-query-order-key.authz delete mode 100644 tests/aws4_testsuite/get-vanilla-query-order-key.creq delete mode 100644 tests/aws4_testsuite/get-vanilla-query-order-key.req delete mode 100644 tests/aws4_testsuite/get-vanilla-query-order-key.sreq delete mode 100644 tests/aws4_testsuite/get-vanilla-query-order-key.sts delete mode 100644 tests/aws4_testsuite/get-vanilla-query-order-value.authz delete mode 100644 tests/aws4_testsuite/get-vanilla-query-order-value.creq delete mode 100644 tests/aws4_testsuite/get-vanilla-query-order-value.req delete mode 100644 tests/aws4_testsuite/get-vanilla-query-order-value.sreq delete mode 100644 tests/aws4_testsuite/get-vanilla-query-order-value.sts delete mode 100644 tests/aws4_testsuite/get-vanilla-query-unreserved.authz delete mode 100644 tests/aws4_testsuite/get-vanilla-query-unreserved.creq delete mode 100644 tests/aws4_testsuite/get-vanilla-query-unreserved.req delete mode 100644 tests/aws4_testsuite/get-vanilla-query-unreserved.sreq delete mode 100644 tests/aws4_testsuite/get-vanilla-query-unreserved.sts delete mode 100644 tests/aws4_testsuite/get-vanilla-query.authz delete mode 100644 tests/aws4_testsuite/get-vanilla-query.creq delete mode 100644 tests/aws4_testsuite/get-vanilla-query.req delete mode 100644 tests/aws4_testsuite/get-vanilla-query.sreq delete mode 100644 tests/aws4_testsuite/get-vanilla-query.sts delete mode 100644 tests/aws4_testsuite/get-vanilla-ut8-query.authz delete mode 100644 tests/aws4_testsuite/get-vanilla-ut8-query.creq delete mode 100644 tests/aws4_testsuite/get-vanilla-ut8-query.req delete mode 100644 tests/aws4_testsuite/get-vanilla-ut8-query.sreq delete mode 100644 tests/aws4_testsuite/get-vanilla-ut8-query.sts delete mode 100644 tests/aws4_testsuite/get-vanilla.authz delete mode 100644 tests/aws4_testsuite/get-vanilla.creq delete mode 100644 tests/aws4_testsuite/get-vanilla.req delete mode 100644 tests/aws4_testsuite/get-vanilla.sreq delete mode 100644 tests/aws4_testsuite/get-vanilla.sts delete mode 100644 tests/aws4_testsuite/post-header-key-case.authz delete mode 100644 tests/aws4_testsuite/post-header-key-case.creq delete mode 100644 tests/aws4_testsuite/post-header-key-case.req delete mode 100644 tests/aws4_testsuite/post-header-key-case.sreq delete mode 100644 tests/aws4_testsuite/post-header-key-case.sts delete mode 100644 tests/aws4_testsuite/post-header-key-sort.authz delete mode 100644 tests/aws4_testsuite/post-header-key-sort.creq delete mode 100644 tests/aws4_testsuite/post-header-key-sort.req delete mode 100644 tests/aws4_testsuite/post-header-key-sort.sreq delete mode 100644 tests/aws4_testsuite/post-header-key-sort.sts delete mode 100644 tests/aws4_testsuite/post-header-value-case.authz delete mode 100644 tests/aws4_testsuite/post-header-value-case.creq delete mode 100644 tests/aws4_testsuite/post-header-value-case.req delete mode 100644 tests/aws4_testsuite/post-header-value-case.sreq delete mode 100644 tests/aws4_testsuite/post-header-value-case.sts delete mode 100644 tests/aws4_testsuite/post-vanilla-empty-query-value.authz delete mode 100644 tests/aws4_testsuite/post-vanilla-empty-query-value.creq delete mode 100644 tests/aws4_testsuite/post-vanilla-empty-query-value.req delete mode 100644 tests/aws4_testsuite/post-vanilla-empty-query-value.sreq delete mode 100644 tests/aws4_testsuite/post-vanilla-empty-query-value.sts delete mode 100644 tests/aws4_testsuite/post-vanilla-query-nonunreserved.authz delete mode 100644 tests/aws4_testsuite/post-vanilla-query-nonunreserved.creq delete mode 100644 tests/aws4_testsuite/post-vanilla-query-nonunreserved.req delete mode 100644 tests/aws4_testsuite/post-vanilla-query-nonunreserved.sreq delete mode 100644 tests/aws4_testsuite/post-vanilla-query-nonunreserved.sts delete mode 100644 tests/aws4_testsuite/post-vanilla-query-space.authz delete mode 100644 tests/aws4_testsuite/post-vanilla-query-space.creq delete mode 100644 tests/aws4_testsuite/post-vanilla-query-space.req delete mode 100644 tests/aws4_testsuite/post-vanilla-query-space.sreq delete mode 100644 tests/aws4_testsuite/post-vanilla-query-space.sts delete mode 100644 tests/aws4_testsuite/post-vanilla-query.authz delete mode 100644 tests/aws4_testsuite/post-vanilla-query.creq delete mode 100644 tests/aws4_testsuite/post-vanilla-query.req delete mode 100644 tests/aws4_testsuite/post-vanilla-query.sreq delete mode 100644 tests/aws4_testsuite/post-vanilla-query.sts delete mode 100644 tests/aws4_testsuite/post-vanilla.authz delete mode 100644 tests/aws4_testsuite/post-vanilla.creq delete mode 100644 tests/aws4_testsuite/post-vanilla.req delete mode 100644 tests/aws4_testsuite/post-vanilla.sreq delete mode 100644 tests/aws4_testsuite/post-vanilla.sts delete mode 100644 tests/aws4_testsuite/post-x-www-form-urlencoded-parameters.authz delete mode 100644 tests/aws4_testsuite/post-x-www-form-urlencoded-parameters.creq delete mode 100644 tests/aws4_testsuite/post-x-www-form-urlencoded-parameters.req delete mode 100644 tests/aws4_testsuite/post-x-www-form-urlencoded-parameters.sreq delete mode 100644 tests/aws4_testsuite/post-x-www-form-urlencoded-parameters.sts delete mode 100644 tests/aws4_testsuite/post-x-www-form-urlencoded.authz delete mode 100644 tests/aws4_testsuite/post-x-www-form-urlencoded.creq delete mode 100644 tests/aws4_testsuite/post-x-www-form-urlencoded.req delete mode 100644 tests/aws4_testsuite/post-x-www-form-urlencoded.sreq delete mode 100644 tests/aws4_testsuite/post-x-www-form-urlencoded.sts delete mode 100644 tests/emarsys_testsuite/get-header-key-duplicate.authz delete mode 100644 tests/emarsys_testsuite/get-header-key-duplicate.creq delete mode 100644 tests/emarsys_testsuite/get-header-key-duplicate.req delete mode 100644 tests/emarsys_testsuite/get-header-key-duplicate.sreq delete mode 100644 tests/emarsys_testsuite/get-header-key-duplicate.sts delete mode 100644 tests/emarsys_testsuite/get-header-value-order.authz delete mode 100644 tests/emarsys_testsuite/get-header-value-order.creq delete mode 100644 tests/emarsys_testsuite/get-header-value-order.req delete mode 100644 tests/emarsys_testsuite/get-header-value-order.sreq delete mode 100644 tests/emarsys_testsuite/get-header-value-order.sts delete mode 100644 tests/emarsys_testsuite/post-header-key-order.authz delete mode 100644 tests/emarsys_testsuite/post-header-key-order.creq delete mode 100644 tests/emarsys_testsuite/post-header-key-order.req delete mode 100644 tests/emarsys_testsuite/post-header-key-order.sreq delete mode 100644 tests/emarsys_testsuite/post-header-key-order.sts delete mode 100644 tests/emarsys_testsuite/post-header-value-spaces-within-quotes.authz delete mode 100644 tests/emarsys_testsuite/post-header-value-spaces-within-quotes.creq delete mode 100644 tests/emarsys_testsuite/post-header-value-spaces-within-quotes.req delete mode 100644 tests/emarsys_testsuite/post-header-value-spaces-within-quotes.sreq delete mode 100644 tests/emarsys_testsuite/post-header-value-spaces-within-quotes.sts delete mode 100644 tests/emarsys_testsuite/post-header-value-spaces.authz delete mode 100644 tests/emarsys_testsuite/post-header-value-spaces.creq delete mode 100644 tests/emarsys_testsuite/post-header-value-spaces.req delete mode 100644 tests/emarsys_testsuite/post-header-value-spaces.sreq delete mode 100644 tests/emarsys_testsuite/post-header-value-spaces.sts create mode 100644 tests/test_escherauth.py delete mode 100644 tests/test_escherauth_amazon.py diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index f0ea066..2d12be5 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -14,10 +14,12 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.7, 3.8, 3.9] + python-version: [3.8, 3.9, '3.10', '3.11', '3.12'] steps: - uses: actions/checkout@v2 + with: + submodules: recursive - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: @@ -27,11 +29,11 @@ jobs: python -m pip install --upgrade pip pip install build pip install -r requirements-dev.txt - - name: Lint with pep8 + - name: Lint with pycodestyle run: | - pep8 --ignore=E501 escherauth + pycodestyle --ignore=E501 escherauth - name: Test with nosetests - run: nosetests + run: nose2 - name: Build package run: python -m build - name: Publish package diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..c402990 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "test-cases"] + path = test-cases + url = git@github.com:EscherAuth/test-cases.git diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a463707 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM python:3.8.18-alpine3.19 + +RUN mkdir /escher +WORKDIR /escher + +COPY setup.py /escher +COPY requirements-dev.txt /escher + +RUN python -m pip install --upgrade pip && \ + pip install build && \ + pip install -r requirements-dev.txt diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..faade38 --- /dev/null +++ b/Makefile @@ -0,0 +1,3 @@ +build: ; docker compose build +lint: ; docker compose run --rm escher pycodestyle --ignore=E501 escherauth +test: ; docker compose run --rm escher nose2 diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..8f07a94 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,6 @@ +version: '3' +services: + escher: + build: . + volumes: + - .:/escher diff --git a/escherauth/escherauth.py b/escherauth/escherauth.py index ec280b8..8400bdb 100644 --- a/escherauth/escherauth.py +++ b/escherauth/escherauth.py @@ -1,16 +1,12 @@ import datetime import hmac + import requests -import urllib import re from hashlib import sha256, sha512 -try: - from urlparse import urlparse, parse_qsl, urljoin - from urllib import quote -except: - from urllib.parse import urlparse, parse_qsl, urljoin, quote +from urllib.parse import parse_qsl, quote, urlsplit, urlencode class EscherException(Exception): @@ -23,17 +19,27 @@ def __init__(self, credential_scope, options, client): self.client = client def __call__(self, request): - return self.escher.sign(request, self.client) + return self.escher.sign_request(request, self.client) -class EscherRequest(): - _uri_regex = re.compile('([^?#]*)(\?(.*))?') +class EscherRequest: + _uri_regex = re.compile(r'([^?#]*)(\?(.*))?') def __init__(self, request): self.type = type(request) self.request = request + self.is_presigned_url = False self.prepare_request_uri() + if self.method() not in ('GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'CONNECT', 'OPTIONS', 'TRACE', 'PATCH'): + raise EscherException('The request method is invalid') + + if self.path().startswith('http://') or self.path().startswith('https://'): + raise EscherException('The request url shouldn\'t contains http or https') + + if self.method() in ('POST', 'PUT', 'PATCH') and self.body() is None: + raise EscherException(f'The request body shouldn\'t be empty if the request method is {self.method()}') + def request(self): return self.request @@ -41,16 +47,16 @@ def prepare_request_uri(self): if self.type is requests.models.PreparedRequest: self.request_uri = self.request.path_url if self.type is dict: - self.request_uri = self.request['uri'] + self.request_uri = self.request['url'] match = re.match(self._uri_regex, self.request_uri) self.uri_path = match.group(1) self.uri_query = match.group(3) def method(self): if self.type is requests.models.PreparedRequest: - return self.request.method + return self.request.method.upper() if self.type is dict: - return self.request['method'] + return self.request['method'].upper() def host(self): if self.type is requests.models.PreparedRequest: @@ -64,6 +70,9 @@ def path(self): def query_parts(self): return parse_qsl((self.uri_query or '').replace(';', '%3b'), True) + def has_query_param(self, query_param): + return query_param.lower() in [key.lower() for key, value in self.query_parts()] + def headers(self): if self.type is requests.models.PreparedRequest: headers = [] @@ -73,33 +82,71 @@ def headers(self): if self.type is dict: return self.request['headers'] + def has_header(self, header): + return header.lower() in [key.lower() for key, value in self.headers()] + def body(self): + if self.is_presigned_url: + return 'UNSIGNED-PAYLOAD' if self.type is requests.models.PreparedRequest: - return self.request.body or '' + return self.request.body or None if self.type is dict: - return self.request.get('body', '') + return self.request.get('body') def add_header(self, header, value): if self.type is requests.models.PreparedRequest: self.request.headers[header] = value if self.type is dict: - self.request['headers'].append((header, value)) + self.request['headers'].append([header, value]) + def set_presigned_url(self, is_presigned_url): + self.is_presigned_url = is_presigned_url -class AuthParams: - def __init__(self, data, vendor_key): - self._init_data(data, 'X-' + vendor_key + '-') - def _init_data(self, data, prefix): - self._data = {} - for (k, v) in data: +class AuthParams: + @staticmethod + def from_headers(headers, algo_prefix, date_header_name, auth_header_name): + auth_data = None + date_data = None + for key, value in headers: + if key.lower() == auth_header_name.lower(): + auth_data = value + if key.lower() == date_header_name.lower(): + date_data = value + + pattern = re.compile(rf'^({algo_prefix}-HMAC-[A-Z0-9,]+).*Credential=([A-Za-z0-9/\-_ ]+),.*SignedHeaders=([A-Za-z\-;]+),.*Signature=([0-9a-f]+)$') + + if match := pattern.match(auth_data): + g = match.groups() + + return AuthParams({ + 'algorithm': g[0], + 'credentials': g[1], + 'signedheaders': g[2], + 'signature': g[3], + 'date': date_data, + }) + else: + raise EscherException('Could not parse auth header') + + @staticmethod + def from_query_parts(query_parts, vendor_key): + prefix = 'X-' + vendor_key + '-' + data = {} + for (k, v) in query_parts: if k.startswith(prefix): - self._data[k.replace(prefix, '').lower()] = v + data[k.replace(prefix, '').lower()] = v + + return AuthParams(data) - def get(self, name): - if name not in self._data: + def __init__(self, data): + self._data = data + + def get(self, name, default_value=None): + value = self._data.get(name, default_value) + if value is None: raise EscherException('Missing authorization parameter: ' + name) - return self._data[name] + return value def get_signed_headers(self): return self.get('signedheaders').lower().split(';') @@ -132,16 +179,20 @@ def get_credential_scope(self): return self.get_credential_data()[2] def get_expires(self): - return int(self.get('expires')) + return int(self.get('expires', 0)) def get_request_date(self): - return datetime.datetime.strptime(self.get('date'), '%Y%m%dT%H%M%SZ') + try: + return datetime.datetime.strptime(self.get('date'), '%Y%m%dT%H%M%SZ') + except ValueError: + return datetime.datetime.strptime(self.get('date'), '%a, %d %b %Y %H:%M:%S GMT') class AuthenticationValidator: - def validate_mandatory_signed_headers(self, headers_to_sign): - if 'host' not in headers_to_sign: - raise EscherException('Host header is not signed') + def validate_mandatory_signed_headers(self, mandatory_signed_headers, headers_to_sign): + for header in mandatory_signed_headers: + if header not in headers_to_sign: + raise EscherException(f'The {header} header is not signed') def validate_hash_algo(self, hash_algo): if hash_algo not in ('SHA256', 'SHA512'): @@ -149,26 +200,30 @@ def validate_hash_algo(self, hash_algo): def validate_dates(self, current_date, request_date, credential_date, expires, clock_skew): if request_date.strftime('%Y%m%d') != credential_date.strftime('%Y%m%d'): - raise EscherException('The request date and credential date do not match') + raise EscherException('The credential date does not match with the request date') min_date = current_date - datetime.timedelta(seconds=(clock_skew + expires)) max_date = current_date + datetime.timedelta(seconds=clock_skew) if request_date < min_date or request_date > max_date: - raise EscherException('Request date is not within the accepted time interval') + raise EscherException('The request date is not within the accepted time range') def validate_credential_scope(self, expected, actual): if actual != expected: - raise EscherException('Invalid credential scope (provided: ' + actual + ', required: ' + expected + ')') + raise EscherException('The credential scope is invalid') def validate_signature(self, expected, actual): if expected != actual: - raise EscherException('The signatures do not match (provided: ' + actual + ', calculated: ' + expected + ')') + raise EscherException('The signatures do not match') class Escher: - _normalize_path = re.compile('([^/]+/\.\./?|/\./|//|/\.$|/\.\.$)') + _normalize_path = re.compile(r'([^/]+/\.\./?|/\./|//|/\.$|/\.\.$)') - def __init__(self, credential_scope, options={}): + def __init__(self, api_key, api_secret, credential_scope, options=None): + if not options: + options = {} + self.api_key = api_key + self.api_secret = api_secret self.credential_scope = credential_scope self.algo_prefix = options.get('algo_prefix', 'ESR') self.vendor_key = options.get('vendor_key', 'Escher') @@ -180,32 +235,91 @@ def __init__(self, credential_scope, options={}): self.algo = self.create_algo() self.algo_id = self.algo_prefix + '-HMAC-' + self.hash_algo - def sign(self, r, client, headers_to_sign=[]): - request = EscherRequest(r) + def sign_request(self, request, headers_to_sign=None): + request = EscherRequest(request) + request.set_presigned_url(False) + + if not self.api_key or not self.api_secret: + raise EscherException('Invalid Escher key') + + if not headers_to_sign: + headers_to_sign = [] + headers_to_sign = [h.lower() for h in headers_to_sign] for header in [self.date_header_name.lower(), 'host']: if header not in headers_to_sign: headers_to_sign.append(header) - current_time = self.current_time or datetime.datetime.utcnow() - request.add_header(self.date_header_name, self.long_date(current_time)) + current_time = self.current_time or datetime.datetime.now(datetime.UTC) - signature = self.generate_signature(client['api_secret'], request, headers_to_sign, current_time) + if not request.has_header(self.date_header_name): + if self.date_header_name.lower() == 'date': + request.add_header(self.date_header_name, self.header_date(current_time)) + else: + request.add_header(self.date_header_name, self.long_date(current_time)) + + signature = self.generate_signature(self.api_secret, request, headers_to_sign, current_time) request.add_header(self.auth_header_name, ", ".join([ - self.algo_id + ' Credential=' + client['api_key'] + '/' + self.short_date( + self.algo_id + ' Credential=' + self.api_key + '/' + self.short_date( current_time) + '/' + self.credential_scope, 'SignedHeaders=' + self.prepare_headers_to_sign(headers_to_sign), 'Signature=' + signature ])) return request.request - def authenticate(self, r, key_db): - request = EscherRequest(r) + def presign_url(self, url, expires): + current_time = self.current_time or datetime.datetime.now(datetime.UTC) + + if not self.api_key or not self.api_secret: + raise EscherException('Invalid Escher key') + + url_to_sign = url + ('&' if '?' in url else '?') + urlencode({ + f'X-{self.vendor_key}-Algorithm': self.algo_id, + f'X-{self.vendor_key}-Credentials': self.api_key + '/' + self.short_date(current_time) + '/' + self.credential_scope, + f'X-{self.vendor_key}-Date': self.long_date(current_time), + f'X-{self.vendor_key}-Expires': expires, + f'X-{self.vendor_key}-SignedHeaders': 'host', + }) + + parts = urlsplit(url_to_sign) + request = EscherRequest({ + 'method': 'GET', + 'url': f'{parts.path}?{parts.query}', + 'headers': [['host', parts.hostname]], + }) + request.set_presigned_url(True) + signature = self.generate_signature(self.api_secret, request, ['host'], current_time) + + return url_to_sign + '&' + urlencode({ + f'X-{self.vendor_key}-Signature': signature, + }) + + def authenticate(self, request, key_db, mandatory_signed_headers=None): + request = EscherRequest(request) + + if mandatory_signed_headers is None: + mandatory_signed_headers = [] + if not isinstance(mandatory_signed_headers, list) or not all([isinstance(h, str) for h in mandatory_signed_headers]): + raise EscherException('The mandatorySignedHeaders parameter must be undefined or array of strings') + mandatory_signed_headers = [h.lower() for h in mandatory_signed_headers] + mandatory_signed_headers.append('host') + + if self.auth_header_name and request.has_header(self.auth_header_name): + auth_params = AuthParams.from_headers(request.headers(), self.algo_prefix, self.date_header_name, self.auth_header_name) + request.set_presigned_url(False) + mandatory_signed_headers.append(self.date_header_name.lower()) + elif request.method() == 'GET' and request.has_query_param(f'X-{self.vendor_key}-Signature'): + auth_params = AuthParams.from_query_parts(request.query_parts(), self.vendor_key) + request.set_presigned_url(True) + else: + raise EscherException('The authorization header is missing') - auth_params = AuthParams(request.query_parts(), self.vendor_key) validator = AuthenticationValidator() + validator.validate_mandatory_signed_headers(mandatory_signed_headers, auth_params.get_signed_headers()) + for header in mandatory_signed_headers: + if not request.has_header(header): + raise EscherException(f'The {header} header is missing') - validator.validate_mandatory_signed_headers(auth_params.get_signed_headers()) validator.validate_hash_algo(auth_params.get_hash_algo()) validator.validate_dates( self.current_time, @@ -264,11 +378,17 @@ def canonicalize_path(self, path): return path def canonicalize_headers(self, headers, headers_to_sign): - headers_list = [] - for key, value in sorted(headers): - if key.lower() in headers_to_sign: - headers_list.append(key.lower() + ':' + self.normalize_white_spaces(value)) - return "\n".join(sorted(headers_list)) + results = {} + for key, value in headers: + if key.lower() not in headers_to_sign: + continue + + if key.lower() in results: + results[key.lower()] += ',' + self.normalize_white_spaces(value) + else: + results[key.lower()] = self.normalize_white_spaces(value) + + return "\n".join([f'{key}:{results[key]}' for key in sorted(results.keys())]) def normalize_white_spaces(self, value): index = 0 @@ -282,7 +402,7 @@ def normalize_white_spaces(self, value): return '"'.join(value_normalized).strip() def canonicalize_query(self, query_parts): - safe = "~+!'()*" + safe = "~+!'*" query_list = [] for key, value in query_parts: if key == 'X-' + self.vendor_key + '-Signature': @@ -304,6 +424,9 @@ def create_algo(self): if self.hash_algo == 'SHA512': return sha512 + def header_date(self, time): + return time.strftime('%a, %d %b %Y %H:%M:%S GMT') + def long_date(self, time): return time.strftime('%Y%m%dT%H%M%SZ') diff --git a/requirements-dev.txt b/requirements-dev.txt index bb0f803..7002309 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,4 +1,3 @@ -nose==1.3.7 -nose_parameterized==0.3.4 -requests>=1.2.3,<=2.0.1 -pep8 \ No newline at end of file +nose2==0.14.1 +requests>=2.0.0,<3.0.0 +pycodestyle==2.11.1 \ No newline at end of file diff --git a/setup.py b/setup.py index 2cea06d..8dea523 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ ], zip_safe=False, install_requires=[ - 'requests>=1.2.3,<3.0.0' + 'requests>=2.0.0,<3.0.0' ], classifiers=[ 'Development Status :: 4 - Beta', diff --git a/test-cases b/test-cases new file mode 160000 index 0000000..41bdfe0 --- /dev/null +++ b/test-cases @@ -0,0 +1 @@ +Subproject commit 41bdfe003c40b8e86a2512c7f746e57eecbf16f6 diff --git a/tests/aws4_testsuite/get-header-key-duplicate.authz b/tests/aws4_testsuite/get-header-key-duplicate.authz deleted file mode 100644 index ac05e35..0000000 --- a/tests/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/aws4_testsuite/get-header-key-duplicate.creq b/tests/aws4_testsuite/get-header-key-duplicate.creq deleted file mode 100644 index 9b1f391..0000000 --- a/tests/aws4_testsuite/get-header-key-duplicate.creq +++ /dev/null @@ -1,10 +0,0 @@ -POST -/ - -date:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com -zoo:foobar,zoobar,zoobar -date:20110909T233600Z - -date;host;zoo -e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/aws4_testsuite/get-header-key-duplicate.req b/tests/aws4_testsuite/get-header-key-duplicate.req deleted file mode 100644 index bc113d3..0000000 --- a/tests/aws4_testsuite/get-header-key-duplicate.req +++ /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 -Date:20110909T233600Z - diff --git a/tests/aws4_testsuite/get-header-key-duplicate.sreq b/tests/aws4_testsuite/get-header-key-duplicate.sreq deleted file mode 100644 index 2c09c81..0000000 --- a/tests/aws4_testsuite/get-header-key-duplicate.sreq +++ /dev/null @@ -1,9 +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 -Date:20110909T233600Z -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host;zoo, Signature=54afcaaf45b331f81cd2edb974f7b824ff4dd594cbbaa945ed636b48477368ed - diff --git a/tests/aws4_testsuite/get-header-key-duplicate.sts b/tests/aws4_testsuite/get-header-key-duplicate.sts deleted file mode 100644 index 7b11b51..0000000 --- a/tests/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/aws4_testsuite/get-header-value-multiline.req b/tests/aws4_testsuite/get-header-value-multiline.req deleted file mode 100644 index 6489599..0000000 --- a/tests/aws4_testsuite/get-header-value-multiline.req +++ /dev/null @@ -1,8 +0,0 @@ -POST / http/1.1 -DATE:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com -Date:20110909T233600Z -p:a - b - c - diff --git a/tests/aws4_testsuite/get-header-value-order.authz b/tests/aws4_testsuite/get-header-value-order.authz deleted file mode 100644 index c80262a..0000000 --- a/tests/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/aws4_testsuite/get-header-value-order.creq b/tests/aws4_testsuite/get-header-value-order.creq deleted file mode 100644 index 25271f9..0000000 --- a/tests/aws4_testsuite/get-header-value-order.creq +++ /dev/null @@ -1,10 +0,0 @@ -POST -/ - -date:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com -Date:20110909T233600Z -p:a,a,p,z - -date;host;p -e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/aws4_testsuite/get-header-value-order.req b/tests/aws4_testsuite/get-header-value-order.req deleted file mode 100644 index eb83518..0000000 --- a/tests/aws4_testsuite/get-header-value-order.req +++ /dev/null @@ -1,9 +0,0 @@ -POST / http/1.1 -DATE:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com -Date:20110909T233600Z -p:z -p:a -p:p -p:a - diff --git a/tests/aws4_testsuite/get-header-value-order.sreq b/tests/aws4_testsuite/get-header-value-order.sreq deleted file mode 100644 index 2ce996e..0000000 --- a/tests/aws4_testsuite/get-header-value-order.sreq +++ /dev/null @@ -1,10 +0,0 @@ -POST / http/1.1 -DATE:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com -Date:20110909T233600Z -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/aws4_testsuite/get-header-value-order.sts b/tests/aws4_testsuite/get-header-value-order.sts deleted file mode 100644 index d80190a..0000000 --- a/tests/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/aws4_testsuite/get-header-value-trim.authz b/tests/aws4_testsuite/get-header-value-trim.authz deleted file mode 100644 index 2d870cc..0000000 --- a/tests/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/aws4_testsuite/get-header-value-trim.creq b/tests/aws4_testsuite/get-header-value-trim.creq deleted file mode 100644 index 43b4a85..0000000 --- a/tests/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/aws4_testsuite/get-header-value-trim.req b/tests/aws4_testsuite/get-header-value-trim.req deleted file mode 100644 index de28384..0000000 --- a/tests/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 -date:20110909T233600Z diff --git a/tests/aws4_testsuite/get-header-value-trim.sreq b/tests/aws4_testsuite/get-header-value-trim.sreq deleted file mode 100644 index 0006ccb..0000000 --- a/tests/aws4_testsuite/get-header-value-trim.sreq +++ /dev/null @@ -1,7 +0,0 @@ -POST / http/1.1 -DATE:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com -p: phfft -Date:20110909T233600Z -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host;p, Signature=2926b977748b55e69ef2d8885f5ed853579e266ebcea01166202db38bd820a13 - diff --git a/tests/aws4_testsuite/get-header-value-trim.sts b/tests/aws4_testsuite/get-header-value-trim.sts deleted file mode 100644 index 7b7ead8..0000000 --- a/tests/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/aws4_testsuite/get-relative-relative.authz b/tests/aws4_testsuite/get-relative-relative.authz deleted file mode 100644 index c367061..0000000 --- a/tests/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=ee50b65f64c3db8e0ca3f8199feaa23585842a1d84869161452f1125cc8a507a \ No newline at end of file diff --git a/tests/aws4_testsuite/get-relative-relative.creq b/tests/aws4_testsuite/get-relative-relative.creq deleted file mode 100644 index 8519923..0000000 --- a/tests/aws4_testsuite/get-relative-relative.creq +++ /dev/null @@ -1,8 +0,0 @@ -GET -/ - -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/aws4_testsuite/get-relative-relative.req b/tests/aws4_testsuite/get-relative-relative.req deleted file mode 100644 index dab95bb..0000000 --- a/tests/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/aws4_testsuite/get-relative-relative.sreq b/tests/aws4_testsuite/get-relative-relative.sreq deleted file mode 100644 index 02c391c..0000000 --- a/tests/aws4_testsuite/get-relative-relative.sreq +++ /dev/null @@ -1,6 +0,0 @@ -GET /foo/bar/../.. http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Date:20110909T233600Z -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=ee50b65f64c3db8e0ca3f8199feaa23585842a1d84869161452f1125cc8a507a - diff --git a/tests/aws4_testsuite/get-relative-relative.sts b/tests/aws4_testsuite/get-relative-relative.sts deleted file mode 100644 index c7bcc67..0000000 --- a/tests/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/aws4_testsuite/get-relative.authz b/tests/aws4_testsuite/get-relative.authz deleted file mode 100644 index c367061..0000000 --- a/tests/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=ee50b65f64c3db8e0ca3f8199feaa23585842a1d84869161452f1125cc8a507a \ No newline at end of file diff --git a/tests/aws4_testsuite/get-relative.creq b/tests/aws4_testsuite/get-relative.creq deleted file mode 100644 index 8519923..0000000 --- a/tests/aws4_testsuite/get-relative.creq +++ /dev/null @@ -1,8 +0,0 @@ -GET -/ - -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/aws4_testsuite/get-relative.req b/tests/aws4_testsuite/get-relative.req deleted file mode 100644 index 18344ee..0000000 --- a/tests/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/aws4_testsuite/get-relative.sreq b/tests/aws4_testsuite/get-relative.sreq deleted file mode 100644 index 9d83fbb..0000000 --- a/tests/aws4_testsuite/get-relative.sreq +++ /dev/null @@ -1,6 +0,0 @@ -GET /foo/.. http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Date:20110909T233600Z -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=ee50b65f64c3db8e0ca3f8199feaa23585842a1d84869161452f1125cc8a507a - diff --git a/tests/aws4_testsuite/get-relative.sts b/tests/aws4_testsuite/get-relative.sts deleted file mode 100644 index c7bcc67..0000000 --- a/tests/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/aws4_testsuite/get-slash-dot-slash.authz b/tests/aws4_testsuite/get-slash-dot-slash.authz deleted file mode 100644 index c367061..0000000 --- a/tests/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=ee50b65f64c3db8e0ca3f8199feaa23585842a1d84869161452f1125cc8a507a \ No newline at end of file diff --git a/tests/aws4_testsuite/get-slash-dot-slash.creq b/tests/aws4_testsuite/get-slash-dot-slash.creq deleted file mode 100644 index 8519923..0000000 --- a/tests/aws4_testsuite/get-slash-dot-slash.creq +++ /dev/null @@ -1,8 +0,0 @@ -GET -/ - -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/aws4_testsuite/get-slash-dot-slash.req b/tests/aws4_testsuite/get-slash-dot-slash.req deleted file mode 100644 index 00ffac6..0000000 --- a/tests/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/aws4_testsuite/get-slash-dot-slash.sreq b/tests/aws4_testsuite/get-slash-dot-slash.sreq deleted file mode 100644 index e6896ee..0000000 --- a/tests/aws4_testsuite/get-slash-dot-slash.sreq +++ /dev/null @@ -1,6 +0,0 @@ -GET /./ http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Date:20110909T233600Z -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=ee50b65f64c3db8e0ca3f8199feaa23585842a1d84869161452f1125cc8a507a - diff --git a/tests/aws4_testsuite/get-slash-dot-slash.sts b/tests/aws4_testsuite/get-slash-dot-slash.sts deleted file mode 100644 index c7bcc67..0000000 --- a/tests/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/aws4_testsuite/get-slash-pointless-dot.authz b/tests/aws4_testsuite/get-slash-pointless-dot.authz deleted file mode 100644 index c1ee851..0000000 --- a/tests/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=96ead781d627247945d812c4da15937b14955a4fd57ab6ddef420245fc3da823 \ No newline at end of file diff --git a/tests/aws4_testsuite/get-slash-pointless-dot.creq b/tests/aws4_testsuite/get-slash-pointless-dot.creq deleted file mode 100644 index 280cc1e..0000000 --- a/tests/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/aws4_testsuite/get-slash-pointless-dot.req b/tests/aws4_testsuite/get-slash-pointless-dot.req deleted file mode 100644 index 0953f61..0000000 --- a/tests/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/aws4_testsuite/get-slash-pointless-dot.sreq b/tests/aws4_testsuite/get-slash-pointless-dot.sreq deleted file mode 100644 index e1c35f3..0000000 --- a/tests/aws4_testsuite/get-slash-pointless-dot.sreq +++ /dev/null @@ -1,6 +0,0 @@ -GET /./foo http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Date:20110909T233600Z -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=96ead781d627247945d812c4da15937b14955a4fd57ab6ddef420245fc3da823 - diff --git a/tests/aws4_testsuite/get-slash-pointless-dot.sts b/tests/aws4_testsuite/get-slash-pointless-dot.sts deleted file mode 100644 index 0c3394b..0000000 --- a/tests/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/aws4_testsuite/get-slash.authz b/tests/aws4_testsuite/get-slash.authz deleted file mode 100644 index c367061..0000000 --- a/tests/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=ee50b65f64c3db8e0ca3f8199feaa23585842a1d84869161452f1125cc8a507a \ No newline at end of file diff --git a/tests/aws4_testsuite/get-slash.creq b/tests/aws4_testsuite/get-slash.creq deleted file mode 100644 index 8519923..0000000 --- a/tests/aws4_testsuite/get-slash.creq +++ /dev/null @@ -1,8 +0,0 @@ -GET -/ - -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/aws4_testsuite/get-slash.req b/tests/aws4_testsuite/get-slash.req deleted file mode 100644 index 2dcd49c..0000000 --- a/tests/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/aws4_testsuite/get-slash.sreq b/tests/aws4_testsuite/get-slash.sreq deleted file mode 100644 index 4c6fdbf..0000000 --- a/tests/aws4_testsuite/get-slash.sreq +++ /dev/null @@ -1,6 +0,0 @@ -GET // http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Date:20110909T233600Z -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=ee50b65f64c3db8e0ca3f8199feaa23585842a1d84869161452f1125cc8a507a - diff --git a/tests/aws4_testsuite/get-slash.sts b/tests/aws4_testsuite/get-slash.sts deleted file mode 100644 index c7bcc67..0000000 --- a/tests/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/aws4_testsuite/get-slashes.authz b/tests/aws4_testsuite/get-slashes.authz deleted file mode 100644 index 3f75404..0000000 --- a/tests/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=b502829884b547557d9b71396bb10cd9beed38427b49f7b5fcb9a1245962d037 \ No newline at end of file diff --git a/tests/aws4_testsuite/get-slashes.creq b/tests/aws4_testsuite/get-slashes.creq deleted file mode 100644 index 759b0c3..0000000 --- a/tests/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/aws4_testsuite/get-slashes.req b/tests/aws4_testsuite/get-slashes.req deleted file mode 100644 index e326c43..0000000 --- a/tests/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/aws4_testsuite/get-slashes.sreq b/tests/aws4_testsuite/get-slashes.sreq deleted file mode 100644 index f4de556..0000000 --- a/tests/aws4_testsuite/get-slashes.sreq +++ /dev/null @@ -1,6 +0,0 @@ -GET //foo// http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Date:20110909T233600Z -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=b502829884b547557d9b71396bb10cd9beed38427b49f7b5fcb9a1245962d037 - diff --git a/tests/aws4_testsuite/get-slashes.sts b/tests/aws4_testsuite/get-slashes.sts deleted file mode 100644 index e6c6f14..0000000 --- a/tests/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/aws4_testsuite/get-space.authz b/tests/aws4_testsuite/get-space.authz deleted file mode 100644 index 936fe01..0000000 --- a/tests/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=b7265a0b5d8922c50d29a254ea0cf73e6b591f64dcd43ee0eb4a0c00142efc9d \ No newline at end of file diff --git a/tests/aws4_testsuite/get-space.creq b/tests/aws4_testsuite/get-space.creq deleted file mode 100644 index e34ff1a..0000000 --- a/tests/aws4_testsuite/get-space.creq +++ /dev/null @@ -1,8 +0,0 @@ -GET -/%20/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/aws4_testsuite/get-space.req b/tests/aws4_testsuite/get-space.req deleted file mode 100644 index 0c64446..0000000 --- a/tests/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/aws4_testsuite/get-space.sreq b/tests/aws4_testsuite/get-space.sreq deleted file mode 100644 index 1bc99b3..0000000 --- a/tests/aws4_testsuite/get-space.sreq +++ /dev/null @@ -1,6 +0,0 @@ -GET /%20/foo http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Date:20110909T233600Z -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=b7265a0b5d8922c50d29a254ea0cf73e6b591f64dcd43ee0eb4a0c00142efc9d - diff --git a/tests/aws4_testsuite/get-space.sts b/tests/aws4_testsuite/get-space.sts deleted file mode 100644 index 48b7200..0000000 --- a/tests/aws4_testsuite/get-space.sts +++ /dev/null @@ -1,4 +0,0 @@ -AWS4-HMAC-SHA256 -20110909T233600Z -20110909/us-east-1/host/aws4_request -69c45fb9fe3fd76442b5086e50b2e9fec8298358da957b293ef26e506fdfb54b \ No newline at end of file diff --git a/tests/aws4_testsuite/get-unreserved.authz b/tests/aws4_testsuite/get-unreserved.authz deleted file mode 100644 index 7b4328e..0000000 --- a/tests/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=d3c6f251c7c62ef53f62b2a8002cb62b69cb1dc6405398711b591b7674520171 \ No newline at end of file diff --git a/tests/aws4_testsuite/get-unreserved.creq b/tests/aws4_testsuite/get-unreserved.creq deleted file mode 100644 index a0c0c2b..0000000 --- a/tests/aws4_testsuite/get-unreserved.creq +++ /dev/null @@ -1,8 +0,0 @@ -GET -/-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz - -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/aws4_testsuite/get-unreserved.req b/tests/aws4_testsuite/get-unreserved.req deleted file mode 100644 index d88a5d7..0000000 --- a/tests/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/aws4_testsuite/get-unreserved.sreq b/tests/aws4_testsuite/get-unreserved.sreq deleted file mode 100644 index 711f41e..0000000 --- a/tests/aws4_testsuite/get-unreserved.sreq +++ /dev/null @@ -1,6 +0,0 @@ -GET /-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Date:20110909T233600Z -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=d3c6f251c7c62ef53f62b2a8002cb62b69cb1dc6405398711b591b7674520171 - diff --git a/tests/aws4_testsuite/get-unreserved.sts b/tests/aws4_testsuite/get-unreserved.sts deleted file mode 100644 index c02109b..0000000 --- a/tests/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/aws4_testsuite/get-utf8.authz b/tests/aws4_testsuite/get-utf8.authz deleted file mode 100644 index 49ae1e1..0000000 --- a/tests/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=c4fe565a679f8b44322af5791df3810a4e861534704af6dc4cf99588e828779a \ No newline at end of file diff --git a/tests/aws4_testsuite/get-utf8.creq b/tests/aws4_testsuite/get-utf8.creq deleted file mode 100644 index 65946cb..0000000 --- a/tests/aws4_testsuite/get-utf8.creq +++ /dev/null @@ -1,8 +0,0 @@ -GET -/%E1%88%B4 - -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/aws4_testsuite/get-utf8.req b/tests/aws4_testsuite/get-utf8.req deleted file mode 100644 index 83291e8..0000000 --- a/tests/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/aws4_testsuite/get-utf8.sreq b/tests/aws4_testsuite/get-utf8.sreq deleted file mode 100644 index 2d094ed..0000000 --- a/tests/aws4_testsuite/get-utf8.sreq +++ /dev/null @@ -1,6 +0,0 @@ -GET /%E1%88%B4 http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Date:20110909T233600Z -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=c4fe565a679f8b44322af5791df3810a4e861534704af6dc4cf99588e828779a - diff --git a/tests/aws4_testsuite/get-utf8.sts b/tests/aws4_testsuite/get-utf8.sts deleted file mode 100644 index 63871e5..0000000 --- a/tests/aws4_testsuite/get-utf8.sts +++ /dev/null @@ -1,4 +0,0 @@ -AWS4-HMAC-SHA256 -20110909T233600Z -20110909/us-east-1/host/aws4_request -27ba31df5dbc6e063d8f87d62eb07143f7f271c5330a917840586ac1c85b6f6b \ No newline at end of file diff --git a/tests/aws4_testsuite/get-vanilla-empty-query-key.authz b/tests/aws4_testsuite/get-vanilla-empty-query-key.authz deleted file mode 100644 index 9c5e151..0000000 --- a/tests/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=6e2a44906d8eb193f8b052ba956704e7a5a4be0eff2bc50fc6deb3eb691fe8cc \ No newline at end of file diff --git a/tests/aws4_testsuite/get-vanilla-empty-query-key.creq b/tests/aws4_testsuite/get-vanilla-empty-query-key.creq deleted file mode 100644 index 1efbecf..0000000 --- a/tests/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/aws4_testsuite/get-vanilla-empty-query-key.req b/tests/aws4_testsuite/get-vanilla-empty-query-key.req deleted file mode 100644 index fac3491..0000000 --- a/tests/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/aws4_testsuite/get-vanilla-empty-query-key.sreq b/tests/aws4_testsuite/get-vanilla-empty-query-key.sreq deleted file mode 100644 index 4c7d63f..0000000 --- a/tests/aws4_testsuite/get-vanilla-empty-query-key.sreq +++ /dev/null @@ -1,6 +0,0 @@ -GET /?foo=bar http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Date:20110909T233600Z -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=6e2a44906d8eb193f8b052ba956704e7a5a4be0eff2bc50fc6deb3eb691fe8cc - diff --git a/tests/aws4_testsuite/get-vanilla-empty-query-key.sts b/tests/aws4_testsuite/get-vanilla-empty-query-key.sts deleted file mode 100644 index 785c7e5..0000000 --- a/tests/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/aws4_testsuite/get-vanilla-query-order-key-case.authz b/tests/aws4_testsuite/get-vanilla-query-order-key-case.authz deleted file mode 100644 index 6cb5a99..0000000 --- a/tests/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=4bf4c2208cf5f139a942d1bf68cba2d99311f57a73cd0ef96d6909a45c1b4a2f \ No newline at end of file diff --git a/tests/aws4_testsuite/get-vanilla-query-order-key-case.creq b/tests/aws4_testsuite/get-vanilla-query-order-key-case.creq deleted file mode 100644 index f1e99d1..0000000 --- a/tests/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/aws4_testsuite/get-vanilla-query-order-key-case.req b/tests/aws4_testsuite/get-vanilla-query-order-key-case.req deleted file mode 100644 index d5e81df..0000000 --- a/tests/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/aws4_testsuite/get-vanilla-query-order-key-case.sreq b/tests/aws4_testsuite/get-vanilla-query-order-key-case.sreq deleted file mode 100644 index 89aee81..0000000 --- a/tests/aws4_testsuite/get-vanilla-query-order-key-case.sreq +++ /dev/null @@ -1,6 +0,0 @@ -GET /?foo=Zoo&foo=aha http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Date:20110909T233600Z -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=4bf4c2208cf5f139a942d1bf68cba2d99311f57a73cd0ef96d6909a45c1b4a2f - diff --git a/tests/aws4_testsuite/get-vanilla-query-order-key-case.sts b/tests/aws4_testsuite/get-vanilla-query-order-key-case.sts deleted file mode 100644 index 4d255cc..0000000 --- a/tests/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/aws4_testsuite/get-vanilla-query-order-key.authz b/tests/aws4_testsuite/get-vanilla-query-order-key.authz deleted file mode 100644 index e23af75..0000000 --- a/tests/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=8cbda601ffbaa1358194d32e9bafe760fd5715b6259d8bc8d9b7700253541cb3 \ No newline at end of file diff --git a/tests/aws4_testsuite/get-vanilla-query-order-key.creq b/tests/aws4_testsuite/get-vanilla-query-order-key.creq deleted file mode 100644 index 46b1c0f..0000000 --- a/tests/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/aws4_testsuite/get-vanilla-query-order-key.req b/tests/aws4_testsuite/get-vanilla-query-order-key.req deleted file mode 100644 index f1b75b1..0000000 --- a/tests/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/aws4_testsuite/get-vanilla-query-order-key.sreq b/tests/aws4_testsuite/get-vanilla-query-order-key.sreq deleted file mode 100644 index 9818025..0000000 --- a/tests/aws4_testsuite/get-vanilla-query-order-key.sreq +++ /dev/null @@ -1,6 +0,0 @@ -GET /?a=foo&b=foo http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Date:20110909T233600Z -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=8cbda601ffbaa1358194d32e9bafe760fd5715b6259d8bc8d9b7700253541cb3 - diff --git a/tests/aws4_testsuite/get-vanilla-query-order-key.sts b/tests/aws4_testsuite/get-vanilla-query-order-key.sts deleted file mode 100644 index e791351..0000000 --- a/tests/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/aws4_testsuite/get-vanilla-query-order-value.authz b/tests/aws4_testsuite/get-vanilla-query-order-value.authz deleted file mode 100644 index 9b490d0..0000000 --- a/tests/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=49a0cec1430bc89801b03956ee700039a92d838f792456030b206c1e3ab45b8f \ No newline at end of file diff --git a/tests/aws4_testsuite/get-vanilla-query-order-value.creq b/tests/aws4_testsuite/get-vanilla-query-order-value.creq deleted file mode 100644 index 3c0d516..0000000 --- a/tests/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/aws4_testsuite/get-vanilla-query-order-value.req b/tests/aws4_testsuite/get-vanilla-query-order-value.req deleted file mode 100644 index aa8a26a..0000000 --- a/tests/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 -Date:20110909T233600Z diff --git a/tests/aws4_testsuite/get-vanilla-query-order-value.sreq b/tests/aws4_testsuite/get-vanilla-query-order-value.sreq deleted file mode 100644 index 3b2a165..0000000 --- a/tests/aws4_testsuite/get-vanilla-query-order-value.sreq +++ /dev/null @@ -1,6 +0,0 @@ -GET /?foo=b&foo=a http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Date:20110909T233600Z -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=49a0cec1430bc89801b03956ee700039a92d838f792456030b206c1e3ab45b8f - diff --git a/tests/aws4_testsuite/get-vanilla-query-order-value.sts b/tests/aws4_testsuite/get-vanilla-query-order-value.sts deleted file mode 100644 index 95becb2..0000000 --- a/tests/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/aws4_testsuite/get-vanilla-query-unreserved.authz b/tests/aws4_testsuite/get-vanilla-query-unreserved.authz deleted file mode 100644 index 05fa1d3..0000000 --- a/tests/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=da4f0f0137ce7ef02c99b6cf0afa18b61ce51feb9197a64317c1911713b4a8a1 \ No newline at end of file diff --git a/tests/aws4_testsuite/get-vanilla-query-unreserved.creq b/tests/aws4_testsuite/get-vanilla-query-unreserved.creq deleted file mode 100644 index 4a43670..0000000 --- a/tests/aws4_testsuite/get-vanilla-query-unreserved.creq +++ /dev/null @@ -1,8 +0,0 @@ -GET -/ --._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz=-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz -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/aws4_testsuite/get-vanilla-query-unreserved.req b/tests/aws4_testsuite/get-vanilla-query-unreserved.req deleted file mode 100644 index 72f6173..0000000 --- a/tests/aws4_testsuite/get-vanilla-query-unreserved.req +++ /dev/null @@ -1,4 +0,0 @@ -GET /?-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz=-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com - diff --git a/tests/aws4_testsuite/get-vanilla-query-unreserved.sreq b/tests/aws4_testsuite/get-vanilla-query-unreserved.sreq deleted file mode 100644 index 73e81dc..0000000 --- a/tests/aws4_testsuite/get-vanilla-query-unreserved.sreq +++ /dev/null @@ -1,6 +0,0 @@ -GET /?-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz=-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Date:20110909T233600Z -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=da4f0f0137ce7ef02c99b6cf0afa18b61ce51feb9197a64317c1911713b4a8a1 - diff --git a/tests/aws4_testsuite/get-vanilla-query-unreserved.sts b/tests/aws4_testsuite/get-vanilla-query-unreserved.sts deleted file mode 100644 index b454387..0000000 --- a/tests/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/aws4_testsuite/get-vanilla-query.authz b/tests/aws4_testsuite/get-vanilla-query.authz deleted file mode 100644 index c367061..0000000 --- a/tests/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=ee50b65f64c3db8e0ca3f8199feaa23585842a1d84869161452f1125cc8a507a \ No newline at end of file diff --git a/tests/aws4_testsuite/get-vanilla-query.creq b/tests/aws4_testsuite/get-vanilla-query.creq deleted file mode 100644 index 8519923..0000000 --- a/tests/aws4_testsuite/get-vanilla-query.creq +++ /dev/null @@ -1,8 +0,0 @@ -GET -/ - -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/aws4_testsuite/get-vanilla-query.req b/tests/aws4_testsuite/get-vanilla-query.req deleted file mode 100644 index dbb844e..0000000 --- a/tests/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 -Date:20110909T233600Z diff --git a/tests/aws4_testsuite/get-vanilla-query.sreq b/tests/aws4_testsuite/get-vanilla-query.sreq deleted file mode 100644 index a52fb82..0000000 --- a/tests/aws4_testsuite/get-vanilla-query.sreq +++ /dev/null @@ -1,6 +0,0 @@ -GET / http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Date:20110909T233600Z -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=ee50b65f64c3db8e0ca3f8199feaa23585842a1d84869161452f1125cc8a507a - diff --git a/tests/aws4_testsuite/get-vanilla-query.sts b/tests/aws4_testsuite/get-vanilla-query.sts deleted file mode 100644 index c7bcc67..0000000 --- a/tests/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/aws4_testsuite/get-vanilla-ut8-query.authz b/tests/aws4_testsuite/get-vanilla-ut8-query.authz deleted file mode 100644 index 354ea70..0000000 --- a/tests/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=cda9b9874490ce67bee9edd1a9ac7a923d5afc1ede511c8275a09f66f36bf2e2 \ No newline at end of file diff --git a/tests/aws4_testsuite/get-vanilla-ut8-query.creq b/tests/aws4_testsuite/get-vanilla-ut8-query.creq deleted file mode 100644 index 9e4be3c..0000000 --- a/tests/aws4_testsuite/get-vanilla-ut8-query.creq +++ /dev/null @@ -1,8 +0,0 @@ -GET -/ -%E1%88%B4=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/aws4_testsuite/get-vanilla-ut8-query.req b/tests/aws4_testsuite/get-vanilla-ut8-query.req deleted file mode 100644 index 581e335..0000000 --- a/tests/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/aws4_testsuite/get-vanilla-ut8-query.sreq b/tests/aws4_testsuite/get-vanilla-ut8-query.sreq deleted file mode 100644 index 5abea94..0000000 --- a/tests/aws4_testsuite/get-vanilla-ut8-query.sreq +++ /dev/null @@ -1,6 +0,0 @@ -GET /?ሴ=bar http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Date:20110909T233600Z -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=cda9b9874490ce67bee9edd1a9ac7a923d5afc1ede511c8275a09f66f36bf2e2 - diff --git a/tests/aws4_testsuite/get-vanilla-ut8-query.sts b/tests/aws4_testsuite/get-vanilla-ut8-query.sts deleted file mode 100644 index d14eedf..0000000 --- a/tests/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/aws4_testsuite/get-vanilla.authz b/tests/aws4_testsuite/get-vanilla.authz deleted file mode 100644 index c367061..0000000 --- a/tests/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=ee50b65f64c3db8e0ca3f8199feaa23585842a1d84869161452f1125cc8a507a \ No newline at end of file diff --git a/tests/aws4_testsuite/get-vanilla.creq b/tests/aws4_testsuite/get-vanilla.creq deleted file mode 100644 index 8519923..0000000 --- a/tests/aws4_testsuite/get-vanilla.creq +++ /dev/null @@ -1,8 +0,0 @@ -GET -/ - -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/aws4_testsuite/get-vanilla.req b/tests/aws4_testsuite/get-vanilla.req deleted file mode 100644 index 77b339a..0000000 --- a/tests/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/aws4_testsuite/get-vanilla.sreq b/tests/aws4_testsuite/get-vanilla.sreq deleted file mode 100644 index a52fb82..0000000 --- a/tests/aws4_testsuite/get-vanilla.sreq +++ /dev/null @@ -1,6 +0,0 @@ -GET / http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Date:20110909T233600Z -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=ee50b65f64c3db8e0ca3f8199feaa23585842a1d84869161452f1125cc8a507a - diff --git a/tests/aws4_testsuite/get-vanilla.sts b/tests/aws4_testsuite/get-vanilla.sts deleted file mode 100644 index c7bcc67..0000000 --- a/tests/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/aws4_testsuite/post-header-key-case.authz b/tests/aws4_testsuite/post-header-key-case.authz deleted file mode 100644 index 8889d6b..0000000 --- a/tests/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=27a004de7e3d551fa5a7546dfc59d00f4f810d83487dd3d27e75b9a9acef096c \ No newline at end of file diff --git a/tests/aws4_testsuite/post-header-key-case.creq b/tests/aws4_testsuite/post-header-key-case.creq deleted file mode 100644 index a1c8480..0000000 --- a/tests/aws4_testsuite/post-header-key-case.creq +++ /dev/null @@ -1,8 +0,0 @@ -POST -/ - -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/aws4_testsuite/post-header-key-case.req b/tests/aws4_testsuite/post-header-key-case.req deleted file mode 100644 index 67d74a3..0000000 --- a/tests/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/aws4_testsuite/post-header-key-case.sreq b/tests/aws4_testsuite/post-header-key-case.sreq deleted file mode 100644 index 18f52dd..0000000 --- a/tests/aws4_testsuite/post-header-key-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 -Date:20110909T233600Z -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=27a004de7e3d551fa5a7546dfc59d00f4f810d83487dd3d27e75b9a9acef096c - diff --git a/tests/aws4_testsuite/post-header-key-case.sts b/tests/aws4_testsuite/post-header-key-case.sts deleted file mode 100644 index 30fb98a..0000000 --- a/tests/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/aws4_testsuite/post-header-key-sort.authz b/tests/aws4_testsuite/post-header-key-sort.authz deleted file mode 100644 index 9e8a0c6..0000000 --- a/tests/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=1cf88d871c747c2300acca7eeda5a383efdbeb965d6105835ed4ff6612684a94 \ No newline at end of file diff --git a/tests/aws4_testsuite/post-header-key-sort.creq b/tests/aws4_testsuite/post-header-key-sort.creq deleted file mode 100644 index 7cea8ea..0000000 --- a/tests/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/aws4_testsuite/post-header-key-sort.req b/tests/aws4_testsuite/post-header-key-sort.req deleted file mode 100644 index 61c73de..0000000 --- a/tests/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/aws4_testsuite/post-header-key-sort.sreq b/tests/aws4_testsuite/post-header-key-sort.sreq deleted file mode 100644 index 686c500..0000000 --- a/tests/aws4_testsuite/post-header-key-sort.sreq +++ /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 -Date:20110909T233600Z -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host;zoo, Signature=1cf88d871c747c2300acca7eeda5a383efdbeb965d6105835ed4ff6612684a94 - diff --git a/tests/aws4_testsuite/post-header-key-sort.sts b/tests/aws4_testsuite/post-header-key-sort.sts deleted file mode 100644 index 3cf1dd7..0000000 --- a/tests/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/aws4_testsuite/post-header-value-case.authz b/tests/aws4_testsuite/post-header-value-case.authz deleted file mode 100644 index d9793dc..0000000 --- a/tests/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=29071c526031e2eda2504a8c7966e160463d766f49bbb9254dd0e99768396235 \ No newline at end of file diff --git a/tests/aws4_testsuite/post-header-value-case.creq b/tests/aws4_testsuite/post-header-value-case.creq deleted file mode 100644 index e97491d..0000000 --- a/tests/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/aws4_testsuite/post-header-value-case.req b/tests/aws4_testsuite/post-header-value-case.req deleted file mode 100644 index f687230..0000000 --- a/tests/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/aws4_testsuite/post-header-value-case.sreq b/tests/aws4_testsuite/post-header-value-case.sreq deleted file mode 100644 index 388f6e0..0000000 --- a/tests/aws4_testsuite/post-header-value-case.sreq +++ /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 -Date:20110909T233600Z -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host;zoo, Signature=29071c526031e2eda2504a8c7966e160463d766f49bbb9254dd0e99768396235 - diff --git a/tests/aws4_testsuite/post-header-value-case.sts b/tests/aws4_testsuite/post-header-value-case.sts deleted file mode 100644 index e67301c..0000000 --- a/tests/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/aws4_testsuite/post-vanilla-empty-query-value.authz b/tests/aws4_testsuite/post-vanilla-empty-query-value.authz deleted file mode 100644 index 021252b..0000000 --- a/tests/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=b4dc2397c40ac58b653b52bb9db4d6b3565b5f16cd3d3e913048e72ee8a7a376 \ No newline at end of file diff --git a/tests/aws4_testsuite/post-vanilla-empty-query-value.creq b/tests/aws4_testsuite/post-vanilla-empty-query-value.creq deleted file mode 100644 index f46634d..0000000 --- a/tests/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/aws4_testsuite/post-vanilla-empty-query-value.req b/tests/aws4_testsuite/post-vanilla-empty-query-value.req deleted file mode 100644 index 1351de5..0000000 --- a/tests/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/aws4_testsuite/post-vanilla-empty-query-value.sreq b/tests/aws4_testsuite/post-vanilla-empty-query-value.sreq deleted file mode 100644 index e8d0f25..0000000 --- a/tests/aws4_testsuite/post-vanilla-empty-query-value.sreq +++ /dev/null @@ -1,6 +0,0 @@ -POST /?foo=bar http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Date:20110909T233600Z -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=b4dc2397c40ac58b653b52bb9db4d6b3565b5f16cd3d3e913048e72ee8a7a376 - diff --git a/tests/aws4_testsuite/post-vanilla-empty-query-value.sts b/tests/aws4_testsuite/post-vanilla-empty-query-value.sts deleted file mode 100644 index fddcbb7..0000000 --- a/tests/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/aws4_testsuite/post-vanilla-query-nonunreserved.authz b/tests/aws4_testsuite/post-vanilla-query-nonunreserved.authz deleted file mode 100644 index 46b08fc..0000000 --- a/tests/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=f514e236751490a1c02fbbb79026b7fd3ede2b698f38673f9fe602a624422f02 \ No newline at end of file diff --git a/tests/aws4_testsuite/post-vanilla-query-nonunreserved.creq b/tests/aws4_testsuite/post-vanilla-query-nonunreserved.creq deleted file mode 100644 index 48b903f..0000000 --- a/tests/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/aws4_testsuite/post-vanilla-query-nonunreserved.req b/tests/aws4_testsuite/post-vanilla-query-nonunreserved.req deleted file mode 100644 index 07dd561..0000000 --- a/tests/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/aws4_testsuite/post-vanilla-query-nonunreserved.sreq b/tests/aws4_testsuite/post-vanilla-query-nonunreserved.sreq deleted file mode 100644 index d469175..0000000 --- a/tests/aws4_testsuite/post-vanilla-query-nonunreserved.sreq +++ /dev/null @@ -1,6 +0,0 @@ -POST /?@#$%^&+=/,?><`";:\|][{} =@#$%^&+=/,?><`";:\|][{} http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Date:20110909T233600Z -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=f514e236751490a1c02fbbb79026b7fd3ede2b698f38673f9fe602a624422f02 - diff --git a/tests/aws4_testsuite/post-vanilla-query-nonunreserved.sts b/tests/aws4_testsuite/post-vanilla-query-nonunreserved.sts deleted file mode 100644 index 0df239b..0000000 --- a/tests/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/aws4_testsuite/post-vanilla-query-space.authz b/tests/aws4_testsuite/post-vanilla-query-space.authz deleted file mode 100644 index 2f94722..0000000 --- a/tests/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=42f087f5c310d7c5b041e03d66a783f374ac749f0c25a7ae93e41ab9248649fd \ No newline at end of file diff --git a/tests/aws4_testsuite/post-vanilla-query-space.creq b/tests/aws4_testsuite/post-vanilla-query-space.creq deleted file mode 100644 index 0cb49e5..0000000 --- a/tests/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/aws4_testsuite/post-vanilla-query-space.req b/tests/aws4_testsuite/post-vanilla-query-space.req deleted file mode 100644 index fca4e4a..0000000 --- a/tests/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/aws4_testsuite/post-vanilla-query-space.sreq b/tests/aws4_testsuite/post-vanilla-query-space.sreq deleted file mode 100644 index 8d386f4..0000000 --- a/tests/aws4_testsuite/post-vanilla-query-space.sreq +++ /dev/null @@ -1,6 +0,0 @@ -POST /?f oo=b ar http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Date:20110909T233600Z -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=42f087f5c310d7c5b041e03d66a783f374ac749f0c25a7ae93e41ab9248649fd - diff --git a/tests/aws4_testsuite/post-vanilla-query-space.sts b/tests/aws4_testsuite/post-vanilla-query-space.sts deleted file mode 100644 index bff0d26..0000000 --- a/tests/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/aws4_testsuite/post-vanilla-query.authz b/tests/aws4_testsuite/post-vanilla-query.authz deleted file mode 100644 index 021252b..0000000 --- a/tests/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=b4dc2397c40ac58b653b52bb9db4d6b3565b5f16cd3d3e913048e72ee8a7a376 \ No newline at end of file diff --git a/tests/aws4_testsuite/post-vanilla-query.creq b/tests/aws4_testsuite/post-vanilla-query.creq deleted file mode 100644 index f46634d..0000000 --- a/tests/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/aws4_testsuite/post-vanilla-query.req b/tests/aws4_testsuite/post-vanilla-query.req deleted file mode 100644 index 1351de5..0000000 --- a/tests/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/aws4_testsuite/post-vanilla-query.sreq b/tests/aws4_testsuite/post-vanilla-query.sreq deleted file mode 100644 index e8d0f25..0000000 --- a/tests/aws4_testsuite/post-vanilla-query.sreq +++ /dev/null @@ -1,6 +0,0 @@ -POST /?foo=bar http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Date:20110909T233600Z -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=b4dc2397c40ac58b653b52bb9db4d6b3565b5f16cd3d3e913048e72ee8a7a376 - diff --git a/tests/aws4_testsuite/post-vanilla-query.sts b/tests/aws4_testsuite/post-vanilla-query.sts deleted file mode 100644 index fddcbb7..0000000 --- a/tests/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/aws4_testsuite/post-vanilla.authz b/tests/aws4_testsuite/post-vanilla.authz deleted file mode 100644 index 8889d6b..0000000 --- a/tests/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=27a004de7e3d551fa5a7546dfc59d00f4f810d83487dd3d27e75b9a9acef096c \ No newline at end of file diff --git a/tests/aws4_testsuite/post-vanilla.creq b/tests/aws4_testsuite/post-vanilla.creq deleted file mode 100644 index a1c8480..0000000 --- a/tests/aws4_testsuite/post-vanilla.creq +++ /dev/null @@ -1,8 +0,0 @@ -POST -/ - -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/aws4_testsuite/post-vanilla.req b/tests/aws4_testsuite/post-vanilla.req deleted file mode 100644 index b072b83..0000000 --- a/tests/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/aws4_testsuite/post-vanilla.sreq b/tests/aws4_testsuite/post-vanilla.sreq deleted file mode 100644 index 9950122..0000000 --- a/tests/aws4_testsuite/post-vanilla.sreq +++ /dev/null @@ -1,6 +0,0 @@ -POST / http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Date:20110909T233600Z -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=date;host, Signature=27a004de7e3d551fa5a7546dfc59d00f4f810d83487dd3d27e75b9a9acef096c - diff --git a/tests/aws4_testsuite/post-vanilla.sts b/tests/aws4_testsuite/post-vanilla.sts deleted file mode 100644 index 30fb98a..0000000 --- a/tests/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/aws4_testsuite/post-x-www-form-urlencoded-parameters.authz b/tests/aws4_testsuite/post-x-www-form-urlencoded-parameters.authz deleted file mode 100644 index 97d6493..0000000 --- a/tests/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=8565f400be67c355ddadae5634388824bf0a7ac7099131b012cc1af394c7cb12 \ No newline at end of file diff --git a/tests/aws4_testsuite/post-x-www-form-urlencoded-parameters.creq b/tests/aws4_testsuite/post-x-www-form-urlencoded-parameters.creq deleted file mode 100644 index 56a9b26..0000000 --- a/tests/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/aws4_testsuite/post-x-www-form-urlencoded-parameters.req b/tests/aws4_testsuite/post-x-www-form-urlencoded-parameters.req deleted file mode 100644 index b537b64..0000000 --- a/tests/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/aws4_testsuite/post-x-www-form-urlencoded-parameters.sreq b/tests/aws4_testsuite/post-x-www-form-urlencoded-parameters.sreq deleted file mode 100644 index 6c4e2a6..0000000 --- a/tests/aws4_testsuite/post-x-www-form-urlencoded-parameters.sreq +++ /dev/null @@ -1,8 +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 -Date:20110909T233600Z -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=content-type;date;host, Signature=8565f400be67c355ddadae5634388824bf0a7ac7099131b012cc1af394c7cb12 - -foo=bar \ No newline at end of file diff --git a/tests/aws4_testsuite/post-x-www-form-urlencoded-parameters.sts b/tests/aws4_testsuite/post-x-www-form-urlencoded-parameters.sts deleted file mode 100644 index df165ed..0000000 --- a/tests/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/aws4_testsuite/post-x-www-form-urlencoded.authz b/tests/aws4_testsuite/post-x-www-form-urlencoded.authz deleted file mode 100644 index 5a3be15..0000000 --- a/tests/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=3656ee9356e7200483f90a95c7fb59d5dbd5af4014c67923182b82eac70fb81b \ No newline at end of file diff --git a/tests/aws4_testsuite/post-x-www-form-urlencoded.creq b/tests/aws4_testsuite/post-x-www-form-urlencoded.creq deleted file mode 100644 index e4c5127..0000000 --- a/tests/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/aws4_testsuite/post-x-www-form-urlencoded.req b/tests/aws4_testsuite/post-x-www-form-urlencoded.req deleted file mode 100644 index fd58d79..0000000 --- a/tests/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/aws4_testsuite/post-x-www-form-urlencoded.sreq b/tests/aws4_testsuite/post-x-www-form-urlencoded.sreq deleted file mode 100644 index cd2e981..0000000 --- a/tests/aws4_testsuite/post-x-www-form-urlencoded.sreq +++ /dev/null @@ -1,8 +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 -Date:20110909T233600Z -Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=content-type;date;host, Signature=3656ee9356e7200483f90a95c7fb59d5dbd5af4014c67923182b82eac70fb81b - -foo=bar \ No newline at end of file diff --git a/tests/aws4_testsuite/post-x-www-form-urlencoded.sts b/tests/aws4_testsuite/post-x-www-form-urlencoded.sts deleted file mode 100644 index b6661a3..0000000 --- a/tests/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/emarsys_testsuite/get-header-key-duplicate.authz b/tests/emarsys_testsuite/get-header-key-duplicate.authz deleted file mode 100644 index 606442f..0000000 --- a/tests/emarsys_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=e466e59a8f69db46393c688fc3b4fdca8de56046bdab1d963ea3d9c27f5781f0 \ No newline at end of file diff --git a/tests/emarsys_testsuite/get-header-key-duplicate.creq b/tests/emarsys_testsuite/get-header-key-duplicate.creq deleted file mode 100644 index ff4a5e6..0000000 --- a/tests/emarsys_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:zoobar,foobar,zoobar - -date;host;zoo -e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/emarsys_testsuite/get-header-key-duplicate.req b/tests/emarsys_testsuite/get-header-key-duplicate.req deleted file mode 100644 index eb3a429..0000000 --- a/tests/emarsys_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/emarsys_testsuite/get-header-key-duplicate.sreq b/tests/emarsys_testsuite/get-header-key-duplicate.sreq deleted file mode 100644 index 21fa5dd..0000000 --- a/tests/emarsys_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=e466e59a8f69db46393c688fc3b4fdca8de56046bdab1d963ea3d9c27f5781f0 - diff --git a/tests/emarsys_testsuite/get-header-key-duplicate.sts b/tests/emarsys_testsuite/get-header-key-duplicate.sts deleted file mode 100644 index 1a262a6..0000000 --- a/tests/emarsys_testsuite/get-header-key-duplicate.sts +++ /dev/null @@ -1,4 +0,0 @@ -AWS4-HMAC-SHA256 -20110909T233600Z -20110909/us-east-1/host/aws4_request -27e5a0aba5b78c3d4937ba61a36badc9919a9b9773a6442b486781bd9872169e \ No newline at end of file diff --git a/tests/emarsys_testsuite/get-header-value-order.authz b/tests/emarsys_testsuite/get-header-value-order.authz deleted file mode 100644 index 40f0892..0000000 --- a/tests/emarsys_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=bb7956f64dfab89c02bcf8ce99819d83b830048c6fad8a24e1fbbc49ee200e8a \ No newline at end of file diff --git a/tests/emarsys_testsuite/get-header-value-order.creq b/tests/emarsys_testsuite/get-header-value-order.creq deleted file mode 100644 index cb27b30..0000000 --- a/tests/emarsys_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:z,a,p,a - -date;host;p -e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/emarsys_testsuite/get-header-value-order.req b/tests/emarsys_testsuite/get-header-value-order.req deleted file mode 100644 index ea30500..0000000 --- a/tests/emarsys_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/emarsys_testsuite/get-header-value-order.sreq b/tests/emarsys_testsuite/get-header-value-order.sreq deleted file mode 100644 index c905566..0000000 --- a/tests/emarsys_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=bb7956f64dfab89c02bcf8ce99819d83b830048c6fad8a24e1fbbc49ee200e8a - diff --git a/tests/emarsys_testsuite/get-header-value-order.sts b/tests/emarsys_testsuite/get-header-value-order.sts deleted file mode 100644 index 0c4c463..0000000 --- a/tests/emarsys_testsuite/get-header-value-order.sts +++ /dev/null @@ -1,4 +0,0 @@ -AWS4-HMAC-SHA256 -20110909T233600Z -20110909/us-east-1/host/aws4_request -e455f0635c9f5336ee1fad0d35179621427861240fbb106a16d0b93ed7f6bf16 \ No newline at end of file diff --git a/tests/emarsys_testsuite/post-header-key-order.authz b/tests/emarsys_testsuite/post-header-key-order.authz deleted file mode 100644 index 97d6493..0000000 --- a/tests/emarsys_testsuite/post-header-key-order.authz +++ /dev/null @@ -1 +0,0 @@ -AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=content-type;date;host, Signature=8565f400be67c355ddadae5634388824bf0a7ac7099131b012cc1af394c7cb12 \ No newline at end of file diff --git a/tests/emarsys_testsuite/post-header-key-order.creq b/tests/emarsys_testsuite/post-header-key-order.creq deleted file mode 100644 index 56a9b26..0000000 --- a/tests/emarsys_testsuite/post-header-key-order.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/emarsys_testsuite/post-header-key-order.req b/tests/emarsys_testsuite/post-header-key-order.req deleted file mode 100644 index 948405c..0000000 --- a/tests/emarsys_testsuite/post-header-key-order.req +++ /dev/null @@ -1,6 +0,0 @@ -POST / http/1.1 -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com -Content-Type:application/x-www-form-urlencoded; charset=utf8 - -foo=bar \ No newline at end of file diff --git a/tests/emarsys_testsuite/post-header-key-order.sreq b/tests/emarsys_testsuite/post-header-key-order.sreq deleted file mode 100644 index a8ea9df..0000000 --- a/tests/emarsys_testsuite/post-header-key-order.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=8565f400be67c355ddadae5634388824bf0a7ac7099131b012cc1af394c7cb12 - -foo=bar \ No newline at end of file diff --git a/tests/emarsys_testsuite/post-header-key-order.sts b/tests/emarsys_testsuite/post-header-key-order.sts deleted file mode 100644 index df165ed..0000000 --- a/tests/emarsys_testsuite/post-header-key-order.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/emarsys_testsuite/post-header-value-spaces-within-quotes.authz b/tests/emarsys_testsuite/post-header-value-spaces-within-quotes.authz deleted file mode 100644 index 151da1c..0000000 --- a/tests/emarsys_testsuite/post-header-value-spaces-within-quotes.authz +++ /dev/null @@ -1 +0,0 @@ -AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=a-funny-header;date;host, Signature=5d63db6df1454e99cdff20966ac2fe0c6ed6cd330b0c7dbcb0e3155e164e49d7 \ No newline at end of file diff --git a/tests/emarsys_testsuite/post-header-value-spaces-within-quotes.creq b/tests/emarsys_testsuite/post-header-value-spaces-within-quotes.creq deleted file mode 100644 index ed425f3..0000000 --- a/tests/emarsys_testsuite/post-header-value-spaces-within-quotes.creq +++ /dev/null @@ -1,9 +0,0 @@ -POST -/ - -a-funny-header:" foo bar " -date:Mon, 09 Sep 2011 23:36:00 GMT -host:host.foo.com - -a-funny-header;date;host -e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/tests/emarsys_testsuite/post-header-value-spaces-within-quotes.req b/tests/emarsys_testsuite/post-header-value-spaces-within-quotes.req deleted file mode 100644 index 746c623..0000000 --- a/tests/emarsys_testsuite/post-header-value-spaces-within-quotes.req +++ /dev/null @@ -1,5 +0,0 @@ -POST / http/1.1 -A-Funny-Header: " foo bar " -Date:Mon, 09 Sep 2011 23:36:00 GMT -Host:host.foo.com - diff --git a/tests/emarsys_testsuite/post-header-value-spaces-within-quotes.sreq b/tests/emarsys_testsuite/post-header-value-spaces-within-quotes.sreq deleted file mode 100644 index 52ef0bd..0000000 --- a/tests/emarsys_testsuite/post-header-value-spaces-within-quotes.sreq +++ /dev/null @@ -1,6 +0,0 @@ -POST / http/1.1 -A-Funny-Header: " foo bar " -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=a-funny-header;date;host, Signature=5d63db6df1454e99cdff20966ac2fe0c6ed6cd330b0c7dbcb0e3155e164e49d7 - diff --git a/tests/emarsys_testsuite/post-header-value-spaces-within-quotes.sts b/tests/emarsys_testsuite/post-header-value-spaces-within-quotes.sts deleted file mode 100644 index 4bbe465..0000000 --- a/tests/emarsys_testsuite/post-header-value-spaces-within-quotes.sts +++ /dev/null @@ -1,4 +0,0 @@ -AWS4-HMAC-SHA256 -20110909T233600Z -20110909/us-east-1/host/aws4_request -18ede26dfe222a2f36faf047b1ba8014bce2ab0c22d4b6544509088c0ddaab10 \ No newline at end of file diff --git a/tests/emarsys_testsuite/post-header-value-spaces.authz b/tests/emarsys_testsuite/post-header-value-spaces.authz deleted file mode 100644 index 97d6493..0000000 --- a/tests/emarsys_testsuite/post-header-value-spaces.authz +++ /dev/null @@ -1 +0,0 @@ -AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20110909/us-east-1/host/aws4_request, SignedHeaders=content-type;date;host, Signature=8565f400be67c355ddadae5634388824bf0a7ac7099131b012cc1af394c7cb12 \ No newline at end of file diff --git a/tests/emarsys_testsuite/post-header-value-spaces.creq b/tests/emarsys_testsuite/post-header-value-spaces.creq deleted file mode 100644 index 56a9b26..0000000 --- a/tests/emarsys_testsuite/post-header-value-spaces.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/emarsys_testsuite/post-header-value-spaces.req b/tests/emarsys_testsuite/post-header-value-spaces.req deleted file mode 100644 index 46ee050..0000000 --- a/tests/emarsys_testsuite/post-header-value-spaces.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/emarsys_testsuite/post-header-value-spaces.sreq b/tests/emarsys_testsuite/post-header-value-spaces.sreq deleted file mode 100644 index a8ea9df..0000000 --- a/tests/emarsys_testsuite/post-header-value-spaces.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=8565f400be67c355ddadae5634388824bf0a7ac7099131b012cc1af394c7cb12 - -foo=bar \ No newline at end of file diff --git a/tests/emarsys_testsuite/post-header-value-spaces.sts b/tests/emarsys_testsuite/post-header-value-spaces.sts deleted file mode 100644 index df165ed..0000000 --- a/tests/emarsys_testsuite/post-header-value-spaces.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/test_authenticate.py b/tests/test_authenticate.py index 5131a54..7544454 100644 --- a/tests/test_authenticate.py +++ b/tests/test_authenticate.py @@ -8,7 +8,7 @@ class AuthParamsTest(unittest.TestCase): def test_get_throws_exception_if_key_is_not_found(self): - params = AuthParams([], 'EMS') + params = AuthParams.from_query_parts([], 'EMS') try: params.get('test') self.fail('No exception thrown') @@ -16,43 +16,43 @@ def test_get_throws_exception_if_key_is_not_found(self): self.assertEqual('Missing authorization parameter: test', str(e)) def test_get_signed_headers(self): - params = AuthParams([('X-EMS-SignedHeaders', 'host;date')], 'EMS') + params = AuthParams.from_query_parts([('X-EMS-SignedHeaders', 'host;date')], 'EMS') self.assertEqual(['host', 'date'], params.get_signed_headers()) def test_get_algo_data(self): - params = AuthParams([('X-EMS-Algorithm', 'EMS-HMAC-SHA256')], 'EMS') + params = AuthParams.from_query_parts([('X-EMS-Algorithm', 'EMS-HMAC-SHA256')], 'EMS') self.assertEqual(['EMS', 'HMAC', 'SHA256'], params.get_algo_data()) def test_get_algo_prefix(self): - params = AuthParams([('X-EMS-Algorithm', 'EMS-HMAC-SHA256')], 'EMS') + params = AuthParams.from_query_parts([('X-EMS-Algorithm', 'EMS-HMAC-SHA256')], 'EMS') self.assertEqual('EMS', params.get_algo_prefix()) def test_get_hash_algo(self): - params = AuthParams([('X-EMS-Algorithm', 'EMS-HMAC-SHA256')], 'EMS') + params = AuthParams.from_query_parts([('X-EMS-Algorithm', 'EMS-HMAC-SHA256')], 'EMS') self.assertEqual('SHA256', params.get_hash_algo()) def test_get_credential_data(self): - params = AuthParams([('X-EMS-Credentials', 'th3K3y/20110511/us-east-1/host/aws4_request')], 'EMS') + params = AuthParams.from_query_parts([('X-EMS-Credentials', 'th3K3y/20110511/us-east-1/host/aws4_request')], 'EMS') self.assertEqual(['th3K3y', '20110511', 'us-east-1/host/aws4_request'], params.get_credential_data()) def test_get_credential_key(self): - params = AuthParams([('X-EMS-Credentials', 'th3K3y/20110511/us-east-1/host/aws4_request')], 'EMS') + params = AuthParams.from_query_parts([('X-EMS-Credentials', 'th3K3y/20110511/us-east-1/host/aws4_request')], 'EMS') self.assertEqual('th3K3y', params.get_credential_key()) def test_get_credential_date(self): - params = AuthParams([('X-EMS-Credentials', 'th3K3y/20110511/us-east-1/host/aws4_request')], 'EMS') + params = AuthParams.from_query_parts([('X-EMS-Credentials', 'th3K3y/20110511/us-east-1/host/aws4_request')], 'EMS') self.assertEqual(datetime.datetime(2011, 5, 11, 0, 0), params.get_credential_date()) def test_get_credential_scope(self): - params = AuthParams([('X-EMS-Credentials', 'th3K3y/20110511/us-east-1/host/aws4_request')], 'EMS') + params = AuthParams.from_query_parts([('X-EMS-Credentials', 'th3K3y/20110511/us-east-1/host/aws4_request')], 'EMS') self.assertEqual('us-east-1/host/aws4_request', params.get_credential_scope()) def test_get_expires(self): - params = AuthParams([('X-EMS-Expires', '300')], 'EMS') + params = AuthParams.from_query_parts([('X-EMS-Expires', '300')], 'EMS') self.assertEqual(300, params.get_expires()) def test_get_request_date(self): - params = AuthParams([('X-EMS-Date', '20110511T120000Z')], 'EMS') + params = AuthParams.from_query_parts([('X-EMS-Date', '20110511T120000Z')], 'EMS') self.assertEqual(datetime.datetime(2011, 5, 11, 12, 0), params.get_request_date()) @@ -62,10 +62,10 @@ def setUp(self): def test_validate_mandatory_signed_headers(self): try: - self.validator.validate_mandatory_signed_headers(['test']) + self.validator.validate_mandatory_signed_headers(['host'], ['test']) self.fail('No exception thrown') except EscherException as e: - self.assertEqual('Host header is not signed', str(e)) + self.assertEqual('The host header is not signed', str(e)) def test_validate_hash_algo(self): try: @@ -79,28 +79,28 @@ def test_validate_dates_date_mismatch(self): self.validator.validate_dates(datetime.datetime(2011, 5, 11, 12, 0), datetime.datetime(2011, 5, 11, 12, 0), datetime.datetime(2011, 5, 10, 0, 0), 60, 300) self.fail('No exception thrown') except EscherException as e: - self.assertEqual('The request date and credential date do not match', str(e)) + self.assertEqual('The credential date does not match with the request date', str(e)) def test_validate_dates_date_out_of_range(self): try: self.validator.validate_dates(datetime.datetime(2011, 5, 11, 12, 10), datetime.datetime(2011, 5, 11, 12, 0), datetime.datetime(2011, 5, 11, 0, 0), 60, 300) self.fail('No exception thrown') except EscherException as e: - self.assertEqual('Request date is not within the accepted time interval', str(e)) + self.assertEqual('The request date is not within the accepted time range', str(e)) def test_validate_credential_scope(self): try: self.validator.validate_credential_scope('a', 'b') self.fail('No exception thrown') except EscherException as e: - self.assertEqual('Invalid credential scope (provided: b, required: a)', str(e)) + self.assertEqual('The credential scope is invalid', str(e)) def test_validate_signature(self): try: self.validator.validate_signature('a', 'b') self.fail('No exception thrown') except EscherException as e: - self.assertEqual('The signatures do not match (provided: b, calculated: a)', str(e)) + self.assertEqual('The signatures do not match', str(e)) class AuthenticateTest(unittest.TestCase): @@ -109,17 +109,17 @@ def setUp(self): self.key_db = {'th3K3y': 'very_secure'} def test_authenticate_error_presigned_url_expired(self): - escher = Escher(self.credential_scope, self.get_options('2011-05-30T12:00:00.000Z')) + escher = Escher(None, None, self.credential_scope, self.get_options('2011-05-30T12:00:00.000Z')) try: uri = '/something?foo=bar&baz=barbaz&X-EMS-Algorithm=EMS-HMAC-SHA256&X-EMS-Credentials=th3K3y%2F20110511%2Fus-east-1%2Fhost%2Faws4_request&X-EMS-Date=20110511T120000Z&X-EMS-Expires=123456&X-EMS-SignedHeaders=host&X-EMS-Signature=fbc9dbb91670e84d04ad2ae7505f4f52ab3ff9e192b8233feeae57e9022c2b67' escher.authenticate(self.get_request(uri), self.key_db) self.fail('No exception thrown') except EscherException as e: - self.assertEqual('Request date is not within the accepted time interval', str(e)) + self.assertEqual('The request date is not within the accepted time range', str(e)) def test_authenticate_error_presigned_url_invalid_escher_key(self): - escher = Escher(self.credential_scope, self.get_options('2011-05-11T12:00:00.000Z')) + escher = Escher(None, None, self.credential_scope, self.get_options('2011-05-11T12:00:00.000Z')) try: uri = '/something?foo=bar&baz=barbaz&X-EMS-Algorithm=EMS-HMAC-SHA256&X-EMS-Credentials=INVALID%2F20110511%2Fus-east-1%2Fhost%2Faws4_request&X-EMS-Date=20110511T120000Z&X-EMS-Expires=123456&X-EMS-SignedHeaders=host&X-EMS-Signature=fbc9dbb91670e84d04ad2ae7505f4f52ab3ff9e192b8233feeae57e9022c2b67' @@ -129,7 +129,7 @@ def test_authenticate_error_presigned_url_invalid_escher_key(self): self.assertEqual('Invalid Escher key', str(e)) def test_authenticate_valid_presigned_url_with_query(self): - escher = Escher(self.credential_scope, self.get_options('2011-05-11T12:00:00.000Z')) + escher = Escher(None, None, self.credential_scope, self.get_options('2011-05-11T12:00:00.000Z')) uri = '/something?foo=bar&baz=barbaz&X-EMS-Algorithm=EMS-HMAC-SHA256&X-EMS-Credentials=th3K3y%2F20110511%2Fus-east-1%2Fhost%2Faws4_request&X-EMS-Date=20110511T120000Z&X-EMS-Expires=123456&X-EMS-SignedHeaders=host&X-EMS-Signature=fbc9dbb91670e84d04ad2ae7505f4f52ab3ff9e192b8233feeae57e9022c2b67' result = escher.authenticate(self.get_request(uri), self.key_db) @@ -147,7 +147,7 @@ def get_options(self, current_time): def get_request(self, uri): return { 'method': 'GET', - 'uri': uri, + 'url': uri, 'headers': [ ['Host', 'example.com'] ], diff --git a/tests/test_escherauth.py b/tests/test_escherauth.py new file mode 100644 index 0000000..c85797c --- /dev/null +++ b/tests/test_escherauth.py @@ -0,0 +1,149 @@ +import json +import re +import unittest +import datetime +from pathlib import Path + +from escherauth.escherauth import Escher, EscherException +from nose2.tools import params + + +class TestCase: + FILE_PATTERN = re.compile(r'^test-cases/([^/]+)/([^-]+)-([^.]+).json$') + + @staticmethod + def get_case_files(type): + cases = [] + for f in Path('test-cases/').glob('**/*.json'): + if not f.is_file(): + continue + + case = TestCase(f) + if case.type != type: + continue + if case.suite == '.conflict': + continue + + cases.append(case) + return cases + + def __init__(self, case_file: Path): + (self.suite, self.type, self.name) = self.FILE_PATTERN.match(str(case_file)).groups() + with open(case_file, 'r') as f: + self.__data = json.load(f) + + @property + def credential_scope(self): + return self.__data['config']['credentialScope'] + + @property + def headers_to_sign(self): + return self.__data['headersToSign'] + + @property + def request(self): + return self.__data['request'] + + @property + def expected(self): + return self.__data['expected'] + + @property + def mandatory_signed_headers(self): + return self.__data.get('mandatorySignedHeaders') + + @property + def sign_options(self): + return { + 'algo_prefix': self.__data['config'].get('algoPrefix'), + 'vendor_key': self.__data['config'].get('vendorKey'), + 'hash_algo': self.__data['config'].get('hashAlgo'), + 'auth_header_name': self.__data['config'].get('authHeaderName'), + 'date_header_name': self.__data['config'].get('dateHeaderName'), + 'current_time': self.__get_current_time(), + } + + @property + def authenticate_options(self): + return { + 'algo_prefix': self.__data['config'].get('algoPrefix'), + 'vendor_key': self.__data['config'].get('vendorKey'), + 'auth_header_name': self.__data['config'].get('authHeaderName'), + 'date_header_name': self.__data['config'].get('dateHeaderName'), + 'current_time': self.__get_current_time(), + } + + @property + def api_key(self): + return self.__data['config'].get('accessKeyId') + + @property + def api_secret(self): + return self.__data['config'].get('apiSecret') + + @property + def key_db(self): + return dict(self.__data['keyDb']) + + def __repr__(self): + return f'{self.suite}/{self.type}-{self.name}.json' + + def __get_current_time(self): + time_formats = ['%Y-%m-%dT%H:%M:%S.000Z', '%Y-%m-%dT%H:%M:%SZ', '%a, %d %b %Y %H:%M:%S GMT'] + + current_time = None + for format in time_formats: + try: + current_time = datetime.datetime.strptime(self.__data['config']['date'], format) + except ValueError: + pass + + if current_time is None: + raise Exception(f"Invalid time: {self.__data['config']['date']}") + + return current_time + + +class EscherAuthEndToEndTest(unittest.TestCase): + + def setUp(self) -> None: + self.maxDiff = None + + @params(*TestCase.get_case_files('signrequest')) + def test_sign_request(self, test_case: TestCase): + escher = Escher(test_case.api_key, test_case.api_secret, test_case.credential_scope, test_case.sign_options) + + try: + request = escher.sign_request(test_case.request, test_case.headers_to_sign) + if 'request' in test_case.expected: + self.assertEqual(request, test_case.expected['request']) + else: + raise Exception('no request in expected') + except EscherException as e: + if 'error' in test_case.expected: + self.assertEqual(str(e), test_case.expected['error']) + else: + raise e + + @params(*TestCase.get_case_files('authenticate')) + def test_authenticate(self, test_case: TestCase): + escher = Escher(test_case.api_key, test_case.api_secret, test_case.credential_scope, test_case.authenticate_options) + + try: + api_key = escher.authenticate(test_case.request, test_case.key_db, test_case.mandatory_signed_headers) + if 'apiKey' in test_case.expected: + self.assertEqual(api_key, test_case.expected['apiKey']) + else: + raise Exception('no apiKey in expected') + except EscherException as e: + if 'error' in test_case.expected: + self.assertEqual(str(e), test_case.expected['error']) + else: + raise e + + @params(*TestCase.get_case_files('presignurl')) + def test_presign_url(self, test_case: TestCase): + escher = Escher(test_case.api_key, test_case.api_secret, test_case.credential_scope, test_case.sign_options) + url = escher.presign_url(test_case.request['url'], test_case.request['expires']) + + self.assertEqual(url, test_case.expected['url']) diff --git a/tests/test_escherauth_amazon.py b/tests/test_escherauth_amazon.py deleted file mode 100644 index af3d8d7..0000000 --- a/tests/test_escherauth_amazon.py +++ /dev/null @@ -1,83 +0,0 @@ -import unittest -import datetime - -from escherauth.escherauth import Escher -from nose_parameterized import parameterized - - -def read_request(suite, test, extension='req'): - file = open('tests/' + suite + '_testsuite/' + test + '.' + extension, 'r') - lines = (file.read() + "\n").splitlines() - file.close() - - method, uri = lines[0].split(' ')[0:2] - headers = [] - for header in lines[1:-2]: - key, value = header.split(':', 1) - headers.append((key, value.lstrip())) - body = lines[-1] - - return { - 'method': method, - 'host': 'host.foo.com', - 'uri': uri, - 'headers': headers, - 'body': body, - } - - -class EscherAuthAmazonTest(unittest.TestCase): - def setUp(self): - self.escher = Escher('us-east-1/host/aws4_request', { - 'algo_prefix': 'AWS4', - 'vendor_key': 'AWS4', - 'hash_algo': 'SHA256', - 'auth_header_name': 'Authorization', - 'date_header_name': 'Date', - 'current_time': datetime.datetime(2011, 9, 9, 23, 36) - }) - - @parameterized.expand([ - ('get-header-value-trim'), - ('get-relative'), - ('get-relative-relative'), - ('get-slash'), - ('get-slash-dot-slash'), - ('get-slash-pointless-dot'), - ('get-slashes'), - ('get-space'), - ('get-unreserved'), - ('get-utf8'), - ('get-vanilla'), - ('get-vanilla-empty-query-key'), - ('get-vanilla-query'), - ('get-vanilla-query-order-key'), - ('get-vanilla-query-order-key-case'), - ('get-vanilla-query-order-value'), - ('get-vanilla-query-unreserved'), - ('get-vanilla-ut8-query'), - ('post-header-key-case'), - ('post-header-key-sort'), - ('post-header-value-case'), - ('post-vanilla'), - ('post-vanilla-empty-query-value'), - ('post-vanilla-query'), - ('post-vanilla-query-nonunreserved'), - ('post-vanilla-query-space'), - ('post-x-www-form-urlencoded'), - ('post-x-www-form-urlencoded-parameters'), - ]) - def test_signing(self, testcase): - suite = 'aws4' - request = read_request(suite, testcase) - request_signed = read_request(suite, testcase, 'sreq') - headers_to_sign = [header[0].lower() for header in request['headers']] - request = self.escher.sign(request, { - 'api_key': 'AKIDEXAMPLE', - 'api_secret': 'wJalrXUtnFEMI/K7MDENG+bPxRfiCYEXAMPLEKEY' - }, headers_to_sign) - self.assertEqual(request.get('method'), request_signed.get('method')) - self.assertEqual(request.get('host'), request_signed.get('host')) - self.assertEqual(request.get('uri'), request_signed.get('uri')) - self.assertListEqual(request.get('headers'), request_signed.get('headers')) - self.assertEqual(request.get('body'), request_signed.get('body')) diff --git a/tests/test_escherrequest.py b/tests/test_escherrequest.py index d1a2a3c..e11545a 100644 --- a/tests/test_escherrequest.py +++ b/tests/test_escherrequest.py @@ -8,7 +8,7 @@ def test_object_basic(self): request = EscherRequest({ 'method': 'GET', 'host': 'host.foo.com', - 'uri': '/?foo=bar', + 'url': '/?foo=bar', 'headers': [ ('Date', 'Mon, 09 Sep 2011 23:36:00 GMT'), ('Host', 'host.foo.com'), @@ -24,13 +24,13 @@ def test_object_basic(self): ('Date', 'Mon, 09 Sep 2011 23:36:00 GMT'), ('Host', 'host.foo.com'), ]) - self.assertEqual(request.body(), '') # there was no body specified + self.assertEqual(request.body(), None) # there was no body specified def test_object_complex(self): request = EscherRequest({ 'method': 'POST', 'host': 'host.foo.com', - 'uri': '/example/path/?foo=bar&abc=cba', + 'url': '/example/path/?foo=bar&abc=cba', 'headers': [], 'body': 'HELLO WORLD!', }) @@ -48,9 +48,9 @@ def test_object_add_header(self): request = EscherRequest({ 'method': 'POST', 'host': 'host.foo.com', - 'uri': '/example/path/?foo=bar&abc=cba', + 'url': '/example/path/?foo=bar&abc=cba', 'headers': [], 'body': 'HELLO WORLD!', }) request.add_header('Foo', 'Bar') - self.assertListEqual(request.headers(), [('Foo', 'Bar')]) + self.assertListEqual(request.headers(), [['Foo', 'Bar']])