diff --git a/androidservice/controlviews/devicecontrolapplication.cpp b/androidservice/controlviews/devicecontrolapplication.cpp
index 95408d9a..14be6b03 100644
--- a/androidservice/controlviews/devicecontrolapplication.cpp
+++ b/androidservice/controlviews/devicecontrolapplication.cpp
@@ -33,8 +33,6 @@ DeviceControlApplication::DeviceControlApplication(int argc, char *argv[]) : QAp
QSettings settings;
m_discovery = new NymeaDiscovery(this);
- AWSClient::instance()->setConfig(settings.value("cloudEnvironment").toString());
- m_discovery->setAwsClient(AWSClient::instance());
m_engine = new Engine(this);
diff --git a/androidservice/nymeaappservice/nymeaappservice.cpp b/androidservice/nymeaappservice/nymeaappservice.cpp
index 2ff110e5..76a2d4a8 100644
--- a/androidservice/nymeaappservice/nymeaappservice.cpp
+++ b/androidservice/nymeaappservice/nymeaappservice.cpp
@@ -20,8 +20,6 @@ NymeaAppService::NymeaAppService(int argc, char **argv):
QSettings settings;
NymeaDiscovery *discovery = new NymeaDiscovery(this);
- AWSClient::instance()->setConfig(settings.value("cloudEnvironment").toString());
- discovery->setAwsClient(AWSClient::instance());
settings.beginGroup("ConfiguredHosts");
foreach (const QString &childGroup, settings.childGroups()) {
diff --git a/libnymea-app/connection/awsclient.cpp b/libnymea-app/connection/awsclient.cpp
deleted file mode 100644
index a7f1f6a9..00000000
--- a/libnymea-app/connection/awsclient.cpp
+++ /dev/null
@@ -1,1310 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-*
-* Copyright 2013 - 2020, nymea GmbH
-* Contact: contact@nymea.io
-*
-* This file is part of nymea.
-* This project including source code and documentation is protected by
-* copyright law, and remains the property of nymea GmbH. All rights, including
-* reproduction, publication, editing and translation, are reserved. The use of
-* this project is subject to the terms of a license agreement to be concluded
-* with nymea GmbH in accordance with the terms of use of nymea GmbH, available
-* under https://nymea.io/license
-*
-* GNU General Public License Usage
-* Alternatively, this project may be redistributed and/or modified under the
-* terms of the GNU General Public License as published by the Free Software
-* Foundation, GNU version 3. This project is distributed in the hope that it
-* will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-* Public License for more details.
-*
-* You should have received a copy of the GNU General Public License along with
-* this project. If not, see .
-*
-* For any further details and any questions please contact us under
-* contact@nymea.io or see our FAQ/Licensing Information on
-* https://nymea.io/license/faq
-*
-* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-#include "awsclient.h"
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include "sigv4utils.h"
-#include "logging.h"
-#include "config.h"
-
-AWSClient* AWSClient::s_instance = nullptr;
-
-NYMEA_LOGGING_CATEGORY(dcCloud, "Cloud")
-
-// This is Symantec's root CA certificate and most platforms should
-// have this in their certificate storage already, but as we can't
-// be certain about the core's setup, let's deploy it ourselves.
-static QByteArray rootCA = "-----BEGIN CERTIFICATE-----\n\
-MIIE0zCCA7ugAwIBAgIQGNrRniZ96LtKIVjNzGs7SjANBgkqhkiG9w0BAQUFADCB\n\
-yjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL\n\
-ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJp\n\
-U2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxW\n\
-ZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0\n\
-aG9yaXR5IC0gRzUwHhcNMDYxMTA4MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCByjEL\n\
-MAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZW\n\
-ZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2ln\n\
-biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJp\n\
-U2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9y\n\
-aXR5IC0gRzUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvJAgIKXo1\n\
-nmAMqudLO07cfLw8RRy7K+D+KQL5VwijZIUVJ/XxrcgxiV0i6CqqpkKzj/i5Vbex\n\
-t0uz/o9+B1fs70PbZmIVYc9gDaTY3vjgw2IIPVQT60nKWVSFJuUrjxuf6/WhkcIz\n\
-SdhDY2pSS9KP6HBRTdGJaXvHcPaz3BJ023tdS1bTlr8Vd6Gw9KIl8q8ckmcY5fQG\n\
-BO+QueQA5N06tRn/Arr0PO7gi+s3i+z016zy9vA9r911kTMZHRxAy3QkGSGT2RT+\n\
-rCpSx4/VBEnkjWNHiDxpg8v+R70rfk/Fla4OndTRQ8Bnc+MUCH7lP59zuDMKz10/\n\
-NIeWiu5T6CUVAgMBAAGjgbIwga8wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8E\n\
-BAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2UvZ2lmMCEwHzAH\n\
-BgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVy\n\
-aXNpZ24uY29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFH/TZafC3ey78DAJ80M5+gKv\n\
-MzEzMA0GCSqGSIb3DQEBBQUAA4IBAQCTJEowX2LP2BqYLz3q3JktvXf2pXkiOOzE\n\
-p6B4Eq1iDkVwZMXnl2YtmAl+X6/WzChl8gGqCBpH3vn5fJJaCGkgDdk+bW48DW7Y\n\
-5gaRQBi5+MHt39tBquCWIMnNZBU4gcmU7qKEKQsTb47bDN0lAtukixlE0kF6BWlK\n\
-WE9gyn6CagsCqiUXObXbf+eEZSqVir2G3l6BFoMtEMze/aiCKm0oHw0LxOXnGiYZ\n\
-4fQRbxC1lfznQgUy286dUV4otp6F01vvpX1FQHKOtw5rDgb7MzVIcbidJ4vEZV8N\n\
-hnacRHr2lVz2XTIIM6RUthg/aFzyQkqFOFSDX9HoLPKsEdao7WNq\n\
------END CERTIFICATE-----\n\
-";
-
-AWSClient::AWSClient(QObject *parent) : QObject(parent),
- m_devices(new AWSDevices(this))
-{
- m_nam = new QNetworkAccessManager(this);
-
-#ifdef Q_OS_ANDROID
- QString pushSystem = "GCM";
-#elif defined Q_OS_IOS
- QString pushSystem = "APNS";
-#elif UBPORTS
- QString pushSystem = "UBPORTS";
-#else
- QString pushSystem = "";
-#endif
-
- AWSConfiguration config;
- // Community environment
- config.clientId = "35duli0b13c7pet5k4bcv8pbu";
- config.poolId = "eu-west-1_WZVsaBsaY";
- config.identityPoolId = "eu-west-1:17449947-1a2f-4dda-aa49-7c5b1eec78d7";
- config.certificateEndpoint = "https://communityservice-cloud.nymea.io/certificatews/certificate";
- config.certificateApiKey = "aIRQv4yDdF6ASq12X1CPp7b6MpkdODfI3AOjOnkE";
- config.certificateVendorId = "d399290a-0599-4895-b4c3-34d2bdb579f4";
- config.mqttEndpoint = "a2d0ba9572wepp-ats.iot.eu-west-1.amazonaws.com";
- config.region = "eu-west-1";
- config.apiEndpoint = "api-cloud.nymea.io";
- config.pushNotificationSystem = pushSystem;
- m_configs.insert("Community", config);
-
- // Testing environment
- config.clientId = "8rjhfdlf9jf1suok2jcrltd6v";
- config.poolId = "eu-west-1_6eX6YjmXr";
- config.identityPoolId = "eu-west-1:108a174c-5786-40f9-966a-1a0cd33d6801";
- config.certificateEndpoint = "https://testcommunityservice-cloud.nymea.io/certificatews/certificate";
- config.certificateApiKey = "VhmAUy75eZ9jXaUEjgWZh9PpSIykPGBK7AZFPimh";
- config.certificateVendorId = "testVendor001";
- config.mqttEndpoint = "a2addxakg5juii-ats.iot.eu-west-1.amazonaws.com";
- config.region = "eu-west-1";
- config.apiEndpoint = "testapi-cloud.nymea.io";
- config.pushNotificationSystem = pushSystem;
- m_configs.insert("Testing", config);
-
- // Marantec environment
- config.clientId = "7rf6da8pcqi1qi8tp1evf933h2";
- config.poolId = "eu-west-1_d4DdcqKJ8";
- config.identityPoolId = "eu-west-1:d32f6d94-caae-4f08-a193-f9fba8652646";
- // Generating certificates is not supported for the Marantec environment
- config.certificateEndpoint = "";
- config.certificateApiKey = "";
- config.certificateVendorId = "";
- config.mqttEndpoint = "a27q7a2x15m8h3-ats.iot.eu-west-1.amazonaws.com";
- config.region = "eu-west-1";
- config.apiEndpoint = "api-cloud.nymea.io";
- config.pushNotificationSystem = pushSystem;
- m_configs.insert("Marantec", config);
-
- QSettings settings;
- settings.beginGroup("cloud");
- m_username = settings.value("username").toString();
- m_userId = settings.value("userId").toString();
- m_password = settings.value("password").toString();
- m_accessToken = settings.value("accessToken").toByteArray();
- m_accessTokenExpiry = settings.value("accessTokenExpiry").toDateTime();
- m_idToken = settings.value("idToken").toByteArray();
- m_refreshToken = settings.value("refreshToken").toByteArray();
-
- m_identityId = settings.value("identityId").toByteArray();
-
- m_accessKeyId = settings.value("accessKeyId").toByteArray();
- m_secretKey = settings.value("secretKey").toByteArray();
- m_sessionToken = settings.value("sessionToken").toByteArray();
- m_sessionTokenExpiry = settings.value("sessionTokenExpiry").toDateTime();
-}
-
-AWSClient *AWSClient::instance()
-{
- if (!s_instance) {
- s_instance = new AWSClient();
- }
- return s_instance;
-}
-
-bool AWSClient::isLoggedIn() const
-{
- return !m_userId.isEmpty() && !m_username.isEmpty() && !m_password.isEmpty();
-}
-
-QString AWSClient::username() const
-{
- return m_username;
-}
-
-QString AWSClient::userId() const
-{
- return m_userId;
-}
-
-AWSDevices *AWSClient::awsDevices() const
-{
- return m_devices;
-}
-
-bool AWSClient::confirmationPending() const
-{
- return m_confirmationPending;
-}
-
-bool AWSClient::login(const QString &username, const QString &password)
-{
- if (m_usedConfig.isEmpty()) {
- qCInfo(dcCloud()) << "AWS config not set. Not logging in.";
- return false;
- }
- if (m_loginInProgress) {
- qCDebug(dcCloud()) << "Login already pending...";
- return false;
- }
- m_loginInProgress = true;
-
- m_username = username;
- // Due to an issue in AWS apis it's very complex to use the refresh token. Taking a shortcut here for now:
- // Will store the password in the config for now and re-login when the accessToken expires.
- // See: https://forums.aws.amazon.com/thread.jspa?threadID=287978
- // Ideally we'd use the refresh token and not store the password at all (see: refreshAccessToken())
- m_password = password;
-
- QString host = QString("cognito-idp.%1.amazonaws.com").arg(m_configs.value(m_usedConfig).region);
- QUrl url(QString("https://%1/").arg(host));
-
- QUrlQuery query;
- query.addQueryItem("Action", "InitiateAuth");
- query.addQueryItem("Version", "2016-04-18");
- url.setQuery(query);
-
- QNetworkRequest request(url);
- request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-amz-json-1.0");
- request.setRawHeader("Host", host.toUtf8());
- request.setRawHeader("X-Amz-Target", "AWSCognitoIdentityProviderService.InitiateAuth");
-
- QVariantMap params;
- params.insert("AuthFlow", "USER_PASSWORD_AUTH");
- params.insert("ClientId", m_configs.value(m_usedConfig).clientId);
-
- QVariantMap authParams;
- authParams.insert("USERNAME", username);
- authParams.insert("PASSWORD", password);
-
- params.insert("AuthParameters", authParams);
-
- QJsonDocument jsonDoc = QJsonDocument::fromVariant(params);
- QByteArray payload = jsonDoc.toJson(QJsonDocument::Compact);
-
- qCInfo(dcCloud()) << "Logging in to AWS as user:" << username << "with config" << m_usedConfig;
-
- QNetworkReply *reply = m_nam->post(request, payload);
- connect(reply, &QNetworkReply::finished, this, [this, reply, username, password]() {
- reply->deleteLater();
- m_loginInProgress = false;
- if (reply->error() != QNetworkReply::NoError) {
- if (reply->error() == QNetworkReply::HostNotFoundError) {
- qCWarning(dcCloud()) << "Error logging in to aws due to network connection.";
- emit loginResult(LoginErrorNetworkError);
- cancelCallQueue();
- return;
- }
- if (reply->error() == QNetworkReply::ProtocolInvalidOperationError) {
- qCWarning(dcCloud()) << "Looks like a wrong password.";
- m_username.clear();
- m_password.clear();
- cancelCallQueue();
- emit loginResult(LoginErrorInvalidUserOrPass);
- return;
- }
- qCWarning(dcCloud()) << "Error logging in to aws. Error:" << reply->error() << reply->errorString();
- cancelCallQueue();
- emit loginResult(LoginErrorUnknownError);
- return;
- }
- QByteArray data = reply->readAll();
- QJsonParseError error;
- QJsonDocument jsonDoc = QJsonDocument::fromJson(data, &error);
- if (error.error != QJsonParseError::NoError) {
- qCWarning(dcCloud()) << "Failed to parse AWS login response" << error.errorString();
- m_username.clear();
- m_password.clear();
- cancelCallQueue();
- emit loginResult(LoginErrorUnknownError);
- return;
- }
-
- QVariantMap authenticationResult = jsonDoc.toVariant().toMap().value("AuthenticationResult").toMap();
- m_accessToken = authenticationResult.value("AccessToken").toByteArray();
- m_accessTokenExpiry = QDateTime::currentDateTime().addSecs(authenticationResult.value("ExpiresIn").toInt());
- m_idToken = authenticationResult.value("IdToken").toByteArray();
- m_refreshToken = authenticationResult.value("RefreshToken").toByteArray();
-
-// qDebug() << "AWS ID token" << m_idToken;
- QList jwtParts = m_idToken.split('.');
- if (jwtParts.count() != 3) {
- qCWarning(dcCloud()) << "Error: JWT token doesn't have 3 parts. Cannot retrieve AWS Cognito ID.";
- cancelCallQueue();
- emit loginResult(LoginErrorUnknownError);
- return;
- }
-// qDebug() << "decoded header:" << QByteArray::fromBase64(jwtParts.at(0));
-// qDebug() << "decoded payload:" << QByteArray::fromBase64(jwtParts.at(1));
- QJsonDocument tokenPayloadJsonDoc = QJsonDocument::fromJson(QByteArray::fromBase64(jwtParts.at(1)));
- m_userId = tokenPayloadJsonDoc.toVariant().toMap().value("cognito:username").toByteArray();
-
-// qDebug() << "Getting cognito ID";
- getId();
- });
- return true;
-}
-
-void AWSClient::logout()
-{
- m_userId.clear();
- m_username.clear();
- m_password.clear();
- m_devices->clear();
- QSettings settings;
- settings.remove("cloud");
- emit isLoggedInChanged();
-}
-
-void AWSClient::signup(const QString &username, const QString &password)
-{
- m_userId = QUuid::createUuid().toString().remove(QRegExp("[{}]"));
- m_username = username;
- m_password = password;
-
- QString host = QString("cognito-idp.%1.amazonaws.com").arg(m_configs.value(m_usedConfig).region);
- QUrl url(QString("https://%1/").arg(host));
-
- QUrlQuery query;
- query.addQueryItem("Action", "SignUp");
- query.addQueryItem("Version", "2016-04-18");
- url.setQuery(query);
-
- QNetworkRequest request(url);
- request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-amz-json-1.0");
- request.setRawHeader("Host", host.toUtf8());
- request.setRawHeader("X-Amz-Target", "AWSCognitoIdentityProviderService.SignUp");
-
- QVariantMap params;
- params.insert("ClientId", m_configs.value(m_usedConfig).clientId);
- params.insert("Username", m_userId);
- params.insert("Password", password);
-
- QVariantMap emailAttribute;
- emailAttribute.insert("Name", "email");
- emailAttribute.insert("Value", username);
-
- QVariantList userAttributes;
- userAttributes.append(emailAttribute);
- params.insert("UserAttributes", userAttributes);
-
- QJsonDocument jsonDoc = QJsonDocument::fromVariant(params);
- QByteArray payload = jsonDoc.toJson(QJsonDocument::Compact);
-
- qCInfo(dcCloud()) << "Signing up to AWS as user:" << username << payload;
-
- QNetworkReply *reply = m_nam->post(request, payload);
- connect(reply, &QNetworkReply::finished, this, [this, reply]() {
- QByteArray data = reply->readAll();
- reply->deleteLater();
- qCDebug(dcCloud()) << "AWS signup reply:" << data;
-
- if (reply->error() == QNetworkReply::ProtocolInvalidOperationError) {
- emit signupResult(LoginErrorInvalidUserOrPass);
- return;
- }
-
- if (reply->error() != QNetworkReply::NoError) {
- qCWarning(dcCloud()) << "Error signing up to aws:" << reply->error() << reply->errorString();
- m_username.clear();
- m_password.clear();
- emit signupResult(LoginErrorUnknownError);
- return;
- }
-
- emit signupResult(LoginErrorNoError);
-
- m_confirmationPending = true;
- emit confirmationPendingChanged();
- });
-}
-
-void AWSClient::confirmRegistration(const QString &code)
-{
- QString host = QString("cognito-idp.%1.amazonaws.com").arg(m_configs.value(m_usedConfig).region);
- QUrl url(QString("https://%1/").arg(host));
-
- QUrlQuery query;
- query.addQueryItem("Action", "ConfirmSignUp");
- query.addQueryItem("Version", "2016-04-18");
- url.setQuery(query);
-
- QNetworkRequest request(url);
- request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-amz-json-1.0");
- request.setRawHeader("Host", host.toUtf8());
- request.setRawHeader("X-Amz-Target", "AWSCognitoIdentityProviderService.ConfirmSignUp");
-
- QVariantMap params;
- params.insert("ClientId", m_configs.value(m_usedConfig).clientId);
- params.insert("Username", m_userId);
- params.insert("ConfirmationCode", code);
-
- QJsonDocument jsonDoc = QJsonDocument::fromVariant(params);
- QByteArray payload = jsonDoc.toJson(QJsonDocument::Compact);
-
- qCInfo(dcCloud()) << "Confirming registration for user:" << m_username;
-
- QNetworkReply *reply = m_nam->post(request, payload);
- connect(reply, &QNetworkReply::finished, this, [this, reply]() {
- QByteArray data = reply->readAll();
- reply->deleteLater();
- qCDebug(dcCloud()) << "AWS signup reply:" << data;
-
- if (reply->error() == QNetworkReply::ProtocolInvalidOperationError) {
- QJsonParseError error;
- QVariantMap result = QJsonDocument::fromJson(data, &error).toVariant().toMap();
- if (result.value("__type").toString() == "com.amazonaws.cognito.identity.idp.model#CodeMismatchException") {
- emit confirmationResult(LoginErrorInvalidCode);
- return;
- } else if (result.value("__type").toString() == "com.amazonaws.cognito.identity.idp.model#AliasExistsException") {
- emit confirmationResult(LoginErrorUserExists);
- return;
- }
- emit confirmationResult(LoginErrorUnknownError);
- return;
- }
-
- if (reply->error() != QNetworkReply::NoError) {
- qCWarning(dcCloud()) << "Error confirming registration:" << reply->error() << reply->errorString();
- emit confirmationResult(LoginErrorUnknownError);
- return;
- }
-
- m_confirmationPending = false;
- emit confirmationPendingChanged();
- emit confirmationResult(LoginErrorNoError);
- login(m_username, m_password);
- fetchDevices();
- });
-}
-
-void AWSClient::forgotPassword(const QString &username)
-{
- QString host = QString("cognito-idp.%1.amazonaws.com").arg(m_configs.value(m_usedConfig).region);
- QUrl url(QString("https://%1/").arg(host));
-
- QUrlQuery query;
- query.addQueryItem("Action", "ForgotPassword");
- query.addQueryItem("Version", "2016-04-18");
- url.setQuery(query);
-
- QNetworkRequest request(url);
- request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-amz-json-1.0");
- request.setRawHeader("Host", host.toUtf8());
- request.setRawHeader("X-Amz-Target", "AWSCognitoIdentityProviderService.ForgotPassword");
-
- QVariantMap params;
- params.insert("ClientId", m_configs.value(m_usedConfig).clientId);
- params.insert("Username", username);
-
- QJsonDocument jsonDoc = QJsonDocument::fromVariant(params);
- QByteArray payload = jsonDoc.toJson(QJsonDocument::Compact);
-
- qCInfo(dcCloud()) << "Forgot password for user:" << username << payload;
-
- QNetworkReply *reply = m_nam->post(request, payload);
- connect(reply, &QNetworkReply::finished, this, [this, reply]() {
- QByteArray data = reply->readAll();
- reply->deleteLater();
-
- if (reply->error() == QNetworkReply::ProtocolInvalidOperationError) {
- QJsonDocument jsonDoc = QJsonDocument::fromJson(data);
- if (jsonDoc.toVariant().toMap().value("__type").toString() == "com.amazonaws.cognito.identity.idp.model#LimitExceededException") {
- emit forgotPasswordResult(LoginErrorLimitExceeded);
- return;
- }
- }
-
- if (reply->error() != QNetworkReply::NoError) {
- qCWarning(dcCloud()) << "Error calling ForgotPassword:" << reply->error() << reply->errorString() << data;
- emit forgotPasswordResult(LoginErrorUnknownError);
- return;
- }
-
- qCInfo(dcCloud()) << "AWS forgotPassword success:" << data;
- emit forgotPasswordResult(LoginErrorNoError);
-
- });
-}
-
-void AWSClient::confirmForgotPassword(const QString &username, const QString &code, const QString &newPassword)
-{
- QString host = QString("cognito-idp.%1.amazonaws.com").arg(m_configs.value(m_usedConfig).region);
- QUrl url(QString("https://%1/").arg(host));
-
- QUrlQuery query;
- query.addQueryItem("Action", "ConfirmForgotPassword");
- query.addQueryItem("Version", "2016-04-18");
- url.setQuery(query);
-
- QNetworkRequest request(url);
- request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-amz-json-1.0");
- request.setRawHeader("Host", host.toUtf8());
- request.setRawHeader("X-Amz-Target", "AWSCognitoIdentityProviderService.ConfirmForgotPassword");
-
- QVariantMap params;
- params.insert("ClientId", m_configs.value(m_usedConfig).clientId);
- params.insert("ConfirmationCode", code);
- params.insert("Username", username);
- params.insert("Password", newPassword);
-
- QJsonDocument jsonDoc = QJsonDocument::fromVariant(params);
- QByteArray payload = jsonDoc.toJson(QJsonDocument::Compact);
-
- qCInfo(dcCloud()) << "Resetting password for user:" << username;
- qCDebug(dcCloud()) << "Reset password payload:" << payload;
-
- QNetworkReply *reply = m_nam->post(request, payload);
- connect(reply, &QNetworkReply::finished, this, [this, reply]() {
- QByteArray data = reply->readAll();
- reply->deleteLater();
-
- if (reply->error() != QNetworkReply::NoError) {
- qCWarning(dcCloud()) << "Error calling ConfirmForgotPassword:" << reply->error() << reply->errorString() << data;
- emit confirmForgotPasswordResult(LoginErrorUnknownError);
- return;
- }
-
- qCInfo(dcCloud()) << "Password reset successfully.";
- emit confirmForgotPasswordResult(LoginErrorNoError);
-
- });
-}
-
-void AWSClient::deleteAccount()
-{
- if (!isLoggedIn()) {
- qCWarning(dcCloud()) << "Not logged in at AWS. Can't delete account";
- return;
- }
- if (tokensExpired()) {
- qCInfo(dcCloud()) << "Cannot unpair device. Need to refresh our tokens";
- refreshAccessToken();
- QueuedCall::enqueue(m_callQueue, QueuedCall("deleteAccount"));
- return;
- }
- qCInfo(dcCloud()) << "Deleting account";
-
- QUrl url(QString("https://%1/users/profiles/%2").arg(m_configs.value(m_usedConfig).apiEndpoint).arg(m_userId));
- QNetworkRequest request(url);
- request.setHeader(QNetworkRequest::ContentTypeHeader, "application/json");
- request.setRawHeader("x-api-idToken", m_idToken);
-
- qCDebug(dcCloud()) << "DELETE" << url.toString();
- qCDebug(dcCloud()) << "HEADERS:";
- foreach (const QByteArray &hdr, request.rawHeaderList()) {
- qCDebug(dcCloud()) << hdr << ":" << request.rawHeader(hdr);
- }
-
- QNetworkReply *reply = m_nam->deleteResource(request);
- connect(reply, &QNetworkReply::finished, this, [this, reply]() {
- reply->deleteLater();
- QByteArray data = reply->readAll();
- if (reply->error() != QNetworkReply::NoError) {
- qCWarning(dcCloud()) << "Error deleting cloud user account:" << reply->error() << reply->errorString() << qUtf8Printable(data);
- emit deleteAccountResult(LoginErrorUnknownError);
- return;
- }
- QJsonParseError error;
- QJsonDocument jsonDoc = QJsonDocument::fromJson(data, &error);
- if (error.error != QJsonParseError::NoError) {
- qCWarning(dcCloud()) << "Failed to parse JSON from server" << error.errorString() << qUtf8Printable(data);
- emit deleteAccountResult(LoginErrorUnknownError);
- return;
- }
- emit deleteAccountResult(LoginErrorNoError);
- logout();
- qCInfo(dcCloud()) << "Account deleted" << data;
- });
-}
-
-void AWSClient::unpairDevice(const QString &coreId)
-{
- if (!isLoggedIn()) {
- qCWarning(dcCloud()) << "Not logged in at AWS. Can't unpair device";
- return;
- }
- if (tokensExpired()) {
- qCInfo(dcCloud()) << "Cannot unpair device. Need to refresh our tokens";
- refreshAccessToken();
- QueuedCall::enqueue(m_callQueue, QueuedCall("unpairDevice", coreId));
- return;
- }
- qCInfo(dcCloud()) << "Unpairing device" << coreId << "from user" << m_username;
- QUrl url(QString("https://%1/users/devices/%2").arg(m_configs.value(m_usedConfig).apiEndpoint).arg(coreId));
- QNetworkRequest request(url);
- request.setHeader(QNetworkRequest::ContentTypeHeader, "application/json");
- request.setRawHeader("x-api-idToken", m_idToken);
-
- m_devices->setBusy(true);
- QNetworkReply *reply = m_nam->deleteResource(request);
- connect(reply, &QNetworkReply::finished, this, [this, reply, coreId]() {
- reply->deleteLater();
- m_devices->setBusy(false);
- QByteArray data = reply->readAll();
- if (reply->error() != QNetworkReply::NoError) {
- qWarning() << "Error unpairing cloud device:" << reply->error() << reply->errorString() << qUtf8Printable(data);
- return;
- }
- QJsonParseError error;
- QJsonDocument jsonDoc = QJsonDocument::fromJson(data, &error);
- if (error.error != QJsonParseError::NoError) {
- qWarning() << "Failed to parse JSON from server" << error.errorString() << qUtf8Printable(data);
- return;
- }
- qCInfo(dcCloud()) << "Device" << coreId << "unpaired from user" << m_username;
- m_devices->remove(coreId);
-
- });
-}
-
-void AWSClient::getId()
-{
- QString host = QString("cognito-identity.%1.amazonaws.com").arg(m_configs.value(m_usedConfig).region);
- QUrl url(QString("https://%1/").arg(host));
-
- QUrlQuery query;
- query.addQueryItem("Action", "GetId");
- query.addQueryItem("Version", "2016-06-30");
- url.setQuery(query);
-
- QNetworkRequest request(url);
- request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-amz-json-1.0");
- request.setRawHeader("Host", host.toUtf8());
- request.setRawHeader("X-Amz-Target", "AWSCognitoIdentityService.GetId");
-
- QVariantMap logins;
- logins.insert(QString("cognito-idp.%1.amazonaws.com/%2").arg(m_configs.value(m_usedConfig).region).arg(m_configs.value(m_usedConfig).poolId).toUtf8(), m_idToken);
-
- QVariantMap params;
- params.insert("IdentityPoolId", m_configs.value(m_usedConfig).identityPoolId.toUtf8());
- params.insert("Logins", logins);
-
- QJsonDocument jsonDoc = QJsonDocument::fromVariant(params);
- QByteArray payload = jsonDoc.toJson(QJsonDocument::Compact);
-
- qCDebug(dcCloud()) << "Posting:" << request.url().toString();
- qDebug(dcCloud()) << "Payload:" << payload;
- QNetworkReply *reply = m_nam->post(request, payload);
- connect(reply, &QNetworkReply::finished, this, [this, reply]() {
- reply->deleteLater();
- if (reply->error() != QNetworkReply::NoError) {
- qCWarning(dcCloud()) << "Error calling GetId" << reply->error() << reply->errorString();
- cancelCallQueue();
- return;
- }
- QByteArray data = reply->readAll();
- QJsonParseError error;
- QJsonDocument jsonDoc = QJsonDocument::fromJson(data, &error);
- if (error.error != QJsonParseError::NoError) {
- qCWarning(dcCloud()) << "Error parsing json reply for GetId" << error.errorString();
- cancelCallQueue();
- return;
- }
- m_identityId = jsonDoc.toVariant().toMap().value("IdentityId").toByteArray();
-
- qCDebug(dcCloud()) << "Received cognito identity id" << m_identityId;// << qUtf8Printable(data);
- getCredentialsForIdentity(m_identityId);
-
- });
-}
-
-void AWSClient::registerPushNotificationEndpoint(const QString ®istrationId, const QString &deviceDisplayName, const QString mobileDeviceId, const QString &mobileDeviceManufacturer, const QString &mobileDeviceModel)
-{
- if (!isLoggedIn()) {
- qCWarning(dcCloud()) << "Not logged in at AWS. Can't register push endpoint";
- return;
- }
- if (tokensExpired()) {
- qCInfo(dcCloud()) << "Cannot register push endpoint. Need to refresh our tokens";
- QueuedCall::enqueue(m_callQueue, QueuedCall("registerPushNotificationEndpoint", registrationId, deviceDisplayName, mobileDeviceId, mobileDeviceManufacturer, mobileDeviceModel));
- refreshAccessToken();
- return;
- }
-
- QUrl url(QString("https://%1/notifications/endpoints/%2").arg(m_configs.value(m_usedConfig).apiEndpoint).arg(m_userId));
- QNetworkRequest request(url);
- request.setHeader(QNetworkRequest::ContentTypeHeader, "application/json");
- request.setRawHeader("x-api-idToken", m_idToken);
-
-
- QVariantMap payload;
- payload.insert("registrationId", registrationId);
- payload.insert("channel", m_configs.value(m_usedConfig).pushNotificationSystem);
- payload.insert("mobileDeviceDisplayName", deviceDisplayName);
- payload.insert("mobileDeviceUuid", mobileDeviceId);
- payload.insert("mobileDeviceManufacturer", mobileDeviceManufacturer);
- payload.insert("mobileDeviceModel", mobileDeviceModel);
- payload.insert("appVersion", APP_VERSION);
- payload.insert("marketResearchAllowed", false);
- payload.insert("locale", QLocale().name());
- payload.insert("country", QLocale::countryToString(QLocale().country()));
- payload.insert("platform", QSysInfo::productType());
- payload.insert("platformVersion", QSysInfo::productVersion());
-
- QJsonDocument jsonDoc = QJsonDocument::fromVariant(payload);
-
- qCInfo(dcCloud()) << "Registering push notification endpoint" << qUtf8Printable(QJsonDocument::fromVariant(payload).toJson());
-// qDebug() << "POST" << url.toString();
-// qDebug() << "HEADERS:";
-// foreach (const QByteArray &hdr, request.rawHeaderList()) {
-// qDebug() << hdr << ":" << request.rawHeader(hdr);
-// }
-// qDebug() << "Payload:" << qUtf8Printable(jsonDoc.toJson(QJsonDocument::Compact));
-
- QNetworkReply *reply = m_nam->post(request, jsonDoc.toJson(QJsonDocument::Compact));
- connect(reply, &QNetworkReply::finished, this, [reply]() {
- reply->deleteLater();
- QByteArray data = reply->readAll();
- if (reply->error() != QNetworkReply::NoError) {
- qCWarning(dcCloud()) << "Error registering push notification endpoint:" << reply->error() << reply->errorString() << qUtf8Printable(data);
- return;
- }
- qCInfo(dcCloud()) << "Push notification endpoint registered" << data;
- });
-
-}
-
-QByteArray AWSClient::idToken() const
-{
- return m_idToken;
-}
-
-QString AWSClient::cognitoIdentityId() const
-{
- return m_identityId;
-}
-
-void AWSClient::fetchCertificate(const QString &uuid, std::function callback)
-{
- QString fixedUuid = uuid;
- fixedUuid.remove(QRegExp("[{}]"));
- QNetworkRequest request(m_configs.value(m_usedConfig).certificateEndpoint);
- request.setRawHeader("X-api-key", m_configs.value(m_usedConfig).certificateApiKey.toUtf8());
- request.setRawHeader("X-api-vendorId", m_configs.value(m_usedConfig).certificateVendorId.toUtf8());
- request.setRawHeader("X-api-deviceId", fixedUuid.toUtf8());
- request.setRawHeader("X-api-serialId", "69696969");
- QNetworkReply *reply = m_nam->get(request);
- qCInfo(dcCloud()) << "Fetching certificate for vendor:" << m_configs.value(m_usedConfig).certificateVendorId << "device id:" << fixedUuid;
- connect(reply, &QNetworkReply::finished, this, [this, reply, callback]() {
- reply->deleteLater();
- QByteArray data = reply->readAll();
- if (reply->error() != QNetworkReply::NoError) {
- qCWarning(dcCloud()) << "Error deploying certificate" << data;
- return;
- }
- QJsonParseError error;
- QJsonDocument jsonDoc = QJsonDocument::fromJson(data, &error);
- if (error.error != QJsonParseError::NoError) {
- qCWarning(dcCloud()) << "Error parsing certificate json" << data;
- return;
- }
-
- QByteArray certificate = jsonDoc.toVariant().toMap().value("certificatePem").toByteArray();
- QByteArray publicKey = jsonDoc.toVariant().toMap().value("keyPair").toMap().value("PublicKey").toByteArray();
- QByteArray privateKey = jsonDoc.toVariant().toMap().value("keyPair").toMap().value("PrivateKey").toByteArray();
- qCDebug(dcCloud()) << "Certificate received" << certificate;
- qCDebug(dcCloud()) << "Public key" << publicKey;
- qCDebug(dcCloud()) << "Private key" << privateKey;
- callback(rootCA, certificate, publicKey, privateKey, m_configs.value(m_usedConfig).mqttEndpoint);
- });
-
-}
-
-QStringList AWSClient::availableConfigs() const
-{
- return m_configs.keys();
-}
-
-QString AWSClient::config() const
-{
- return m_usedConfig;
-}
-
-void AWSClient::setConfig(const QString &config)
-{
- // We had a bug in some version where the UI would set "community" instead of "Community".
- // Let's correct that here in case the user still has the wrong value in its config.
- QString fixedConfig = config;
- if (fixedConfig.length() > 0) {
- fixedConfig = fixedConfig.at(0).toUpper() + fixedConfig.right(fixedConfig.length() - 1);
- }
-
- if (m_usedConfig != fixedConfig) {
- if (!m_configs.contains(fixedConfig)) {
- qCWarning(dcCloud()) << "AWS: Config" << fixedConfig << "not known. Not switching AWS config";
- return;
- }
- qCInfo(dcCloud()) << "Setting AWS configuration to" << fixedConfig;
- m_usedConfig = fixedConfig;
- emit configChanged();
- }
-}
-
-void AWSClient::getCredentialsForIdentity(const QString &identityId)
-{
- QString host = QString("cognito-identity.%1.amazonaws.com").arg(m_configs.value(m_usedConfig).region);
- QUrl url(QString("https://%1/").arg(host));
-
- QUrlQuery query;
- query.addQueryItem("Action", "GetCredentialsForIdentity");
- query.addQueryItem("Version", "2016-06-30");
- url.setQuery(query);
-
- QNetworkRequest request(url);
- request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-amz-json-1.0");
- request.setRawHeader("Host", host.toUtf8());
- request.setRawHeader("X-Amz-Target", "AWSCognitoIdentityService.GetCredentialsForIdentity");
-
- QVariantMap logins;
- logins.insert(QString("cognito-idp.eu-west-1.amazonaws.com/%1").arg(m_configs.value(m_usedConfig).poolId), m_idToken);
-
- QVariantMap params;
- params.insert("IdentityId", identityId);
- params.insert("Logins", logins);
-
- QJsonDocument jsonDoc = QJsonDocument::fromVariant(params);
- QByteArray payload = jsonDoc.toJson(QJsonDocument::Compact);
-
-// qDebug() << "Calling GetCredentialsForIdentity:" << request.url();
-// qDebug() << "Headers:";
-// foreach (const QByteArray &headerName, request.rawHeaderList()) {
-// qDebug() << headerName << ":" << request.rawHeader(headerName);
-// }
-// qDebug() << "Payload:" << qUtf8Printable(payload);
-
- QNetworkReply *reply = m_nam->post(request, payload);
- connect(reply, &QNetworkReply::finished, this, [this, reply]() {
- reply->deleteLater();
- if (reply->error() != QNetworkReply::NoError) {
- qCWarning(dcCloud()) << "Error calling GetCredentialsForIdentity" << reply->errorString();
- cancelCallQueue();
- emit loginResult(LoginErrorUnknownError);
- return;
- }
- QByteArray data = reply->readAll();
- QJsonParseError error;
- QJsonDocument jsonDoc = QJsonDocument::fromJson(data, &error);
- if (error.error != QJsonParseError::NoError) {
- qCWarning(dcCloud()) << "Error parsing JSON reply from GetCredentialsForIdentity" << error.errorString();
- cancelCallQueue();
- emit loginResult(LoginErrorUnknownError);
- return;
- }
- QVariantMap credentialsMap = jsonDoc.toVariant().toMap().value("Credentials").toMap();
-
- m_accessKeyId = credentialsMap.value("AccessKeyId").toByteArray();
- m_secretKey = credentialsMap.value("SecretKey").toByteArray();
- m_sessionToken = credentialsMap.value("SessionToken").toByteArray();
- m_sessionTokenExpiry = QDateTime::fromSecsSinceEpoch(credentialsMap.value("Expiration").toLongLong());
-
- qCInfo(dcCloud()) << "AWS login successful. Userid:" << m_userId;
-
-
- QSettings settings;
- bool newLogin = !settings.childGroups().contains("cloud");
-
- settings.remove("cloud");
- settings.beginGroup("cloud");
- settings.setValue("username", m_username);
- settings.setValue("userId", m_userId);
- settings.setValue("password", m_password);
- settings.setValue("accessToken", m_accessToken);
- settings.setValue("accessTokenExpiry", m_accessTokenExpiry);
- settings.setValue("identityId", m_identityId);
- settings.setValue("idToken", m_idToken);
- settings.setValue("refreshToken", m_refreshToken);
- settings.setValue("accessKeyId", m_accessKeyId);
- settings.setValue("secretKey", m_secretKey);
- settings.setValue("sessionToken", m_sessionToken);
- settings.setValue("sessionTokenExpiry", m_sessionTokenExpiry);
-
- emit loginResult(LoginErrorNoError);
-
- if (newLogin) {
- qCInfo(dcCloud()) << "New login!";
- emit isLoggedInChanged();
- }
-
- while (!m_callQueue.isEmpty()) {
- QueuedCall qc = m_callQueue.takeFirst();
-// qDebug() << "Calling from queue:" << qc.method;
- if (qc.method == "fetchDevices") {
- fetchDevices();
- } else if (qc.method == "postToMQTT") {
- postToMQTT(qc.arg1, qc.arg2, qc.sender, qc.callback);
- } else if (qc.method == "deleteAccount") {
- deleteAccount();
- } else if (qc.method == "registerPushNotificationEndpoint") {
- registerPushNotificationEndpoint(qc.arg1, qc.arg2, qc.arg3, qc.arg4, qc.arg5);
- } else if (qc.method == "unpairDevice") {
- unpairDevice(qc.arg1);
- }
- }
- });
-}
-
-void AWSClient::cancelCallQueue()
-{
- while (!m_callQueue.isEmpty()) {
- QueuedCall qc = m_callQueue.takeFirst();
- // Only postToMQTT needs calling a callback with error
- if (qc.method == "postToMQTT") {
- if (!qc.sender.isNull()) {
- qc.callback(false);
- }
- }
- }
-}
-
-bool AWSClient::tokensExpired() const
-{
- return (m_accessTokenExpiry.addSecs(-10) < QDateTime::currentDateTime()) || (m_sessionTokenExpiry.addSecs(-10) < QDateTime::currentDateTime());
-}
-
-bool AWSClient::postToMQTT(const QString &coreId, const QString &nonce, QPointer sender, std::function callback)
-{
- if (!isLoggedIn()) {
- qCWarning(dcCloud()) << "Cannot post to MQTT. Not logged in to AWS";
- return false;
- }
- if (tokensExpired()) {
- qCDebug(dcCloud()) << "Cannot post to MQTT. Need to refresh the tokens first";
- refreshAccessToken();
- QueuedCall::enqueue(m_callQueue, QueuedCall("postToMQTT", coreId, nonce, sender, callback));
- return true; // Pretending we're doing fine
- }
- QString topic = QString("%1/%2/proxy").arg(coreId).arg(QString(m_identityId));
-
- // This is somehow broken in AWS...
- // The Signature needs to be created with having the topic percentage-encoded twice
- // while the actual request needs to go out with it only being encoded once.
- // Now one could think this is an issue in how the signature is made, but it can't really
- // be fixed there as this concerns only the actual topic, not /topics/
- // so we can't percentage-encode the whole path inside the signature helper...
- QString path = "/topics/" + topic.toUtf8().toPercentEncoding().toPercentEncoding() + "?qos=1";
- QString path1 = "/topics/" + topic.toUtf8().toPercentEncoding() + "?qos=1";
-
- QVariantMap params;
- params.insert("token", m_idToken);
- params.insert("nonce", nonce);
- // FIXME: Old (nymea < 0.18) protocol spec had "timestamp" instead of "nonce", keeping it for backwards compatibility for a bit
- params.insert("timestamp", nonce);
- QByteArray payload = QJsonDocument::fromVariant(params).toJson(QJsonDocument::Compact);
-
-
- QNetworkRequest request("https://" + m_configs.value(m_usedConfig).mqttEndpoint + path);
- request.setRawHeader("content-type", "application/json");
- request.setRawHeader("host", m_configs.value(m_usedConfig).mqttEndpoint.toUtf8());
-
- SigV4Utils::signRequest(QNetworkAccessManager::PostOperation, request, m_configs.value(m_usedConfig).region, "iotdata", m_accessKeyId, m_secretKey, m_sessionToken, payload);
-
- // Workaround MQTT broker url weirdness as described above
- request.setUrl("https://" + m_configs.value(m_usedConfig).mqttEndpoint + path1);
-
- qCInfo(dcCloud) << "Posting to MQTT:" << request.url().toString();
-// qCDebug(dcCloud) << "HEADERS:";
-// foreach (const QByteArray &headerName, request.rawHeaderList()) {
-// qCDebug(dcCloud) << headerName << ":" << request.rawHeader(headerName);
-// }
- qCDebug(dcCloud) << "Payload:" << payload;
- QNetworkReply *reply = m_nam->post(request, payload);
- QTimer::singleShot(5000, reply, [reply, sender, callback](){
- reply->deleteLater();
- qCWarning(dcCloud) << "Timeout posting to MQTT";
- if (!sender.isNull()) {
- callback(false);
- }
- });
- connect(reply, &QNetworkReply::finished, this, [reply, sender, callback]() {
- reply->deleteLater();
- QByteArray data = reply->readAll();
-// qDebug() << "MQTT post reply" << data;
- if (sender.isNull()) {
- qCDebug(dcCloud()) << "Request object disappeared. Discarding MQTT reply...";
- return;
- }
- if (reply->error() != QNetworkReply::NoError) {
- qCWarning(dcCloud()) << "MQTT Network reply error" << reply->error() << reply->errorString() << qUtf8Printable(data);
- callback(false);
- return;
- }
- QJsonParseError error;
- QJsonDocument jsonDoc = QJsonDocument::fromJson(data, &error);
- if (error.error != QJsonParseError::NoError) {
- qCWarning(dcCloud()) << "Failed to parse MQTT reply" << error.error << error.errorString() << qUtf8Printable(data);
- callback(false);
- return;
- }
- if (jsonDoc.toVariant().toMap().value("message").toString() != "OK") {
- qCWarning(dcCloud()) << "Something went wrong posting to MQTT:" << jsonDoc.toVariant().toMap().value("message").toString();
- callback(false);
- return;
- }
- callback(true);
- });
-
- return true;
-}
-
-void AWSClient::fetchDevices()
-{
- if (m_usedConfig.isEmpty()) {
- qCWarning(dcCloud()) << "Cloud environment not set. Not fetching cloud devices";
- return;
- }
- if (!isLoggedIn()) {
- qCWarning(dcCloud()) << "Not logged in at AWS. Can't fetch paired devices";
- return;
- }
- if (tokensExpired()) {
- qCDebug(dcCloud()) << "Cannot fetch devices. Need to refresh our tokens";
- refreshAccessToken();
- QueuedCall::enqueue(m_callQueue, QueuedCall("fetchDevices"));
- return;
- }
- QUrl url(QString("https://%1/users/devices").arg(m_configs.value(m_usedConfig).apiEndpoint));
- qCDebug(dcCloud()) << "Fetching cloud devices" << url.toString();
- QNetworkRequest request(url);
- request.setHeader(QNetworkRequest::ContentTypeHeader, "application/json");
- request.setRawHeader("x-api-idToken", m_idToken);
-
- m_devices->setBusy(true);
- QNetworkReply *reply = m_nam->get(request);
- connect(reply, &QNetworkReply::finished, this, [this, reply]() {
- reply->deleteLater();
- m_devices->setBusy(false);
- QByteArray data = reply->readAll();
- if (reply->error() != QNetworkReply::NoError) {
- qCWarning(dcCloud()) << "Error fetching cloud devices:" << reply->error() << reply->errorString() << qUtf8Printable(data);
- if (reply->error() == QNetworkReply::AuthenticationRequiredError) {
- qCInfo(dcCloud()) << "Trying to refresh access token";
- refreshAccessToken();
- QueuedCall::enqueue(m_callQueue, QueuedCall("fetchDevices"));
- }
- return;
- }
- QJsonParseError error;
- QJsonDocument jsonDoc = QJsonDocument::fromJson(data, &error);
- if (error.error != QJsonParseError::NoError) {
- qCWarning(dcCloud()) << "Failed to parse JSON from server" << error.errorString() << qUtf8Printable(data);
- return;
- }
- QList actualDevices;
- foreach (const QVariant &entry, jsonDoc.toVariant().toMap().value("devices").toList()) {
- QString deviceId = entry.toMap().value("deviceId").toString();
- QString name = entry.toMap().value("name").toString();
- bool online = entry.toMap().value("online").toBool();
- qCDebug(dcCloud()) << "Have cloud device:" << deviceId << name << "online:" << online;
-
- AWSDevice *d = m_devices->getDevice(deviceId);
- if (!d) {
- d = new AWSDevice(deviceId, name);
- m_devices->insert(d);
- }
- d->setOnline(online);
- d->setName(name);
- actualDevices.append(d->id());
- }
-
- // Clean up the model
- QStringList devicesToRemove;
- for (int i = 0; i < m_devices->rowCount(); i++) {
- if (!actualDevices.contains(m_devices->get(i)->id())) {
- devicesToRemove.append(m_devices->get(i)->id());
- }
- }
- while (!devicesToRemove.isEmpty()) {
- m_devices->remove(devicesToRemove.takeFirst());
- }
-
- emit devicesFetched();
-
- });
-}
-
-bool AWSClient::refreshAccessToken()
-{
- if (!isLoggedIn()) {
- qCWarning(dcCloud()) << "Cannot refresh tokens. Not logged in to AWS";
- return false;
- }
-
- // We should use REFRESH_TOKEN_AUTH to refresh our tokens but it's not working
- // https://forums.aws.amazon.com/thread.jspa?threadID=287978
- // Let's re-login instead with user & pass
- return login(m_username, m_password);
-
-
- // Non-working block... Enable this if Amazon ever fixes their API...
- QString host = QString("cognito-idp.%1.amazonaws.com").arg(m_configs.value(m_usedConfig).region);
- QUrl url(QString("https://%1/").arg(host));
-
- QUrlQuery query;
- query.addQueryItem("Action", "InitiateAuth");
- query.addQueryItem("Version", "2016-04-18");
- url.setQuery(query);
-
- QNetworkRequest request(url);
- request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-amz-json-1.0");
- request.setRawHeader("Host", host.toUtf8());
- request.setRawHeader("X-Amz-Target", "AWSCognitoIdentityProviderService.InitiateAuth");
-
- QVariantMap params;
- params.insert("AuthFlow", "REFRESH_TOKEN_AUTH");
- params.insert("ClientId", m_configs.value(m_usedConfig).clientId);
-
- QVariantMap authParams;
- authParams.insert("REFRESH_TOKEN", m_refreshToken);
-
- params.insert("AuthParameters", authParams);
-
- QJsonDocument jsonDoc = QJsonDocument::fromVariant(params);
- QByteArray payload = jsonDoc.toJson(QJsonDocument::Compact);
-
- qDebug() << "Refreshing AWS token for user:" << m_username << qUtf8Printable(payload);
-
- QNetworkReply *reply = m_nam->post(request, payload);
- connect(reply, &QNetworkReply::finished, this, [this, reply]() {
- reply->deleteLater();
- if (reply->error() != QNetworkReply::NoError) {
- qWarning() << "Error logging in to aws:" << reply->error() << reply->errorString();
- return;
- }
- QByteArray data = reply->readAll();
- QJsonParseError error;
- QJsonDocument jsonDoc = QJsonDocument::fromJson(data, &error);
- if (error.error != QJsonParseError::NoError) {
- qWarning() << "Failed to parse AWS login response" << error.errorString();
- return;
- }
-
-// QVariantMap authenticationResult = jsonDoc.toVariant().toMap().value("AuthenticationResult").toMap();
-// m_accessToken = authenticationResult.value("AccessToken").toByteArray();
-// m_accessTokenExpiry = QDateTime::currentDateTime().addSecs(authenticationResult.value("ExpiresIn").toInt());
-// m_idToken = authenticationResult.value("IdToken").toByteArray();
-// m_refreshToken = authenticationResult.value("RefreshToken").toByteArray();
-
-// QSettings settings;
-// settings.beginGroup("cloud");
-// settings.setValue("accessToken", m_accessToken);
-// settings.setValue("accessTokenExpiry", m_accessTokenExpiry);
-// settings.setValue("idToken", m_idToken);
-// settings.setValue("refreshToken", m_refreshToken);
-
- qCInfo(dcCloud()) << "AWS login successful" << qUtf8Printable(jsonDoc.toJson(QJsonDocument::Indented));
- emit isLoggedInChanged();
-
- });
- return true;
-}
-
-
-AWSDevices::AWSDevices(QObject *parent):
- QAbstractListModel(parent)
-{
-
-}
-
-int AWSDevices::rowCount(const QModelIndex &parent) const
-{
- Q_UNUSED(parent)
- return m_list.count();
-}
-
-QVariant AWSDevices::data(const QModelIndex &index, int role) const
-{
- switch (role) {
- case RoleName:
- return m_list.at(index.row())->name();
- case RoleId:
- return m_list.at(index.row())->id();
- case RoleOnline:
- return m_list.at(index.row())->online();
- }
- return QVariant();
-}
-
-QHash AWSDevices::roleNames() const
-{
- QHash roles;
- roles.insert(RoleName, "name");
- roles.insert(RoleId, "id");
- roles.insert(RoleOnline, "online");
- return roles;
-}
-
-bool AWSDevices::busy() const
-{
- return m_busy;
-}
-
-void AWSDevices::setBusy(bool busy)
-{
- if (m_busy != busy) {
- m_busy = busy;
- emit busyChanged();
- }
-}
-
-AWSDevice *AWSDevices::getDevice(const QString &uuid) const
-{
- for (int i = 0; i < m_list.count(); i++) {
- if (m_list.at(i)->id().remove(QRegExp("[{}]")) == QString(uuid).remove(QRegExp("[{}]"))) {
- return m_list.at(i);
- }
- }
- return nullptr;
-}
-
-AWSDevice *AWSDevices::get(int index) const
-{
- if (index < 0 || index >= m_list.count()) {
- return nullptr;
- }
- return m_list.at(index);
-}
-
-void AWSDevices::insert(AWSDevice *device)
-{
- device->setParent(this);
- beginInsertRows(QModelIndex(), m_list.count(), m_list.count());
- m_list.append(device);
-
- connect(device, &AWSDevice::onlineChanged, this, [this, device](){
- int idx = m_list.indexOf(device);
- if (idx >= 0) {
- emit dataChanged(index(idx), index(idx), {RoleOnline});
- }
- });
-
- connect(device, &AWSDevice::nameChanged, this, [this, device](){
- int idx = m_list.indexOf(device);
- if (idx >= 0) {
- emit dataChanged(index(idx), index(idx), {RoleName});
- }
- });
-
- endInsertRows();
- emit countChanged();
-}
-
-void AWSDevices::remove(const QString &uuid)
-{
- int idx = -1;
- for (int i = 0; i < m_list.count(); i++) {
- if (m_list.at(i)->id() == uuid) {
- idx = i;
- break;
- }
- }
- if (idx == -1) {
- qCWarning(dcCloud()) << "Cannot remove AWS with id" << uuid << "as there is no such device";
- return;
- }
- beginRemoveRows(QModelIndex(), idx, idx);
- m_list.takeAt(idx)->deleteLater();
- endRemoveRows();
- emit countChanged();
-}
-
-void AWSDevices::clear()
-{
- beginResetModel();
- while (m_list.count() > 0) {
- m_list.takeFirst()->deleteLater();
- }
- endResetModel();
- emit countChanged();
-}
-
-AWSDevice::AWSDevice(const QString &id, const QString &name, bool online, QObject *parent):
- QObject (parent),
- m_id(id),
- m_name(name),
- m_online(online)
-{
-
-}
-
-QString AWSDevice::id() const
-{
- return m_id;
-}
-
-QString AWSDevice::name() const
-{
- return m_name;
-}
-
-void AWSDevice::setName(const QString &name)
-{
- if (m_name != name) {
- m_name = name;
- emit nameChanged();
- }
-}
-
-bool AWSDevice::online() const
-{
- return m_online;
-}
-
-void AWSDevice::setOnline(bool online)
-{
- if (m_online != online) {
- m_online = online;
- emit onlineChanged();
- }
-}
diff --git a/libnymea-app/connection/awsclient.h b/libnymea-app/connection/awsclient.h
deleted file mode 100644
index 601d1bef..00000000
--- a/libnymea-app/connection/awsclient.h
+++ /dev/null
@@ -1,253 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-*
-* Copyright 2013 - 2020, nymea GmbH
-* Contact: contact@nymea.io
-*
-* This file is part of nymea.
-* This project including source code and documentation is protected by
-* copyright law, and remains the property of nymea GmbH. All rights, including
-* reproduction, publication, editing and translation, are reserved. The use of
-* this project is subject to the terms of a license agreement to be concluded
-* with nymea GmbH in accordance with the terms of use of nymea GmbH, available
-* under https://nymea.io/license
-*
-* GNU General Public License Usage
-* Alternatively, this project may be redistributed and/or modified under the
-* terms of the GNU General Public License as published by the Free Software
-* Foundation, GNU version 3. This project is distributed in the hope that it
-* will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-* Public License for more details.
-*
-* You should have received a copy of the GNU General Public License along with
-* this project. If not, see .
-*
-* For any further details and any questions please contact us under
-* contact@nymea.io or see our FAQ/Licensing Information on
-* https://nymea.io/license/faq
-*
-* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-#ifndef AWSCLIENT_H
-#define AWSCLIENT_H
-
-#include
-#include
-#include
-#include
-#include
-
-class QNetworkAccessManager;
-
-class AWSDevice: public QObject {
- Q_OBJECT
- Q_PROPERTY(QString id READ id CONSTANT)
- Q_PROPERTY(QString name READ name NOTIFY nameChanged)
- Q_PROPERTY(bool online READ online NOTIFY onlineChanged)
-
-public:
- AWSDevice(const QString &id, const QString &name, bool online = false, QObject *parent = nullptr);
- QString id() const;
- QString name() const;
- void setName(const QString &name);
- bool online() const;
- void setOnline(bool online);
-
-signals:
- void onlineChanged();
- void nameChanged();
-
-private:
- QString m_id;
- QString m_name;
- bool m_online;
-};
-
-class AWSDevices: public QAbstractListModel {
- Q_OBJECT
- Q_PROPERTY(int count READ rowCount NOTIFY countChanged)
- Q_PROPERTY(bool busy READ busy NOTIFY busyChanged)
-public:
- enum Roles {
- RoleName,
- RoleId,
- RoleOnline
- };
- AWSDevices(QObject *parent = nullptr);
- int rowCount(const QModelIndex &parent = QModelIndex()) const override;
- QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
- QHash roleNames() const override;
- bool busy() const;
- void setBusy(bool busy);
- Q_INVOKABLE AWSDevice* getDevice(const QString &uuid) const;
- Q_INVOKABLE AWSDevice* get(int index) const;
- void insert(AWSDevice *device);
- void remove(const QString &uuid);
- void clear();
-signals:
- void countChanged();
- void busyChanged();
-private:
- QList m_list;
- bool m_busy = false;
-};
-
-class AWSConfiguration {
-public:
- QByteArray clientId;
- QString poolId;
- QString identityPoolId;
- QString certificateEndpoint;
- QString certificateApiKey;
- QString certificateVendorId;
- QString mqttEndpoint;
- QString region;
- QString apiEndpoint;
- QString pushNotificationSystem;
-};
-
-class AWSClient : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(bool isLoggedIn READ isLoggedIn NOTIFY isLoggedInChanged)
- Q_PROPERTY(QString username READ username NOTIFY isLoggedInChanged)
- Q_PROPERTY(bool confirmationPending READ confirmationPending NOTIFY confirmationPendingChanged)
- Q_PROPERTY(QString userId READ userId NOTIFY isLoggedInChanged)
- Q_PROPERTY(QByteArray idToken READ idToken NOTIFY isLoggedInChanged)
- Q_PROPERTY(AWSDevices* awsDevices READ awsDevices CONSTANT)
-
- Q_PROPERTY(QStringList availableConfigs READ availableConfigs CONSTANT)
- Q_PROPERTY(QString config READ config WRITE setConfig NOTIFY configChanged)
-
-public:
- enum LoginError {
- LoginErrorNoError,
- LoginErrorInvalidUserOrPass,
- LoginErrorInvalidCode,
- LoginErrorUserExists,
- LoginErrorLimitExceeded,
- LoginErrorUnknownError,
- LoginErrorNetworkError
- };
- Q_ENUM(LoginError)
-
- static AWSClient* instance();
-
- bool isLoggedIn() const;
- QString username() const;
- QString userId() const;
- AWSDevices* awsDevices() const;
- bool confirmationPending() const;
-
- Q_INVOKABLE bool login(const QString &username, const QString &password);
- Q_INVOKABLE void logout();
- Q_INVOKABLE void signup(const QString &username, const QString &password);
- Q_INVOKABLE void confirmRegistration(const QString &code);
- Q_INVOKABLE void forgotPassword(const QString &username);
- Q_INVOKABLE void confirmForgotPassword(const QString &username, const QString &code, const QString &newPassword);
- Q_INVOKABLE void deleteAccount();
-
- Q_INVOKABLE void unpairDevice(const QString &coreId);
-
- Q_INVOKABLE void fetchDevices();
-
- Q_INVOKABLE bool postToMQTT(const QString &coreId, const QString &nonce, QPointer sender, std::function callback);
- Q_INVOKABLE void getId();
-
- Q_INVOKABLE void registerPushNotificationEndpoint(const QString ®istrationId, const QString &deviceDisplayName, const QString mobileDeviceId, const QString &mobileDeviceManufacturer, const QString &mobileDeviceModel);
-
-
- bool tokensExpired() const;
- QByteArray idToken() const;
- QString cognitoIdentityId() const;
-
- void fetchCertificate(const QString &uuid, std::function callback);
-
- QStringList availableConfigs() const;
- QString config() const;
- void setConfig(const QString &config);
-
-signals:
- void loginResult(LoginError error);
- void signupResult(LoginError error);
- void confirmationResult(LoginError error);
- void forgotPasswordResult(LoginError error);
- void confirmForgotPasswordResult(LoginError error);
- void deleteAccountResult(LoginError error);
-
- void isLoggedInChanged();
- void confirmationPendingChanged();
- void devicesFetched();
-
- void configChanged();
-
-private:
- explicit AWSClient(QObject *parent = nullptr);
- static AWSClient* s_instance;
-
- bool refreshAccessToken();
- void getCredentialsForIdentity(const QString &identityId);
- void connectMQTT();
-
-
-private:
- QNetworkAccessManager *m_nam = nullptr;
-
- QString m_userId;
- QString m_username;
- QString m_password;
-
- bool m_loginInProgress = false;
-
- bool m_confirmationPending = false;
-
- QByteArray m_accessToken;
- QDateTime m_accessTokenExpiry;
- QByteArray m_idToken;
- QByteArray m_refreshToken;
-
- QByteArray m_identityId;
-
- QByteArray m_accessKeyId;
- QByteArray m_secretKey;
- QByteArray m_sessionToken;
- QDateTime m_sessionTokenExpiry;
-
- class QueuedCall {
- public:
- QueuedCall(const QString &method): method(method) { }
- QueuedCall(const QString &method, const QString &arg1): method(method), arg1(arg1) { }
- QueuedCall(const QString &method, const QString &arg1, const QString &arg2, const QString &arg3, const QString &arg4, const QString &arg5): method(method), arg1(arg1), arg2(arg2), arg3(arg3), arg4(arg4), arg5(arg5) { }
- QueuedCall(const QString &method, const QString &arg1, const QString &arg2, QPointer sender, std::function callback): method(method), arg1(arg1), arg2(arg2), sender(sender), callback(callback) {}
- QString method;
- QString arg1;
- QString arg2;
- QString arg3;
- QString arg4;
- QString arg5;
- QPointer sender;
- std::function callback;
-
- static void enqueue(QList &queue, const QueuedCall &call) {
- foreach (const QueuedCall &existingCall, queue) {
- if (existingCall.method == call.method &&
- existingCall.arg1 == call.arg1 &&
- existingCall.arg2 == call.arg2 &&
- existingCall.arg3 == call.arg3 &&
- &existingCall.callback == &call.callback) {
- return; // Already in queue
- }
- }
- queue.append(call);
- }
- };
- void cancelCallQueue();
-
- QList m_callQueue;
-
- QHash m_configs;
- QString m_usedConfig = "";
- AWSDevices *m_devices;
-};
-
-#endif // AWSCLIENT_H
diff --git a/libnymea-app/connection/cloudtransport.cpp b/libnymea-app/connection/cloudtransport.cpp
deleted file mode 100644
index 1751748f..00000000
--- a/libnymea-app/connection/cloudtransport.cpp
+++ /dev/null
@@ -1,165 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-*
-* Copyright 2013 - 2020, nymea GmbH
-* Contact: contact@nymea.io
-*
-* This file is part of nymea.
-* This project including source code and documentation is protected by
-* copyright law, and remains the property of nymea GmbH. All rights, including
-* reproduction, publication, editing and translation, are reserved. The use of
-* this project is subject to the terms of a license agreement to be concluded
-* with nymea GmbH in accordance with the terms of use of nymea GmbH, available
-* under https://nymea.io/license
-*
-* GNU General Public License Usage
-* Alternatively, this project may be redistributed and/or modified under the
-* terms of the GNU General Public License as published by the Free Software
-* Foundation, GNU version 3. This project is distributed in the hope that it
-* will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-* Public License for more details.
-*
-* You should have received a copy of the GNU General Public License along with
-* this project. If not, see .
-*
-* For any further details and any questions please contact us under
-* contact@nymea.io or see our FAQ/Licensing Information on
-* https://nymea.io/license/faq
-*
-* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-#include "cloudtransport.h"
-
-#include "awsclient.h"
-#include "remoteproxyconnection.h"
-
-#include
-#include
-#include
-#include
-
-#include
-Q_DECLARE_LOGGING_CATEGORY(dcCloud)
-
-using namespace remoteproxyclient;
-
-CloudTransport::CloudTransport(AWSClient *awsClient, QObject *parent):
- NymeaTransportInterface(parent),
- m_awsClient(awsClient)
-{
- m_remoteproxyConnection = new RemoteProxyConnection(QUuid::createUuid(), qApp->applicationName(), this);
-
- QObject::connect(m_remoteproxyConnection, &RemoteProxyConnection::remoteConnectionEstablished, this,[this]() {
- qCDebug(dcCloud) << "CloudTransport: Remote connection established.";
- emit connected();
- });
- QObject::connect(m_remoteproxyConnection, &RemoteProxyConnection::disconnected, this,[this]() {
- qCDebug(dcCloud) << "CloudTransport: Disconnected.";
- emit disconnected();
- });
-
- QObject::connect(m_remoteproxyConnection, &RemoteProxyConnection::stateChanged, this,[](RemoteProxyConnection::State state) {
- qCDebug(dcCloud) << "Proxy state changed:" << state;
- });
-
- QObject::connect(m_remoteproxyConnection, &RemoteProxyConnection::ready, this,[this]() {
- qCDebug(dcCloud) << "Proxy ready. Authenticating channel.";
- m_remoteproxyConnection->authenticate(m_awsClient->idToken(), m_nonce);
- });
- QObject::connect(m_remoteproxyConnection, &RemoteProxyConnection::dataReady, this, [this](const QByteArray &data) {
- emit dataReady(data);
- });
- QObject::connect(m_remoteproxyConnection, &RemoteProxyConnection::errorOccurred, this, [] (QAbstractSocket::SocketError error) {
- qCDebug(dcCloud) << "Remote proxy Error:" << error;
-// emit NymeaTransportInterface::error(QAbstractSocket::ConnectionRefusedError);
- });
- QObject::connect(m_remoteproxyConnection, &RemoteProxyConnection::sslErrors, this, &CloudTransport::sslErrors);
-}
-
-bool CloudTransport::connect(const QUrl &url)
-{
- if (!m_awsClient->isLoggedIn()) {
- qWarning() << "Not logged in to AWS, cannot connect";
- return false;
- }
-
- qCDebug(dcCloud) << "Connecting to" << url;
- m_url = url;
-
- m_nonce = QUuid::createUuid().toString();
- bool postResult = m_awsClient->postToMQTT(url.host(), m_nonce, QPointer(this), [this](bool success) {
- if (success) {
- qCDebug(dcCloud) << "MQTT Post done. Connecting to remote proxy";
- m_remoteproxyConnection->connectServer(QUrl("wss://remoteproxy.nymea.io"));
- } else {
- qCDebug(dcCloud) << "Posting to MQTT failed";
- emit error(QAbstractSocket::HostNotFoundError);
- }
- });
-
- if (!postResult) {
- qWarning() << "Failed to post to MQTT. Cannot continue";
- return false;
- }
-
- return true;
-}
-
-QUrl CloudTransport::url() const
-{
- return m_url;
-}
-
-void CloudTransport::disconnect()
-{
- qCDebug(dcCloud) << "CloudTransport: Disconnecting from server.";
- m_remoteproxyConnection->disconnectServer();
-}
-
-NymeaTransportInterface::ConnectionState CloudTransport::connectionState() const
-{
- switch (m_remoteproxyConnection->state()) {
- case RemoteProxyConnection::StateRemoteConnected:
- return NymeaTransportInterface::ConnectionStateConnected;
- case RemoteProxyConnection::StateInitializing:
- case RemoteProxyConnection::StateHostLookup:
- case RemoteProxyConnection::StateConnecting:
- case RemoteProxyConnection::StateConnected:
- case RemoteProxyConnection::StateAuthenticating:
- case RemoteProxyConnection::StateReady:
- case RemoteProxyConnection::StateAuthenticated:
- return NymeaTransportInterface::ConnectionStateConnecting;
- case RemoteProxyConnection::StateDisconnected:
- case RemoteProxyConnection::StateDiconnecting:
- return NymeaTransportInterface::ConnectionStateDisconnected;
- }
- return ConnectionStateDisconnected;
-}
-
-void CloudTransport::sendData(const QByteArray &data)
-{
-// qCDebug(dcCloud) << "Cloud transport: Sending data:" << data;
- m_remoteproxyConnection->sendData(data);
-}
-
-void CloudTransport::ignoreSslErrors(const QList &errors)
-{
- qCDebug(dcCloud) << "CloudTransport: Ignoring SSL errors" << errors;
- m_remoteproxyConnection->ignoreSslErrors(errors);
-}
-
-CloudTransportFactory::CloudTransportFactory()
-{
-
-}
-
-NymeaTransportInterface *CloudTransportFactory::createTransport(QObject *parent) const
-{
- return new CloudTransport(AWSClient::instance(), parent);
-}
-
-QStringList CloudTransportFactory::supportedSchemes() const
-{
- return {"cloud"};
-}
-
diff --git a/libnymea-app/connection/cloudtransport.h b/libnymea-app/connection/cloudtransport.h
deleted file mode 100644
index 92baf90d..00000000
--- a/libnymea-app/connection/cloudtransport.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-*
-* Copyright 2013 - 2020, nymea GmbH
-* Contact: contact@nymea.io
-*
-* This file is part of nymea.
-* This project including source code and documentation is protected by
-* copyright law, and remains the property of nymea GmbH. All rights, including
-* reproduction, publication, editing and translation, are reserved. The use of
-* this project is subject to the terms of a license agreement to be concluded
-* with nymea GmbH in accordance with the terms of use of nymea GmbH, available
-* under https://nymea.io/license
-*
-* GNU General Public License Usage
-* Alternatively, this project may be redistributed and/or modified under the
-* terms of the GNU General Public License as published by the Free Software
-* Foundation, GNU version 3. This project is distributed in the hope that it
-* will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-* Public License for more details.
-*
-* You should have received a copy of the GNU General Public License along with
-* this project. If not, see .
-*
-* For any further details and any questions please contact us under
-* contact@nymea.io or see our FAQ/Licensing Information on
-* https://nymea.io/license/faq
-*
-* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-#ifndef CLOUDTRANSPORT_H
-#define CLOUDTRANSPORT_H
-
-#include "nymeatransportinterface.h"
-
-#include
-#include
-
-class AWSClient;
-namespace remoteproxyclient {
-class RemoteProxyConnection;
-}
-
-class CloudTransportFactory: public NymeaTransportInterfaceFactory
-{
-public:
- CloudTransportFactory();
- NymeaTransportInterface* createTransport(QObject *parent = nullptr) const override;
- QStringList supportedSchemes() const override;
-};
-
-class CloudTransport : public NymeaTransportInterface
-{
- Q_OBJECT
-public:
- explicit CloudTransport(AWSClient *awsClient, QObject *parent = nullptr);
-
- bool connect(const QUrl &url) override;
- QUrl url() const override;
- void disconnect() override;
- ConnectionState connectionState() const override;
- void sendData(const QByteArray &data) override;
-
- void ignoreSslErrors(const QList &errors) override;
-private:
- QUrl m_url;
- AWSClient *m_awsClient = nullptr;
- remoteproxyclient::RemoteProxyConnection *m_remoteproxyConnection = nullptr;
- QString m_nonce;
-};
-
-#endif // CLOUDTRANSPORT_H
diff --git a/libnymea-app/connection/discovery/nymeadiscovery.cpp b/libnymea-app/connection/discovery/nymeadiscovery.cpp
index 677631b1..0c31070d 100644
--- a/libnymea-app/connection/discovery/nymeadiscovery.cpp
+++ b/libnymea-app/connection/discovery/nymeadiscovery.cpp
@@ -32,7 +32,6 @@
#include "upnpdiscovery.h"
#include "zeroconfdiscovery.h"
#include "bluetoothservicediscovery.h"
-#include "connection/awsclient.h"
#include "../nymeahost.h"
#include
@@ -50,14 +49,6 @@ NymeaDiscovery::NymeaDiscovery(QObject *parent) : QObject(parent)
m_nymeaHosts = new NymeaHosts(this);
loadFromDisk();
-
- m_cloudPollTimer.setInterval(5000);
- connect(&m_cloudPollTimer, &QTimer::timeout, this, [this](){
- if (m_awsClient && m_awsClient->isLoggedIn()) {
- m_awsClient->fetchDevices();
- }
- });
-
}
NymeaDiscovery::~NymeaDiscovery()
@@ -98,12 +89,6 @@ void NymeaDiscovery::setDiscovering(bool discovering)
m_bluetooth->discover();
}
- // start polling cloud
- m_cloudPollTimer.start();
- // If we're logged in, poll right away
- if (m_awsClient && m_awsClient->isLoggedIn()) {
- m_awsClient->fetchDevices();
- }
} else {
if (m_upnp) {
@@ -113,8 +98,6 @@ void NymeaDiscovery::setDiscovering(bool discovering)
if (m_bluetooth) {
m_bluetooth->stopDiscovery();
}
-
- m_cloudPollTimer.stop();
}
emit discoveringChanged();
@@ -125,23 +108,6 @@ NymeaHosts *NymeaDiscovery::nymeaHosts() const
return m_nymeaHosts;
}
-AWSClient *NymeaDiscovery::awsClient() const
-{
- return m_awsClient;
-}
-
-void NymeaDiscovery::setAwsClient(AWSClient *awsClient)
-{
- if (m_awsClient != awsClient) {
- m_awsClient = awsClient;
- emit awsClientChanged();
- }
-
- if (m_awsClient) {
- connect(m_awsClient, &AWSClient::devicesFetched, this, &NymeaDiscovery::syncCloudDevices);
- }
-}
-
void NymeaDiscovery::cacheHost(NymeaHost *host)
{
QSettings settings;
@@ -231,52 +197,6 @@ void NymeaDiscovery::setUpnpDiscoveryEnabled(bool upnpDiscoveryEnabled)
}
}
-void NymeaDiscovery::syncCloudDevices()
-{
- for (int i = 0; i < m_awsClient->awsDevices()->rowCount(); i++) {
- AWSDevice *d = m_awsClient->awsDevices()->get(i);
- NymeaHost *host = m_nymeaHosts->find(d->id());
- bool alreayAdded = host != nullptr;
- if (!alreayAdded) {
- host = new NymeaHost();
- host->setUuid(d->id());
- }
- host->setName(d->name());
- QUrl url;
- url.setScheme("cloud");
- url.setHost(d->id());
- Connection *conn = host->connections()->find(url);
- if (!conn) {
- conn = new Connection(url, Connection::BearerTypeCloud, true, d->id());
- qCDebug(dcDiscovery) << "Adding new connection to host:" << host->name() << conn->url().toString();
- host->connections()->addConnection(conn);
- }
- conn->setOnline(d->online());
- if (!alreayAdded) {
- qCDebug(dcDiscovery) << "Adding new host:" << d->name() << d->id();
- m_nymeaHosts->addHost(host);
- }
- }
-
- QList hostsToRemove;
- for (int i = 0; i < m_nymeaHosts->rowCount(); i++) {
- NymeaHost *host = m_nymeaHosts->get(i);
- for (int j = 0; j < host->connections()->rowCount(); j++) {
- if (host->connections()->get(j)->bearerType() == Connection::BearerTypeCloud) {
- if (m_awsClient->awsDevices()->getDevice(host->uuid().toString()) == nullptr) {
- host->connections()->removeConnection(j);
- break;
- }
- }
- }
- if (host->connections()->rowCount() == 0) {
- hostsToRemove.append(host);
- }
- }
- while (!hostsToRemove.isEmpty()) {
- m_nymeaHosts->removeHost(hostsToRemove.takeFirst());
- }
-}
void NymeaDiscovery::loadFromDisk()
{
diff --git a/libnymea-app/connection/discovery/nymeadiscovery.h b/libnymea-app/connection/discovery/nymeadiscovery.h
index c4aa4a9c..47f42021 100644
--- a/libnymea-app/connection/discovery/nymeadiscovery.h
+++ b/libnymea-app/connection/discovery/nymeadiscovery.h
@@ -35,7 +35,6 @@
#include
#include
-#include "connection/awsclient.h"
#include "connection/nymeahost.h"
class NymeaHosts;
@@ -52,8 +51,6 @@ class NymeaDiscovery : public QObject
Q_PROPERTY(bool zeroconfDiscoveryEnabled READ zeroconfDiscoveryEnable WRITE setZeroconfDiscoveryEnabled NOTIFY zeroconfDiscoveryEnabledChanged)
Q_PROPERTY(bool upnpDiscoveryEnabled READ upnpDiscoveryEnabled WRITE setUpnpDiscoveryEnabled NOTIFY upnpDiscoveryEnabledChanged)
- Q_PROPERTY(AWSClient* awsClient READ awsClient WRITE setAwsClient NOTIFY awsClientChanged)
-
Q_PROPERTY(NymeaHosts* nymeaHosts READ nymeaHosts CONSTANT)
public:
@@ -65,9 +62,6 @@ public:
NymeaHosts *nymeaHosts() const;
- AWSClient* awsClient() const;
- void setAwsClient(AWSClient *awsClient);
-
Q_INVOKABLE void cacheHost(NymeaHost* host);
bool zeroconfDiscoveryEnable() const;
@@ -81,7 +75,6 @@ public slots:
signals:
void discoveringChanged();
- void awsClientChanged();
void serverUuidResolved(const QUuid &uuid, const QString &url);
@@ -90,8 +83,6 @@ signals:
void upnpDiscoveryEnabledChanged(bool upnpDiscoveryEnabled);
private slots:
- void syncCloudDevices();
-
void loadFromDisk();
void updateActiveBearers();
@@ -100,14 +91,10 @@ private:
bool m_discovering = false;
NymeaHosts *m_nymeaHosts = nullptr;
- AWSClient *m_awsClient = nullptr;
-
UpnpDiscovery *m_upnp = nullptr;
ZeroconfDiscovery *m_zeroConf = nullptr;
BluetoothServiceDiscovery *m_bluetooth = nullptr;
- QTimer m_cloudPollTimer;
-
QList m_pendingHostResolutions;
bool m_zeroconfDiscoveryEnabled = true;
diff --git a/libnymea-app/connection/sigv4utils.cpp b/libnymea-app/connection/sigv4utils.cpp
deleted file mode 100644
index 04d5d91c..00000000
--- a/libnymea-app/connection/sigv4utils.cpp
+++ /dev/null
@@ -1,177 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-*
-* Copyright 2013 - 2020, nymea GmbH
-* Contact: contact@nymea.io
-*
-* This file is part of nymea.
-* This project including source code and documentation is protected by
-* copyright law, and remains the property of nymea GmbH. All rights, including
-* reproduction, publication, editing and translation, are reserved. The use of
-* this project is subject to the terms of a license agreement to be concluded
-* with nymea GmbH in accordance with the terms of use of nymea GmbH, available
-* under https://nymea.io/license
-*
-* GNU General Public License Usage
-* Alternatively, this project may be redistributed and/or modified under the
-* terms of the GNU General Public License as published by the Free Software
-* Foundation, GNU version 3. This project is distributed in the hope that it
-* will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-* Public License for more details.
-*
-* You should have received a copy of the GNU General Public License along with
-* this project. If not, see .
-*
-* For any further details and any questions please contact us under
-* contact@nymea.io or see our FAQ/Licensing Information on
-* https://nymea.io/license/faq
-*
-* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-#include "sigv4utils.h"
-
-#include
-#include
-#include
-#include
-#include
-#include
-
-SigV4Utils::SigV4Utils()
-{
-
-}
-
-void SigV4Utils::signRequest(QNetworkAccessManager::Operation operation, QNetworkRequest &request, const QString ®ion, const QString &service, const QByteArray &accessKeyId, const QByteArray &secretAccessKey, const QByteArray &sessionToken, const QByteArray &payload)
-{
- QByteArray dateTime;
- if (request.rawHeaderList().contains("X-Amz-Date")) {
- dateTime = request.rawHeader("X-AMZ-Date");
- } else {
- dateTime = SigV4Utils::getCurrentDateTime();
- request.setRawHeader("X-Amz-Date", dateTime);
- }
-
- if (!sessionToken.isEmpty()) {
- request.setRawHeader("x-amz-security-token", sessionToken);
- }
-
- QByteArray canonicalRequest = SigV4Utils::getCanonicalRequest(operation, request, payload);
-// qDebug() << "canonical request:" << qUtf8Printable(canonicalRequest);
- QByteArray stringToSign = SigV4Utils::getStringToSign(canonicalRequest, dateTime, region.toUtf8(), service.toUtf8());
-// qDebug() << "string to sign:" << stringToSign;
- QByteArray signature = SigV4Utils::getSignature(stringToSign, secretAccessKey, dateTime, region, service);
-// qDebug() << "signature:" << signature;
- QByteArray authorizeHeader = SigV4Utils::getAuthorizationHeader(accessKeyId, dateTime, region, service, request, signature);
-
- request.setRawHeader("Authorization", authorizeHeader);
-}
-
-QByteArray SigV4Utils::getCurrentDateTime()
-{
- return QDateTime::currentDateTime().toUTC().toString("yyyyMMddThhmmssZ").toUtf8();
-}
-
-QByteArray SigV4Utils::getCanonicalQueryString(const QNetworkRequest &request, const QByteArray &accessKeyId, const QByteArray &secretAccessKey, const QByteArray &sessionToken, const QByteArray ®ion, const QByteArray &service, const QByteArray &payload)
-{
- QByteArray algorithm = "AWS4-HMAC-SHA256";
- QByteArray dateTime = getCurrentDateTime();
- QByteArray credentialScope = getCredentialScope(dateTime, region, service);
-
- QByteArray canonicalQueryString;
- canonicalQueryString += "X-Amz-Algorithm=AWS4-HMAC-SHA256";
- canonicalQueryString += "&X-Amz-Credential=" + QByteArray(accessKeyId + '/' + credentialScope).toPercentEncoding();
- canonicalQueryString += "&X-Amz-Date=" + dateTime;
- if (request.rawHeaderList().count() > 0){
- canonicalQueryString += "&X-Amz-SignedHeaders=" + request.rawHeaderList().join(';').toLower();
- }
-
- QByteArray canonicalRequest = getCanonicalRequest(QNetworkAccessManager::GetOperation, request, payload);
-
- QByteArray stringToSign = getStringToSign(canonicalRequest, dateTime, region, service);
- QByteArray signature = getSignature(stringToSign, secretAccessKey, dateTime, region, service);
-
- canonicalQueryString += "&X-Amz-Signature=" + signature;
-
- if (!sessionToken.isEmpty()) {
- canonicalQueryString += "&X-Amz-Security-Token=" + sessionToken.toPercentEncoding();
- }
-
- return canonicalQueryString;
-}
-
-QByteArray SigV4Utils::getSignatureKey(const QByteArray &key, const QByteArray &date, const QByteArray ®ion, const QByteArray &service)
-{
- QCryptographicHash::Algorithm hashAlgorithm = QCryptographicHash::Sha256;
- return QMessageAuthenticationCode::hash("aws4_request",
- QMessageAuthenticationCode::hash(service,
- QMessageAuthenticationCode::hash(region,
- QMessageAuthenticationCode::hash(date, "AWS4"+key,
- hashAlgorithm), hashAlgorithm), hashAlgorithm), hashAlgorithm);
-}
-
-QByteArray SigV4Utils::getCanonicalRequest(QNetworkAccessManager::Operation operation, const QNetworkRequest &request, const QByteArray &payload)
-{
- QByteArray canonicalRequest;
-
- QByteArray method;
- switch (operation) {
- case QNetworkAccessManager::GetOperation:
- method = "GET";
- break;
- case QNetworkAccessManager::PostOperation:
- method = "POST";
- break;
- default:
- Q_ASSERT_X(false, "Network operation not implemented", "SigV4Utils");
- }
- QByteArray uri = request.url().path(QUrl::FullyEncoded).toUtf8();
- QUrlQuery query(request.url());
- QList > queryItems = query.queryItems();
- QStringList queryItemStrings;
- for (int i = 0; i < queryItems.count(); i++) {
- QPair queryItem = queryItems.at(i);
- queryItemStrings.append(queryItem.first + '=' + queryItem.second);
- }
- queryItemStrings.sort(Qt::CaseInsensitive);
-
- QByteArray canonicalQueryString = queryItemStrings.join('&').toUtf8();
-
- QByteArray canonicalHeaders;
- foreach(const QByteArray &headerName, request.rawHeaderList()) {
- canonicalHeaders += headerName.toLower() + ':' + request.rawHeader(headerName) + '\n';
- }
-
- QByteArray payloadHash = QCryptographicHash::hash(payload, QCryptographicHash::Sha256).toHex();
-
- canonicalRequest = method + '\n' + uri + '\n' + canonicalQueryString + '\n' + canonicalHeaders + '\n' + request.rawHeaderList().join(';').toLower() + '\n' + payloadHash;
- return canonicalRequest;
-}
-
-QByteArray SigV4Utils::getCredentialScope(const QByteArray &dateTime, const QByteArray ®ion, const QByteArray &service)
-{
- QByteArray credentialScope = dateTime.left(8) + '/' + region + '/' + service + "/aws4_request";
- return credentialScope;
-}
-
-QByteArray SigV4Utils::getStringToSign(const QByteArray &canonicalRequest, const QByteArray &dateTime, const QByteArray ®ion, const QByteArray &service)
-{
- QByteArray algorithm = "AWS4-HMAC-SHA256";
- QByteArray credentialScope = getCredentialScope(dateTime, region, service);
-
- QByteArray stringToSign = algorithm + '\n' + dateTime + '\n' + credentialScope + '\n' + QCryptographicHash::hash(canonicalRequest, QCryptographicHash::Sha256).toHex();
- return stringToSign;
-}
-
-QByteArray SigV4Utils::getSignature(const QByteArray &stringToSign, const QByteArray &secretAccessKey, const QByteArray &dateTime, const QString ®ion, const QString &service)
-{
- QByteArray signingKey = getSignatureKey(secretAccessKey, dateTime.left(8), region.toUtf8(), service.toUtf8());
- QByteArray signature = QMessageAuthenticationCode::hash(stringToSign, signingKey, QCryptographicHash::Sha256).toHex();
- return signature;
-}
-
-QByteArray SigV4Utils::getAuthorizationHeader(const QByteArray &accessKeyId, const QByteArray &dateTime, const QString ®ion, const QString &service, const QNetworkRequest &request, const QByteArray &signature)
-{
- QByteArray authHeader = "AWS4-HMAC-SHA256 Credential=" + accessKeyId + '/' + dateTime.left(8) + '/' + region.toUtf8() + '/' + service.toUtf8() + '/' + "aws4_request, SignedHeaders=" + request.rawHeaderList().join(';').toLower() + ", Signature=" + signature;
- return authHeader;
-}
diff --git a/libnymea-app/connection/sigv4utils.h b/libnymea-app/connection/sigv4utils.h
deleted file mode 100644
index c0198638..00000000
--- a/libnymea-app/connection/sigv4utils.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-*
-* Copyright 2013 - 2020, nymea GmbH
-* Contact: contact@nymea.io
-*
-* This file is part of nymea.
-* This project including source code and documentation is protected by
-* copyright law, and remains the property of nymea GmbH. All rights, including
-* reproduction, publication, editing and translation, are reserved. The use of
-* this project is subject to the terms of a license agreement to be concluded
-* with nymea GmbH in accordance with the terms of use of nymea GmbH, available
-* under https://nymea.io/license
-*
-* GNU General Public License Usage
-* Alternatively, this project may be redistributed and/or modified under the
-* terms of the GNU General Public License as published by the Free Software
-* Foundation, GNU version 3. This project is distributed in the hope that it
-* will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-* Public License for more details.
-*
-* You should have received a copy of the GNU General Public License along with
-* this project. If not, see .
-*
-* For any further details and any questions please contact us under
-* contact@nymea.io or see our FAQ/Licensing Information on
-* https://nymea.io/license/faq
-*
-* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-#ifndef SIGV4UTILS_H
-#define SIGV4UTILS_H
-
-#include
-#include
-#include
-
-class SigV4Utils
-{
-public:
- SigV4Utils();
-
- // Signes a request by adding the "X-AMZ-Date" (if not present) and "X-AMZ-Signature" headers
- static void signRequest(QNetworkAccessManager::Operation operation, QNetworkRequest &request, const QString ®ion, const QString &service, const QByteArray &accessKeyId, const QByteArray &secretAccessKey, const QByteArray &sessionToken = QByteArray(), const QByteArray &payload = QByteArray());
-
-
- static QByteArray getCurrentDateTime();
-
-
- static QByteArray getCanonicalQueryString(const QNetworkRequest &request, const QByteArray &accessKeyId, const QByteArray &secretAccessKey, const QByteArray &sessionToken, const QByteArray ®ion, const QByteArray &service, const QByteArray &payload);
- static QByteArray getCanonicalRequest(QNetworkAccessManager::Operation operation, const QNetworkRequest &request, const QByteArray &payload);
- static QByteArray getCanonicalHeaders(const QNetworkRequest &request);
- static QByteArray getCredentialScope(const QByteArray &dateTime, const QByteArray ®ion, const QByteArray &service);
- static QByteArray getStringToSign(const QByteArray &canonicalRequest, const QByteArray &dateTime, const QByteArray ®ion, const QByteArray &service);
- static QByteArray getSignatureKey(const QByteArray &key, const QByteArray &date, const QByteArray ®ion, const QByteArray &service);
- static QByteArray getSignature(const QByteArray &stringToSign, const QByteArray &secretAccessKey, const QByteArray &dateTime, const QString ®ion, const QString &service);
- static QByteArray getAuthorizationHeader(const QByteArray &accessKeyId, const QByteArray &dateTime, const QString ®ion, const QString &service, const QNetworkRequest &request, const QByteArray &signature);
-
-};
-
-#endif // SIGV4UTILS_H
diff --git a/libnymea-app/engine.cpp b/libnymea-app/engine.cpp
index db5f73c1..41fe92bc 100644
--- a/libnymea-app/engine.cpp
+++ b/libnymea-app/engine.cpp
@@ -35,7 +35,6 @@
#include "logmanager.h"
#include "tagsmanager.h"
#include "configuration/nymeaconfiguration.h"
-#include "connection/awsclient.h"
#include "system/systemcontroller.h"
#include "configuration/networkmanager.h"
@@ -56,19 +55,7 @@ Engine::Engine(QObject *parent) :
connect(m_thingManager, &ThingManager::fetchingDataChanged, this, &Engine::onThingManagerFetchingChanged);
connect(m_jsonRpcClient, &JsonRpcClient::connectedChanged, this, [this]() {
- qDebug() << "JSONRpc connected changed:" << m_jsonRpcClient->connected() << "AWS status:" << AWSClient::instance()->awsDevices()->rowCount();
- if (m_jsonRpcClient->connected() && m_jsonRpcClient->cloudConnectionState() == JsonRpcClient::CloudConnectionStateConnected) {
- if (AWSClient::instance()->awsDevices()->getDevice(m_jsonRpcClient->serverUuid()) == nullptr) {
- m_jsonRpcClient->setupRemoteAccess(AWSClient::instance()->idToken(), AWSClient::instance()->userId());
- }
- }
- });
- connect(m_jsonRpcClient, &JsonRpcClient::cloudConnectionStateChanged, this, [this](){
- if (m_jsonRpcClient->connected() && m_jsonRpcClient->cloudConnectionState() == JsonRpcClient::CloudConnectionStateConnected) {
- if (AWSClient::instance()->awsDevices()->getDevice(m_jsonRpcClient->serverUuid()) == nullptr) {
- m_jsonRpcClient->setupRemoteAccess(AWSClient::instance()->idToken(), AWSClient::instance()->userId());
- }
- }
+ qDebug() << "JSONRpc connected changed:" << m_jsonRpcClient->connected();
});
}
@@ -112,22 +99,6 @@ SystemController *Engine::systemController() const
return m_systemController;
}
-void Engine::deployCertificate()
-{
- if (!m_jsonRpcClient->connected()) {
- qWarning() << "JSONRPC not connected. Cannot deploy certificate";
- return;
- }
- if (!AWSClient::instance()->isLoggedIn()) {
- qWarning() << "Not logged in at AWS. Cannot deploy certificate";
- return;
- }
- AWSClient::instance()->fetchCertificate(m_jsonRpcClient->serverUuid(), [this](const QByteArray &rootCA, const QByteArray &certificate, const QByteArray &publicKey, const QByteArray &privateKey, const QString &endpoint){
- qDebug() << "Certificate received" << certificate << publicKey << privateKey;
- m_jsonRpcClient->deployCertificate(rootCA, certificate, publicKey, privateKey, endpoint);
- });
-}
-
void Engine::onConnectedChanged()
{
qDebug() << "Engine: connected changed:" << m_jsonRpcClient->connected();
diff --git a/libnymea-app/engine.h b/libnymea-app/engine.h
index 7fdb9f78..dc28ad00 100644
--- a/libnymea-app/engine.h
+++ b/libnymea-app/engine.h
@@ -68,8 +68,6 @@ public:
NymeaConfiguration *nymeaConfiguration() const;
SystemController *systemController() const;
- Q_INVOKABLE void deployCertificate();
-
private:
JsonRpcClient *m_jsonRpcClient;
ThingManager *m_thingManager;
diff --git a/libnymea-app/jsonrpc/jsonrpcclient.cpp b/libnymea-app/jsonrpc/jsonrpcclient.cpp
index 3dc9375d..d9f093c2 100644
--- a/libnymea-app/jsonrpc/jsonrpcclient.cpp
+++ b/libnymea-app/jsonrpc/jsonrpcclient.cpp
@@ -36,7 +36,6 @@
#include "connection/tcpsockettransport.h"
#include "connection/websockettransport.h"
#include "connection/bluetoothtransport.h"
-#include "connection/cloudtransport.h"
#include "connection/tunnelproxytransport.h"
#include
@@ -61,7 +60,6 @@ JsonRpcClient::JsonRpcClient(QObject *parent) :
m_connection->registerTransport(new TcpSocketTransportFactory());
m_connection->registerTransport(new WebsocketTransportFactory());
m_connection->registerTransport(new BluetoothTransportFactoy());
- m_connection->registerTransport(new CloudTransportFactory());
m_connection->registerTransport(new TunnelProxyTransportFactory());
connect(m_connection, &NymeaConnection::availableBearerTypesChanged, this, &JsonRpcClient::availableBearerTypesChanged);
@@ -174,13 +172,6 @@ bool JsonRpcClient::tokenExists(const QString &serverUuid) const
return settings.contains(QUuid(serverUuid).toString());
}
-void JsonRpcClient::getCloudConnectionStatus()
-{
- JsonRpcReply *reply = createReply("JSONRPC.IsCloudConnected", QVariantMap(), this, "isCloudConnectedReply");
- m_replies.insert(reply->commandId(), reply);
- sendRequest(reply->requestMap());
-}
-
void JsonRpcClient::setNotificationsEnabledResponse(int commandId, const QVariantMap ¶ms)
{
qCDebug(dcJsonRpc()) << "Notification configuration response:" << commandId << qUtf8Printable(QJsonDocument::fromVariant(params).toJson());
@@ -224,34 +215,9 @@ void JsonRpcClient::notificationReceived(const QVariantMap &data)
return;
}
- if (data.value("notification").toString() == "JSONRPC.CloudConnectedChanged") {
- QMetaEnum connectionStateEnum = QMetaEnum::fromType();
- m_cloudConnectionState = static_cast(connectionStateEnum.keyToValue(data.value("params").toMap().value("connectionState").toByteArray().data()));
- emit cloudConnectionStateChanged();
- return;
- }
-
qCWarning(dcJsonRpc()) << "JsonRpcClient: Unhandled notification received" << data;
}
-void JsonRpcClient::isCloudConnectedReply(int /*commandId*/, const QVariantMap &data)
-{
- // qDebug() << "Cloud is connected" << data;
- QMetaEnum connectionStateEnum = QMetaEnum::fromType();
- m_cloudConnectionState = static_cast(connectionStateEnum.keyToValue(data.value("connectionState").toByteArray().data()));
- emit cloudConnectionStateChanged();
-}
-
-void JsonRpcClient::setupRemoteAccessReply(int commandId, const QVariantMap &data)
-{
- qDebug() << "Setup Remote Access reply" << commandId << data;
-}
-
-void JsonRpcClient::deployCertificateReply(int commandId, const QVariantMap &data)
-{
- qDebug() << "deploy certificate reply:" << commandId << data;
-}
-
void JsonRpcClient::getVersionsReply(int /*commandId*/, const QVariantMap &data)
{
m_serverQtVersion = data.value("qtVersion").toString();
@@ -317,23 +283,6 @@ bool JsonRpcClient::authenticated() const
return m_authenticated;
}
-JsonRpcClient::CloudConnectionState JsonRpcClient::cloudConnectionState() const
-{
- return m_cloudConnectionState;
-}
-
-void JsonRpcClient::deployCertificate(const QByteArray &rootCA, const QByteArray &certificate, const QByteArray &publicKey, const QByteArray &privateKey, const QString &endpoint)
-{
- QVariantMap params;
- params.insert("rootCA", rootCA);
- params.insert("certificatePEM", certificate);
- params.insert("publicKey", publicKey);
- params.insert("privateKey", privateKey);
- params.insert("endpoint", endpoint);
-
- sendCommand("JSONRPC.SetupCloudConnection", params, this, "deployCertificateReply");
-}
-
QHash JsonRpcClient::cacheHashes() const
{
return m_cacheHashes;
@@ -424,15 +373,6 @@ int JsonRpcClient::requestPushButtonAuth(const QString &deviceName)
return reply->commandId();
}
-int JsonRpcClient::setupRemoteAccess(const QString &idToken, const QString &userId)
-{
- qDebug() << "Calling SetupRemoteAccess";
- QVariantMap params;
- params.insert("idToken", idToken);
- params.insert("userId", userId);
- return sendCommand("JSONRPC.SetupRemoteAccess", params, this, "setupRemoteAccessReply");
-}
-
bool JsonRpcClient::ensureServerVersion(const QString &jsonRpcVersion)
{
return QVersionNumber(m_jsonRpcVersion) >= QVersionNumber::fromString(jsonRpcVersion);
@@ -731,7 +671,7 @@ void JsonRpcClient::helloReply(int /*commandId*/, const QVariantMap ¶ms)
}
QVersionNumber minimumRequiredVersion = QVersionNumber(5, 0);
- QVersionNumber maximumMajorVersion = QVersionNumber(6);
+ QVersionNumber maximumMajorVersion = QVersionNumber(7);
if (m_jsonRpcVersion < minimumRequiredVersion) {
qCWarning(dcJsonRpc()) << "Nymea core doesn't support minimum required version. Required:" << minimumRequiredVersion << "Found:" << m_jsonRpcVersion;
emit invalidMinimumVersion(m_jsonRpcVersion.toString(), minimumRequiredVersion.toString());
@@ -829,8 +769,6 @@ void JsonRpcClient::helloReply(int /*commandId*/, const QVariantMap ¶ms)
}
setNotificationsEnabled();
- getCloudConnectionStatus();
-
}
JsonRpcReply::JsonRpcReply(int commandId, QString nameSpace, QString method, QVariantMap params, QPointer caller, const QString &callback):
diff --git a/libnymea-app/jsonrpc/jsonrpcclient.h b/libnymea-app/jsonrpc/jsonrpcclient.h
index 035f459d..74ffbfe7 100644
--- a/libnymea-app/jsonrpc/jsonrpcclient.h
+++ b/libnymea-app/jsonrpc/jsonrpcclient.h
@@ -55,7 +55,6 @@ class JsonRpcClient : public QObject
Q_PROPERTY(bool authenticationRequired READ authenticationRequired NOTIFY authenticationRequiredChanged)
Q_PROPERTY(bool pushButtonAuthAvailable READ pushButtonAuthAvailable NOTIFY pushButtonAuthAvailableChanged)
Q_PROPERTY(bool authenticated READ authenticated NOTIFY authenticatedChanged)
- Q_PROPERTY(CloudConnectionState cloudConnectionState READ cloudConnectionState NOTIFY cloudConnectionStateChanged)
Q_PROPERTY(QString serverVersion READ serverVersion NOTIFY handshakeReceived)
Q_PROPERTY(QString jsonRpcVersion READ jsonRpcVersion NOTIFY handshakeReceived)
Q_PROPERTY(QString serverUuid READ serverUuid NOTIFY handshakeReceived)
@@ -67,14 +66,6 @@ class JsonRpcClient : public QObject
Q_PROPERTY(UserInfo::PermissionScopes permissions READ permissions NOTIFY permissionsChanged)
public:
- enum CloudConnectionState {
- CloudConnectionStateDisabled,
- CloudConnectionStateUnconfigured,
- CloudConnectionStateConnecting,
- CloudConnectionStateConnected
- };
- Q_ENUM(CloudConnectionState)
-
explicit JsonRpcClient(QObject *parent = nullptr);
void registerNotificationHandler(QObject *handler, const QString &nameSpace, const QString &method);
@@ -93,8 +84,6 @@ public:
bool authenticationRequired() const;
bool pushButtonAuthAvailable() const;
bool authenticated() const;
- CloudConnectionState cloudConnectionState() const;
- void deployCertificate(const QByteArray &rootCA, const QByteArray &certificate, const QByteArray &publicKey, const QByteArray &privateKey, const QString &endpoint);
QHash cacheHashes() const;
// Note: This does not reflect the actual permission scopes of the user but is translated to effective permissions
// That, is, if the user has the admin permission, all of the other scopes will be set too even if they might not be explicitly set
@@ -119,7 +108,6 @@ public:
Q_INVOKABLE int createUser(const QString &username, const QString &password, const QString &displayName, const QString &email);
Q_INVOKABLE int authenticate(const QString &username, const QString &password, const QString &deviceName);
Q_INVOKABLE int requestPushButtonAuth(const QString &deviceName);
- Q_INVOKABLE int setupRemoteAccess(const QString &idToken, const QString &userId);
signals:
@@ -142,7 +130,6 @@ signals:
void pushButtonAuthFailed();
void createUserSucceeded();
void createUserFailed(const QString &error);
- void cloudConnectionStateChanged();
void serverQtVersionChanged();
void serverNameChanged();
void permissionsChanged();
@@ -170,7 +157,6 @@ private:
bool m_authenticationRequired = false;
bool m_pushButtonAuthAvailable = false;
bool m_authenticated = false;
- CloudConnectionState m_cloudConnectionState = CloudConnectionStateDisabled;
int m_pendingPushButtonTransaction = -1;
QString m_serverUuid;
QVersionNumber m_jsonRpcVersion;
@@ -185,7 +171,6 @@ private:
QString m_username;
void setNotificationsEnabled();
- void getCloudConnectionStatus();
// json handler
Q_INVOKABLE void processAuthenticate(int commandId, const QVariantMap &data);
@@ -194,9 +179,6 @@ private:
Q_INVOKABLE void setNotificationsEnabledResponse(int commandId, const QVariantMap ¶ms);
Q_INVOKABLE void notificationReceived(const QVariantMap &data);
- Q_INVOKABLE void isCloudConnectedReply(int commandId, const QVariantMap &data);
- Q_INVOKABLE void setupRemoteAccessReply(int commandId, const QVariantMap &data);
- Q_INVOKABLE void deployCertificateReply(int commandId, const QVariantMap &data);
Q_INVOKABLE void getVersionsReply(int commandId, const QVariantMap &data);
void sendRequest(const QVariantMap &request);
diff --git a/libnymea-app/libnymea-app-core.h b/libnymea-app/libnymea-app-core.h
index c6782827..c79bc980 100644
--- a/libnymea-app/libnymea-app-core.h
+++ b/libnymea-app/libnymea-app-core.h
@@ -93,7 +93,6 @@
#include "ruletemplates/statedescriptortemplate.h"
#include "ruletemplates/ruleactiontemplate.h"
#include "ruletemplates/ruleactionparamtemplate.h"
-#include "connection/awsclient.h"
#include "models/thingmodel.h"
#include "models/sortfilterproxymodel.h"
#include "system/systemcontroller.h"
@@ -156,14 +155,6 @@ static QObject* interfacesModel_provider(QQmlEngine *engine, QJSEngine *scriptEn
return new Interfaces();
}
-static QObject* awsClientProvider(QQmlEngine *engine, QJSEngine *scriptEngine)
-{
- Q_UNUSED(engine)
- Q_UNUSED(scriptEngine)
-
- return AWSClient::instance();
-}
-
static QObject* typesProvider(QQmlEngine *engine, QJSEngine *scriptEngine)
{
Q_UNUSED(engine)
@@ -297,9 +288,6 @@ void registerQmlTypes() {
qmlRegisterUncreatableType(uri, 1, 0, "WirelessAccessPoints", "Can't create this in QML. Get it from the Engine instance.");
qmlRegisterType(uri, 1, 0, "WirelessAccessPointsProxy");
- qmlRegisterSingletonType(uri, 1, 0, "AWSClient", awsClientProvider);
- qmlRegisterUncreatableType(uri, 1, 0, "AWSDevice", "Can't create this in QML. Get it from AWSClient");
-
qmlRegisterType(uri, 1, 0, "RuleTemplates");
qmlRegisterType(uri, 1, 0, "RuleTemplatesFilterModel");
qmlRegisterUncreatableType(uri, 1, 0, "RuleTemplate", "Get them from RuleTemplates");
diff --git a/libnymea-app/libnymea-app.pri b/libnymea-app/libnymea-app.pri
index 02fd0c2b..220480ca 100644
--- a/libnymea-app/libnymea-app.pri
+++ b/libnymea-app/libnymea-app.pri
@@ -124,7 +124,6 @@ SOURCES += \
$${PWD}/connection/websockettransport.cpp \
$${PWD}/connection/tcpsockettransport.cpp \
$${PWD}/connection/bluetoothtransport.cpp \
- $${PWD}/connection/awsclient.cpp \
$${PWD}/connection/discovery/nymeadiscovery.cpp \
$${PWD}/connection/discovery/upnpdiscovery.cpp \
$${PWD}/connection/discovery/zeroconfdiscovery.cpp \
@@ -165,8 +164,6 @@ SOURCES += \
$${PWD}/ruletemplates/ruleactiontemplate.cpp \
$${PWD}/ruletemplates/stateevaluatortemplate.cpp \
$${PWD}/ruletemplates/statedescriptortemplate.cpp \
- $${PWD}/connection/cloudtransport.cpp \
- $${PWD}/connection/sigv4utils.cpp \
$${PWD}/ruletemplates/ruleactionparamtemplate.cpp \
$${PWD}/configuration/serverconfiguration.cpp \
$${PWD}/configuration/serverconfigurations.cpp \
@@ -290,8 +287,6 @@ HEADERS += \
$${PWD}/connection/websockettransport.h \
$${PWD}/connection/tcpsockettransport.h \
$${PWD}/connection/bluetoothtransport.h \
- $${PWD}/connection/awsclient.h \
- $${PWD}/connection/sigv4utils.h \
$${PWD}/connection/discovery/nymeadiscovery.h \
$${PWD}/connection/discovery/upnpdiscovery.h \
$${PWD}/connection/discovery/zeroconfdiscovery.h \
@@ -333,7 +328,6 @@ HEADERS += \
$${PWD}/ruletemplates/ruleactiontemplate.h \
$${PWD}/ruletemplates/stateevaluatortemplate.h \
$${PWD}/ruletemplates/statedescriptortemplate.h \
- $${PWD}/connection/cloudtransport.h \
$${PWD}/ruletemplates/ruleactionparamtemplate.h \
$${PWD}/configuration/serverconfiguration.h \
$${PWD}/configuration/serverconfigurations.h \
diff --git a/nymea-app/resources.qrc b/nymea-app/resources.qrc
index e650b9a0..3e267958 100644
--- a/nymea-app/resources.qrc
+++ b/nymea-app/resources.qrc
@@ -93,13 +93,11 @@
ui/system/PluginsPage.qml
ui/system/PluginParamsPage.qml
ui/system/AboutNymeaPage.qml
- ui/system/CloudSettingsPage.qml
ui/system/ConnectionInterfacesPage.qml
ui/system/ConnectionInterfaceDelegate.qml
ui/appsettings/AboutPage.qml
ui/appsettings/AppSettingsPage.qml
ui/appsettings/DeveloperOptionsPage.qml
- ui/appsettings/CloudLoginPage.qml
ui/fonts/Ubuntu-B.ttf
ui/fonts/Ubuntu-BI.ttf
ui/fonts/Ubuntu-C.ttf
diff --git a/nymea-app/ui/Nymea.qml b/nymea-app/ui/Nymea.qml
index d1b05506..26308795 100644
--- a/nymea-app/ui/Nymea.qml
+++ b/nymea-app/ui/Nymea.qml
@@ -100,12 +100,6 @@ ApplicationWindow {
value: settings.units === "metric" ? Types.UnitSystemMetric : Types.UnitSystemImperial
}
- Binding {
- target: AWSClient
- property: "config"
- value: "cloudEnvironment" in app ? app.cloudEnvironment : settings.cloudEnvironment
- }
-
Binding {
target: PushNotifications
property: "enabled"
@@ -141,7 +135,6 @@ ApplicationWindow {
property NymeaDiscovery nymeaDiscovery: NymeaDiscovery {
objectName: "discovery"
- awsClient: AWSClient
bluetoothDiscoveryEnabled: false// PlatformPermissions.bluetoothPermission === PlatformPermissions.PermissionStatusGranted
}
diff --git a/nymea-app/ui/appsettings/DeveloperOptionsPage.qml b/nymea-app/ui/appsettings/DeveloperOptionsPage.qml
index 958a2ad1..2ef72bb6 100644
--- a/nymea-app/ui/appsettings/DeveloperOptionsPage.qml
+++ b/nymea-app/ui/appsettings/DeveloperOptionsPage.qml
@@ -61,48 +61,4 @@ SettingsPageBase {
text: qsTr("Configure logging categories")
onClicked: pageStack.push(Qt.resolvedUrl("../appsettings/LoggingCategories.qml"))
}
-
- SettingsPageSectionHeader {
- text: qsTr("Advanced options")
- visible: settings.showHiddenOptions
- }
-
- RowLayout {
- Layout.leftMargin: app.margins; Layout.rightMargin: app.margins
- visible: settings.showHiddenOptions
-
- Label {
- Layout.fillWidth: true
- text: qsTr("Cloud environment")
- }
-
- ComboBox {
- currentIndex: model.indexOf(app.settings.cloudEnvironment)
- model: AWSClient.availableConfigs
- onActivated: {
- app.settings.cloudEnvironment = model[index];
- }
- }
- }
-
- SettingsPageSectionHeader {
- text: qsTr("nymea:cloud")
- }
-
- Label {
- Layout.fillWidth: true
- Layout.leftMargin: Style.margins
- Layout.rightMargin: Style.margins
- text: qsTr("Note: nymea:cloud is deprecated and will be removed in a future version.")
- wrapMode: Text.WordWrap
- }
-
- NymeaItemDelegate {
- Layout.fillWidth: true
- text: qsTr("Cloud login")
- subText: qsTr("Log into %1:cloud and manage connected %1 systems").arg(Configuration.systemName)
- iconName: "../images/connections/cloud.svg"
- onClicked: pageStack.push(Qt.resolvedUrl("CloudLoginPage.qml"))
- }
-
}
diff --git a/nymea-app/ui/system/AdvancedConnectionInterfacesPage.qml b/nymea-app/ui/system/AdvancedConnectionInterfacesPage.qml
index cd80653d..77dc9005 100644
--- a/nymea-app/ui/system/AdvancedConnectionInterfacesPage.qml
+++ b/nymea-app/ui/system/AdvancedConnectionInterfacesPage.qml
@@ -186,27 +186,4 @@ SettingsPageBase {
popup.open()
}
}
-
- SettingsPageSectionHeader {
- text: qsTr("nymea:cloud")
- }
-
- Label {
- Layout.fillWidth: true
- Layout.leftMargin: Style.margins
- Layout.rightMargin: Style.margins
- text: qsTr("Note: nymea:cloud based remote connection is deprecated and will be removed in a future version.")
- wrapMode: Text.WordWrap
- }
-
- NymeaItemDelegate {
- Layout.fillWidth: true
- iconName: "../images/connections/cloud.svg"
- text: qsTr("Cloud")
- subText: qsTr("Connect this %1 system to %1:cloud").arg(Configuration.systemName)
- visible: NymeaUtils.hasPermissionScope(engine.jsonRpcClient.permissions, UserInfo.PermissionScopeAdmin)
- onClicked: pageStack.push(Qt.resolvedUrl("CloudSettingsPage.qml"))
- }
-
-
}
diff --git a/tests/tests.pro b/tests/tests.pro
index 7029fcc9..d5430750 100644
--- a/tests/tests.pro
+++ b/tests/tests.pro
@@ -1,3 +1,3 @@
TEMPLATE = subdirs
-SUBDIRS = testrunner unit
+SUBDIRS = testrunner
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-key-duplicate/get-header-key-duplicate.authz b/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-key-duplicate/get-header-key-duplicate.authz
deleted file mode 100644
index ade3ec75..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-key-duplicate/get-header-key-duplicate.authz
+++ /dev/null
@@ -1 +0,0 @@
-AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=c9d5ea9f3f72853aea855b47ea873832890dbdd183b4468f858259531a5138ea
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-key-duplicate/get-header-key-duplicate.creq b/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-key-duplicate/get-header-key-duplicate.creq
deleted file mode 100644
index fa8f49a1..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-key-duplicate/get-header-key-duplicate.creq
+++ /dev/null
@@ -1,9 +0,0 @@
-GET
-/
-
-host:example.amazonaws.com
-my-header1:value2,value2,value1
-x-amz-date:20150830T123600Z
-
-host;my-header1;x-amz-date
-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-key-duplicate/get-header-key-duplicate.req b/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-key-duplicate/get-header-key-duplicate.req
deleted file mode 100644
index 08a0364c..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-key-duplicate/get-header-key-duplicate.req
+++ /dev/null
@@ -1,6 +0,0 @@
-GET / HTTP/1.1
-Host:example.amazonaws.com
-My-Header1:value2
-My-Header1:value2
-My-Header1:value1
-X-Amz-Date:20150830T123600Z
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-key-duplicate/get-header-key-duplicate.sreq b/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-key-duplicate/get-header-key-duplicate.sreq
deleted file mode 100644
index f0166e18..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-key-duplicate/get-header-key-duplicate.sreq
+++ /dev/null
@@ -1,7 +0,0 @@
-GET / HTTP/1.1
-Host:example.amazonaws.com
-My-Header1:value2
-My-Header1:value2
-My-Header1:value1
-X-Amz-Date:20150830T123600Z
-Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=c9d5ea9f3f72853aea855b47ea873832890dbdd183b4468f858259531a5138ea
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-key-duplicate/get-header-key-duplicate.sts b/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-key-duplicate/get-header-key-duplicate.sts
deleted file mode 100644
index 48a135ec..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-key-duplicate/get-header-key-duplicate.sts
+++ /dev/null
@@ -1,4 +0,0 @@
-AWS4-HMAC-SHA256
-20150830T123600Z
-20150830/us-east-1/service/aws4_request
-dc7f04a3abfde8d472b0ab1a418b741b7c67174dad1551b4117b15527fbe966c
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-multiline/get-header-value-multiline.authz b/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-multiline/get-header-value-multiline.authz
deleted file mode 100644
index e2717bf6..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-multiline/get-header-value-multiline.authz
+++ /dev/null
@@ -1 +0,0 @@
-AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=ba17b383a53190154eb5fa66a1b836cc297cc0a3d70a5d00705980573d8ff790
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-multiline/get-header-value-multiline.creq b/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-multiline/get-header-value-multiline.creq
deleted file mode 100644
index 721a39ff..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-multiline/get-header-value-multiline.creq
+++ /dev/null
@@ -1,9 +0,0 @@
-GET
-/
-
-host:example.amazonaws.com
-my-header1:value1,value2,value3
-x-amz-date:20150830T123600Z
-
-host;my-header1;x-amz-date
-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-multiline/get-header-value-multiline.req b/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-multiline/get-header-value-multiline.req
deleted file mode 100644
index 7caa6acc..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-multiline/get-header-value-multiline.req
+++ /dev/null
@@ -1,6 +0,0 @@
-GET / HTTP/1.1
-Host:example.amazonaws.com
-My-Header1:value1
- value2
- value3
-X-Amz-Date:20150830T123600Z
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-multiline/get-header-value-multiline.sreq b/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-multiline/get-header-value-multiline.sreq
deleted file mode 100644
index 56955d9a..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-multiline/get-header-value-multiline.sreq
+++ /dev/null
@@ -1,7 +0,0 @@
-GET / HTTP/1.1
-Host:example.amazonaws.com
-My-Header1:value1
- value2
- value3
-X-Amz-Date:20150830T123600Z
-Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=ba17b383a53190154eb5fa66a1b836cc297cc0a3d70a5d00705980573d8ff790
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-multiline/get-header-value-multiline.sts b/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-multiline/get-header-value-multiline.sts
deleted file mode 100644
index 0a3350ab..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-multiline/get-header-value-multiline.sts
+++ /dev/null
@@ -1,4 +0,0 @@
-AWS4-HMAC-SHA256
-20150830T123600Z
-20150830/us-east-1/service/aws4_request
-b7b6cbfd8a0430b78891e986784da2630c8a135a8595cec25b26ea94f926ee55
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-order/get-header-value-order.authz b/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-order/get-header-value-order.authz
deleted file mode 100644
index c0409ab2..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-order/get-header-value-order.authz
+++ /dev/null
@@ -1 +0,0 @@
-AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=08c7e5a9acfcfeb3ab6b2185e75ce8b1deb5e634ec47601a50643f830c755c01
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-order/get-header-value-order.creq b/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-order/get-header-value-order.creq
deleted file mode 100644
index e336bc94..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-order/get-header-value-order.creq
+++ /dev/null
@@ -1,9 +0,0 @@
-GET
-/
-
-host:example.amazonaws.com
-my-header1:value4,value1,value3,value2
-x-amz-date:20150830T123600Z
-
-host;my-header1;x-amz-date
-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-order/get-header-value-order.req b/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-order/get-header-value-order.req
deleted file mode 100644
index f7bd9e66..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-order/get-header-value-order.req
+++ /dev/null
@@ -1,7 +0,0 @@
-GET / HTTP/1.1
-Host:example.amazonaws.com
-My-Header1:value4
-My-Header1:value1
-My-Header1:value3
-My-Header1:value2
-X-Amz-Date:20150830T123600Z
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-order/get-header-value-order.sreq b/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-order/get-header-value-order.sreq
deleted file mode 100644
index 79e16a95..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-order/get-header-value-order.sreq
+++ /dev/null
@@ -1,8 +0,0 @@
-GET / HTTP/1.1
-Host:example.amazonaws.com
-My-Header1:value4
-My-Header1:value1
-My-Header1:value3
-My-Header1:value2
-X-Amz-Date:20150830T123600Z
-Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=08c7e5a9acfcfeb3ab6b2185e75ce8b1deb5e634ec47601a50643f830c755c01
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-order/get-header-value-order.sts b/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-order/get-header-value-order.sts
deleted file mode 100644
index 711a8d4d..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-order/get-header-value-order.sts
+++ /dev/null
@@ -1,4 +0,0 @@
-AWS4-HMAC-SHA256
-20150830T123600Z
-20150830/us-east-1/service/aws4_request
-31ce73cd3f3d9f66977ad3dd957dc47af14df92fcd8509f59b349e9137c58b86
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-trim/get-header-value-trim.authz b/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-trim/get-header-value-trim.authz
deleted file mode 100644
index 4874ac0b..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-trim/get-header-value-trim.authz
+++ /dev/null
@@ -1 +0,0 @@
-AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;my-header2;x-amz-date, Signature=acc3ed3afb60bb290fc8d2dd0098b9911fcaa05412b367055dee359757a9c736
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-trim/get-header-value-trim.creq b/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-trim/get-header-value-trim.creq
deleted file mode 100644
index a59087c9..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-trim/get-header-value-trim.creq
+++ /dev/null
@@ -1,10 +0,0 @@
-GET
-/
-
-host:example.amazonaws.com
-my-header1:value1
-my-header2:"a b c"
-x-amz-date:20150830T123600Z
-
-host;my-header1;my-header2;x-amz-date
-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-trim/get-header-value-trim.req b/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-trim/get-header-value-trim.req
deleted file mode 100644
index 901f36c3..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-trim/get-header-value-trim.req
+++ /dev/null
@@ -1,5 +0,0 @@
-GET / HTTP/1.1
-Host:example.amazonaws.com
-My-Header1: value1
-My-Header2: "a b c"
-X-Amz-Date:20150830T123600Z
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-trim/get-header-value-trim.sreq b/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-trim/get-header-value-trim.sreq
deleted file mode 100644
index 98224c9b..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-trim/get-header-value-trim.sreq
+++ /dev/null
@@ -1,6 +0,0 @@
-GET / HTTP/1.1
-Host:example.amazonaws.com
-My-Header1: value1
-My-Header2: "a b c"
-X-Amz-Date:20150830T123600Z
-Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;my-header2;x-amz-date, Signature=acc3ed3afb60bb290fc8d2dd0098b9911fcaa05412b367055dee359757a9c736
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-trim/get-header-value-trim.sts b/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-trim/get-header-value-trim.sts
deleted file mode 100644
index a0b15cc7..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-header-value-trim/get-header-value-trim.sts
+++ /dev/null
@@ -1,4 +0,0 @@
-AWS4-HMAC-SHA256
-20150830T123600Z
-20150830/us-east-1/service/aws4_request
-a726db9b0df21c14f559d0a978e563112acb1b9e05476f0a6a1c7d68f28605c7
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-unreserved/get-unreserved.authz b/tests/unit/sigv4/aws-sig-v4-test-suite/get-unreserved/get-unreserved.authz
deleted file mode 100644
index 2943ec89..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-unreserved/get-unreserved.authz
+++ /dev/null
@@ -1 +0,0 @@
-AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=07ef7494c76fa4850883e2b006601f940f8a34d404d0cfa977f52a65bbf5f24f
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-unreserved/get-unreserved.creq b/tests/unit/sigv4/aws-sig-v4-test-suite/get-unreserved/get-unreserved.creq
deleted file mode 100644
index 8af54df2..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-unreserved/get-unreserved.creq
+++ /dev/null
@@ -1,8 +0,0 @@
-GET
-/-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
-
-host:example.amazonaws.com
-x-amz-date:20150830T123600Z
-
-host;x-amz-date
-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-unreserved/get-unreserved.req b/tests/unit/sigv4/aws-sig-v4-test-suite/get-unreserved/get-unreserved.req
deleted file mode 100644
index da760cdb..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-unreserved/get-unreserved.req
+++ /dev/null
@@ -1,3 +0,0 @@
-GET /-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-unreserved/get-unreserved.sreq b/tests/unit/sigv4/aws-sig-v4-test-suite/get-unreserved/get-unreserved.sreq
deleted file mode 100644
index 8001b3d6..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-unreserved/get-unreserved.sreq
+++ /dev/null
@@ -1,4 +0,0 @@
-GET /-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
-Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=07ef7494c76fa4850883e2b006601f940f8a34d404d0cfa977f52a65bbf5f24f
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-unreserved/get-unreserved.sts b/tests/unit/sigv4/aws-sig-v4-test-suite/get-unreserved/get-unreserved.sts
deleted file mode 100644
index e9dc5414..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-unreserved/get-unreserved.sts
+++ /dev/null
@@ -1,4 +0,0 @@
-AWS4-HMAC-SHA256
-20150830T123600Z
-20150830/us-east-1/service/aws4_request
-6a968768eefaa713e2a6b16b589a8ea192661f098f37349f4e2c0082757446f9
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.authz b/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.authz
deleted file mode 100644
index 65b5c7ce..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.authz
+++ /dev/null
@@ -1 +0,0 @@
-AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=a67d582fa61cc504c4bae71f336f98b97f1ea3c7a6bfe1b6e45aec72011b9aeb
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.creq b/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.creq
deleted file mode 100644
index c6cdceda..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.creq
+++ /dev/null
@@ -1,8 +0,0 @@
-GET
-/
-Param1=value1
-host:example.amazonaws.com
-x-amz-date:20150830T123600Z
-
-host;x-amz-date
-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.req b/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.req
deleted file mode 100644
index 970d0a05..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.req
+++ /dev/null
@@ -1,3 +0,0 @@
-GET /?Param1=value1 HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.sreq b/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.sreq
deleted file mode 100644
index f0815913..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.sreq
+++ /dev/null
@@ -1,4 +0,0 @@
-GET /?Param1=value1 HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
-Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=a67d582fa61cc504c4bae71f336f98b97f1ea3c7a6bfe1b6e45aec72011b9aeb
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.sts b/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.sts
deleted file mode 100644
index c4ed216c..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.sts
+++ /dev/null
@@ -1,4 +0,0 @@
-AWS4-HMAC-SHA256
-20150830T123600Z
-20150830/us-east-1/service/aws4_request
-1e24db194ed7d0eec2de28d7369675a243488e08526e8c1c73571282f7c517ab
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.authz b/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.authz
deleted file mode 100644
index c781fe66..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.authz
+++ /dev/null
@@ -1 +0,0 @@
-AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=b97d918cfa904a5beff61c982a1b6f458b799221646efd99d3219ec94cdf2500
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.creq b/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.creq
deleted file mode 100644
index 8ae02cd6..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.creq
+++ /dev/null
@@ -1,8 +0,0 @@
-GET
-/
-Param1=value1&Param2=value2
-host:example.amazonaws.com
-x-amz-date:20150830T123600Z
-
-host;x-amz-date
-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.req b/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.req
deleted file mode 100644
index 8a56f15f..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.req
+++ /dev/null
@@ -1,3 +0,0 @@
-GET /?Param2=value2&Param1=value1 HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.sreq b/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.sreq
deleted file mode 100644
index aa3162d8..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.sreq
+++ /dev/null
@@ -1,4 +0,0 @@
-GET /?Param2=value2&Param1=value1 HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
-Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=b97d918cfa904a5beff61c982a1b6f458b799221646efd99d3219ec94cdf2500
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.sts b/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.sts
deleted file mode 100644
index f773de59..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.sts
+++ /dev/null
@@ -1,4 +0,0 @@
-AWS4-HMAC-SHA256
-20150830T123600Z
-20150830/us-east-1/service/aws4_request
-816cd5b414d056048ba4f7c5386d6e0533120fb1fcfa93762cf0fc39e2cf19e0
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-key/get-vanilla-query-order-key.authz b/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-key/get-vanilla-query-order-key.authz
deleted file mode 100644
index 812cd3fd..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-key/get-vanilla-query-order-key.authz
+++ /dev/null
@@ -1 +0,0 @@
-AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=eedbc4e291e521cf13422ffca22be7d2eb8146eecf653089df300a15b2382bd1
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-key/get-vanilla-query-order-key.creq b/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-key/get-vanilla-query-order-key.creq
deleted file mode 100644
index 36c3cdfa..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-key/get-vanilla-query-order-key.creq
+++ /dev/null
@@ -1,8 +0,0 @@
-GET
-/
-Param1=Value1&Param1=value2
-host:example.amazonaws.com
-x-amz-date:20150830T123600Z
-
-host;x-amz-date
-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-key/get-vanilla-query-order-key.req b/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-key/get-vanilla-query-order-key.req
deleted file mode 100644
index 375a4965..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-key/get-vanilla-query-order-key.req
+++ /dev/null
@@ -1,3 +0,0 @@
-GET /?Param1=value2&Param1=Value1 HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-key/get-vanilla-query-order-key.sreq b/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-key/get-vanilla-query-order-key.sreq
deleted file mode 100644
index bc8e6520..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-key/get-vanilla-query-order-key.sreq
+++ /dev/null
@@ -1,4 +0,0 @@
-GET /?Param1=value2&Param1=Value1 HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
-Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=eedbc4e291e521cf13422ffca22be7d2eb8146eecf653089df300a15b2382bd1
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-key/get-vanilla-query-order-key.sts b/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-key/get-vanilla-query-order-key.sts
deleted file mode 100644
index fd43a414..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-key/get-vanilla-query-order-key.sts
+++ /dev/null
@@ -1,4 +0,0 @@
-AWS4-HMAC-SHA256
-20150830T123600Z
-20150830/us-east-1/service/aws4_request
-704b4cef673542d84cdff252633f065e8daeba5f168b77116f8b1bcaf3d38f89
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-value/get-vanilla-query-order-value.authz b/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-value/get-vanilla-query-order-value.authz
deleted file mode 100644
index b8ad91f6..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-value/get-vanilla-query-order-value.authz
+++ /dev/null
@@ -1 +0,0 @@
-AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5772eed61e12b33fae39ee5e7012498b51d56abc0abb7c60486157bd471c4694
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-value/get-vanilla-query-order-value.creq b/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-value/get-vanilla-query-order-value.creq
deleted file mode 100644
index 26898ebe..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-value/get-vanilla-query-order-value.creq
+++ /dev/null
@@ -1,8 +0,0 @@
-GET
-/
-Param1=value1&Param1=value2
-host:example.amazonaws.com
-x-amz-date:20150830T123600Z
-
-host;x-amz-date
-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-value/get-vanilla-query-order-value.req b/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-value/get-vanilla-query-order-value.req
deleted file mode 100644
index 9255bee0..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-value/get-vanilla-query-order-value.req
+++ /dev/null
@@ -1,3 +0,0 @@
-GET /?Param1=value2&Param1=value1 HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-value/get-vanilla-query-order-value.sreq b/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-value/get-vanilla-query-order-value.sreq
deleted file mode 100644
index 4793e218..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-value/get-vanilla-query-order-value.sreq
+++ /dev/null
@@ -1,4 +0,0 @@
-GET /?Param1=value2&Param1=value1 HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
-Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5772eed61e12b33fae39ee5e7012498b51d56abc0abb7c60486157bd471c4694
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-value/get-vanilla-query-order-value.sts b/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-value/get-vanilla-query-order-value.sts
deleted file mode 100644
index 90e66b8d..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-order-value/get-vanilla-query-order-value.sts
+++ /dev/null
@@ -1,4 +0,0 @@
-AWS4-HMAC-SHA256
-20150830T123600Z
-20150830/us-east-1/service/aws4_request
-c968629d70850097a2d8781c9bf7edcb988b04cac14cca9be4acc3595f884606
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.authz b/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.authz
deleted file mode 100644
index a44ca5be..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.authz
+++ /dev/null
@@ -1 +0,0 @@
-AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=9c3e54bfcdf0b19771a7f523ee5669cdf59bc7cc0884027167c21bb143a40197
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.creq b/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.creq
deleted file mode 100644
index 5249be3b..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.creq
+++ /dev/null
@@ -1,8 +0,0 @@
-GET
-/
--._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz=-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
-host:example.amazonaws.com
-x-amz-date:20150830T123600Z
-
-host;x-amz-date
-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.req b/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.req
deleted file mode 100644
index d2833b32..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.req
+++ /dev/null
@@ -1,3 +0,0 @@
-GET /?-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz=-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.sreq b/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.sreq
deleted file mode 100644
index ba1ef402..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.sreq
+++ /dev/null
@@ -1,4 +0,0 @@
-GET /?-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz=-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
-Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=9c3e54bfcdf0b19771a7f523ee5669cdf59bc7cc0884027167c21bb143a40197
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.sts b/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.sts
deleted file mode 100644
index 24a97d20..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.sts
+++ /dev/null
@@ -1,4 +0,0 @@
-AWS4-HMAC-SHA256
-20150830T123600Z
-20150830/us-east-1/service/aws4_request
-c30d4703d9f799439be92736156d47ccfb2d879ddf56f5befa6d1d6aab979177
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query/get-vanilla-query.authz b/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query/get-vanilla-query.authz
deleted file mode 100644
index 551c0271..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query/get-vanilla-query.authz
+++ /dev/null
@@ -1 +0,0 @@
-AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query/get-vanilla-query.creq b/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query/get-vanilla-query.creq
deleted file mode 100644
index ed91561f..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query/get-vanilla-query.creq
+++ /dev/null
@@ -1,8 +0,0 @@
-GET
-/
-
-host:example.amazonaws.com
-x-amz-date:20150830T123600Z
-
-host;x-amz-date
-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query/get-vanilla-query.req b/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query/get-vanilla-query.req
deleted file mode 100644
index 0f7a9bfa..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query/get-vanilla-query.req
+++ /dev/null
@@ -1,3 +0,0 @@
-GET / HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query/get-vanilla-query.sreq b/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query/get-vanilla-query.sreq
deleted file mode 100644
index d739b01f..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query/get-vanilla-query.sreq
+++ /dev/null
@@ -1,4 +0,0 @@
-GET / HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
-Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query/get-vanilla-query.sts b/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query/get-vanilla-query.sts
deleted file mode 100644
index b187649c..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-query/get-vanilla-query.sts
+++ /dev/null
@@ -1,4 +0,0 @@
-AWS4-HMAC-SHA256
-20150830T123600Z
-20150830/us-east-1/service/aws4_request
-bb579772317eb040ac9ed261061d46c1f17a8133879d6129b6e1c25292927e63
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-utf8-query/get-vanilla-utf8-query.authz b/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-utf8-query/get-vanilla-utf8-query.authz
deleted file mode 100644
index e016c3da..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-utf8-query/get-vanilla-utf8-query.authz
+++ /dev/null
@@ -1 +0,0 @@
-AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=2cdec8eed098649ff3a119c94853b13c643bcf08f8b0a1d91e12c9027818dd04
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-utf8-query/get-vanilla-utf8-query.creq b/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-utf8-query/get-vanilla-utf8-query.creq
deleted file mode 100644
index a835c9e4..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-utf8-query/get-vanilla-utf8-query.creq
+++ /dev/null
@@ -1,8 +0,0 @@
-GET
-/
-%E1%88%B4=bar
-host:example.amazonaws.com
-x-amz-date:20150830T123600Z
-
-host;x-amz-date
-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-utf8-query/get-vanilla-utf8-query.req_disabled b/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-utf8-query/get-vanilla-utf8-query.req_disabled
deleted file mode 100644
index cc2757e1..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-utf8-query/get-vanilla-utf8-query.req_disabled
+++ /dev/null
@@ -1,3 +0,0 @@
-GET /?ሴ=bar HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-utf8-query/get-vanilla-utf8-query.sreq b/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-utf8-query/get-vanilla-utf8-query.sreq
deleted file mode 100644
index 7baf4c82..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-utf8-query/get-vanilla-utf8-query.sreq
+++ /dev/null
@@ -1,4 +0,0 @@
-GET /?ሴ=bar HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
-Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=2cdec8eed098649ff3a119c94853b13c643bcf08f8b0a1d91e12c9027818dd04
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-utf8-query/get-vanilla-utf8-query.sts b/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-utf8-query/get-vanilla-utf8-query.sts
deleted file mode 100644
index 51ee71b7..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla-utf8-query/get-vanilla-utf8-query.sts
+++ /dev/null
@@ -1,4 +0,0 @@
-AWS4-HMAC-SHA256
-20150830T123600Z
-20150830/us-east-1/service/aws4_request
-eb30c5bed55734080471a834cc727ae56beb50e5f39d1bff6d0d38cb192a7073
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla/get-vanilla.authz b/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla/get-vanilla.authz
deleted file mode 100644
index 551c0271..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla/get-vanilla.authz
+++ /dev/null
@@ -1 +0,0 @@
-AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla/get-vanilla.creq b/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla/get-vanilla.creq
deleted file mode 100644
index ed91561f..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla/get-vanilla.creq
+++ /dev/null
@@ -1,8 +0,0 @@
-GET
-/
-
-host:example.amazonaws.com
-x-amz-date:20150830T123600Z
-
-host;x-amz-date
-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla/get-vanilla.req b/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla/get-vanilla.req
deleted file mode 100644
index 0f7a9bfa..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla/get-vanilla.req
+++ /dev/null
@@ -1,3 +0,0 @@
-GET / HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla/get-vanilla.sreq b/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla/get-vanilla.sreq
deleted file mode 100644
index d739b01f..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla/get-vanilla.sreq
+++ /dev/null
@@ -1,4 +0,0 @@
-GET / HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
-Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla/get-vanilla.sts b/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla/get-vanilla.sts
deleted file mode 100644
index b187649c..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/get-vanilla/get-vanilla.sts
+++ /dev/null
@@ -1,4 +0,0 @@
-AWS4-HMAC-SHA256
-20150830T123600Z
-20150830/us-east-1/service/aws4_request
-bb579772317eb040ac9ed261061d46c1f17a8133879d6129b6e1c25292927e63
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-relative-relative/get-relative-relative.authz b/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-relative-relative/get-relative-relative.authz
deleted file mode 100644
index 551c0271..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-relative-relative/get-relative-relative.authz
+++ /dev/null
@@ -1 +0,0 @@
-AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-relative-relative/get-relative-relative.creq b/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-relative-relative/get-relative-relative.creq
deleted file mode 100644
index ed91561f..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-relative-relative/get-relative-relative.creq
+++ /dev/null
@@ -1,8 +0,0 @@
-GET
-/
-
-host:example.amazonaws.com
-x-amz-date:20150830T123600Z
-
-host;x-amz-date
-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-relative-relative/get-relative-relative.req b/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-relative-relative/get-relative-relative.req
deleted file mode 100644
index cfd4e8b7..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-relative-relative/get-relative-relative.req
+++ /dev/null
@@ -1,3 +0,0 @@
-GET /example1/example2/../.. HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-relative-relative/get-relative-relative.sreq b/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-relative-relative/get-relative-relative.sreq
deleted file mode 100644
index cbdebe2c..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-relative-relative/get-relative-relative.sreq
+++ /dev/null
@@ -1,4 +0,0 @@
-GET /example1/example2/../.. HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
-Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-relative-relative/get-relative-relative.sts b/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-relative-relative/get-relative-relative.sts
deleted file mode 100644
index b187649c..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-relative-relative/get-relative-relative.sts
+++ /dev/null
@@ -1,4 +0,0 @@
-AWS4-HMAC-SHA256
-20150830T123600Z
-20150830/us-east-1/service/aws4_request
-bb579772317eb040ac9ed261061d46c1f17a8133879d6129b6e1c25292927e63
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-relative/get-relative.authz b/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-relative/get-relative.authz
deleted file mode 100644
index 551c0271..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-relative/get-relative.authz
+++ /dev/null
@@ -1 +0,0 @@
-AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-relative/get-relative.creq b/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-relative/get-relative.creq
deleted file mode 100644
index ed91561f..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-relative/get-relative.creq
+++ /dev/null
@@ -1,8 +0,0 @@
-GET
-/
-
-host:example.amazonaws.com
-x-amz-date:20150830T123600Z
-
-host;x-amz-date
-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-relative/get-relative.req b/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-relative/get-relative.req
deleted file mode 100644
index 9d6d7ca2..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-relative/get-relative.req
+++ /dev/null
@@ -1,3 +0,0 @@
-GET /example/.. HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-relative/get-relative.sreq b/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-relative/get-relative.sreq
deleted file mode 100644
index 4f59e7d2..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-relative/get-relative.sreq
+++ /dev/null
@@ -1,4 +0,0 @@
-GET /example/.. HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
-Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-relative/get-relative.sts b/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-relative/get-relative.sts
deleted file mode 100644
index b187649c..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-relative/get-relative.sts
+++ /dev/null
@@ -1,4 +0,0 @@
-AWS4-HMAC-SHA256
-20150830T123600Z
-20150830/us-east-1/service/aws4_request
-bb579772317eb040ac9ed261061d46c1f17a8133879d6129b6e1c25292927e63
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.authz b/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.authz
deleted file mode 100644
index 551c0271..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.authz
+++ /dev/null
@@ -1 +0,0 @@
-AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.creq b/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.creq
deleted file mode 100644
index ed91561f..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.creq
+++ /dev/null
@@ -1,8 +0,0 @@
-GET
-/
-
-host:example.amazonaws.com
-x-amz-date:20150830T123600Z
-
-host;x-amz-date
-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.req b/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.req
deleted file mode 100644
index f3537b70..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.req
+++ /dev/null
@@ -1,3 +0,0 @@
-GET /./ HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.sreq b/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.sreq
deleted file mode 100644
index 23a2b41c..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.sreq
+++ /dev/null
@@ -1,4 +0,0 @@
-GET /./ HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
-Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.sts b/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.sts
deleted file mode 100644
index b187649c..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.sts
+++ /dev/null
@@ -1,4 +0,0 @@
-AWS4-HMAC-SHA256
-20150830T123600Z
-20150830/us-east-1/service/aws4_request
-bb579772317eb040ac9ed261061d46c1f17a8133879d6129b6e1c25292927e63
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.authz b/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.authz
deleted file mode 100644
index b76ca1e2..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.authz
+++ /dev/null
@@ -1 +0,0 @@
-AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=ef75d96142cf21edca26f06005da7988e4f8dc83a165a80865db7089db637ec5
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.creq b/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.creq
deleted file mode 100644
index 915c57f2..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.creq
+++ /dev/null
@@ -1,8 +0,0 @@
-GET
-/example
-
-host:example.amazonaws.com
-x-amz-date:20150830T123600Z
-
-host;x-amz-date
-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.req b/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.req
deleted file mode 100644
index 3c910717..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.req
+++ /dev/null
@@ -1,3 +0,0 @@
-GET /./example HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.sreq b/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.sreq
deleted file mode 100644
index 80966096..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.sreq
+++ /dev/null
@@ -1,4 +0,0 @@
-GET /./example HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
-Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=ef75d96142cf21edca26f06005da7988e4f8dc83a165a80865db7089db637ec5
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.sts b/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.sts
deleted file mode 100644
index 7429923e..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.sts
+++ /dev/null
@@ -1,4 +0,0 @@
-AWS4-HMAC-SHA256
-20150830T123600Z
-20150830/us-east-1/service/aws4_request
-214d50c111a8edc4819da6a636336472c916b5240f51e9a51b5c3305180cf702
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash/get-slash.authz b/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash/get-slash.authz
deleted file mode 100644
index 551c0271..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash/get-slash.authz
+++ /dev/null
@@ -1 +0,0 @@
-AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash/get-slash.creq b/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash/get-slash.creq
deleted file mode 100644
index ed91561f..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash/get-slash.creq
+++ /dev/null
@@ -1,8 +0,0 @@
-GET
-/
-
-host:example.amazonaws.com
-x-amz-date:20150830T123600Z
-
-host;x-amz-date
-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash/get-slash.req b/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash/get-slash.req
deleted file mode 100644
index ede8e3c8..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash/get-slash.req
+++ /dev/null
@@ -1,3 +0,0 @@
-GET // HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash/get-slash.sreq b/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash/get-slash.sreq
deleted file mode 100644
index cde31b43..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash/get-slash.sreq
+++ /dev/null
@@ -1,4 +0,0 @@
-GET // HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
-Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash/get-slash.sts b/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash/get-slash.sts
deleted file mode 100644
index b187649c..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slash/get-slash.sts
+++ /dev/null
@@ -1,4 +0,0 @@
-AWS4-HMAC-SHA256
-20150830T123600Z
-20150830/us-east-1/service/aws4_request
-bb579772317eb040ac9ed261061d46c1f17a8133879d6129b6e1c25292927e63
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slashes/get-slashes.authz b/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slashes/get-slashes.authz
deleted file mode 100644
index 307c1051..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slashes/get-slashes.authz
+++ /dev/null
@@ -1 +0,0 @@
-AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=9a624bd73a37c9a373b5312afbebe7a714a789de108f0bdfe846570885f57e84
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slashes/get-slashes.creq b/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slashes/get-slashes.creq
deleted file mode 100644
index 2bdaf747..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slashes/get-slashes.creq
+++ /dev/null
@@ -1,8 +0,0 @@
-GET
-/example/
-
-host:example.amazonaws.com
-x-amz-date:20150830T123600Z
-
-host;x-amz-date
-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slashes/get-slashes.req b/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slashes/get-slashes.req
deleted file mode 100644
index a4307ce4..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slashes/get-slashes.req
+++ /dev/null
@@ -1,3 +0,0 @@
-GET //example// HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slashes/get-slashes.sreq b/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slashes/get-slashes.sreq
deleted file mode 100644
index c84a80d5..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slashes/get-slashes.sreq
+++ /dev/null
@@ -1,4 +0,0 @@
-GET //example// HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
-Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=9a624bd73a37c9a373b5312afbebe7a714a789de108f0bdfe846570885f57e84
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slashes/get-slashes.sts b/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slashes/get-slashes.sts
deleted file mode 100644
index 95d1fc25..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-slashes/get-slashes.sts
+++ /dev/null
@@ -1,4 +0,0 @@
-AWS4-HMAC-SHA256
-20150830T123600Z
-20150830/us-east-1/service/aws4_request
-cb96b4ac96d501f7c5c15bc6d67b3035061cfced4af6585ad927f7e6c985c015
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-space/get-space.authz b/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-space/get-space.authz
deleted file mode 100644
index 832d8a50..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-space/get-space.authz
+++ /dev/null
@@ -1 +0,0 @@
-AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=652487583200325589f1fba4c7e578f72c47cb61beeca81406b39ddec1366741
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-space/get-space.creq b/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-space/get-space.creq
deleted file mode 100644
index 124a7096..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-space/get-space.creq
+++ /dev/null
@@ -1,8 +0,0 @@
-GET
-/example%20space/
-
-host:example.amazonaws.com
-x-amz-date:20150830T123600Z
-
-host;x-amz-date
-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-space/get-space.req b/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-space/get-space.req
deleted file mode 100644
index b7d5e8bb..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-space/get-space.req
+++ /dev/null
@@ -1,3 +0,0 @@
-GET /example space/ HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-space/get-space.sreq b/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-space/get-space.sreq
deleted file mode 100644
index eefa20c4..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-space/get-space.sreq
+++ /dev/null
@@ -1,4 +0,0 @@
-GET /example space/ HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
-Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=652487583200325589f1fba4c7e578f72c47cb61beeca81406b39ddec1366741
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-space/get-space.sts b/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-space/get-space.sts
deleted file mode 100644
index a633f0c0..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/get-space/get-space.sts
+++ /dev/null
@@ -1,4 +0,0 @@
-AWS4-HMAC-SHA256
-20150830T123600Z
-20150830/us-east-1/service/aws4_request
-63ee75631ed7234ae61b5f736dfc7754cdccfedbff4b5128a915706ee9390d86
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/normalize-path.txt b/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/normalize-path.txt
deleted file mode 100644
index c2fcb272..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/normalize-path/normalize-path.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-A note about signing requests to Amazon S3:
-
-In exception to this, you do not normalize URI paths for requests to Amazon S3. For example, if you have a bucket with an object named my-object//example//photo.user, use that path. Normalizing the path to my-object/example/photo.user will cause the request to fail. For more information, see Task 1: Create a Canonical Request in the Amazon Simple Storage Service API Reference: http://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-header-based-auth.html#canonical-request
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-key-case/post-header-key-case.authz b/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-key-case/post-header-key-case.authz
deleted file mode 100644
index 89e572e6..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-key-case/post-header-key-case.authz
+++ /dev/null
@@ -1 +0,0 @@
-AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5da7c1a2acd57cee7505fc6676e4e544621c30862966e37dddb68e92efbe5d6b
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-key-case/post-header-key-case.creq b/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-key-case/post-header-key-case.creq
deleted file mode 100644
index 5c3a9434..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-key-case/post-header-key-case.creq
+++ /dev/null
@@ -1,8 +0,0 @@
-POST
-/
-
-host:example.amazonaws.com
-x-amz-date:20150830T123600Z
-
-host;x-amz-date
-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-key-case/post-header-key-case.req b/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-key-case/post-header-key-case.req
deleted file mode 100644
index 3dc41790..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-key-case/post-header-key-case.req
+++ /dev/null
@@ -1,3 +0,0 @@
-POST / HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-key-case/post-header-key-case.sreq b/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-key-case/post-header-key-case.sreq
deleted file mode 100644
index a5ada0d9..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-key-case/post-header-key-case.sreq
+++ /dev/null
@@ -1,4 +0,0 @@
-POST / HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
-Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5da7c1a2acd57cee7505fc6676e4e544621c30862966e37dddb68e92efbe5d6b
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-key-case/post-header-key-case.sts b/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-key-case/post-header-key-case.sts
deleted file mode 100644
index a6367039..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-key-case/post-header-key-case.sts
+++ /dev/null
@@ -1,4 +0,0 @@
-AWS4-HMAC-SHA256
-20150830T123600Z
-20150830/us-east-1/service/aws4_request
-553f88c9e4d10fc9e109e2aeb65f030801b70c2f6468faca261d401ae622fc87
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-key-sort/post-header-key-sort.authz b/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-key-sort/post-header-key-sort.authz
deleted file mode 100644
index a62589ff..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-key-sort/post-header-key-sort.authz
+++ /dev/null
@@ -1 +0,0 @@
-AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=c5410059b04c1ee005303aed430f6e6645f61f4dc9e1461ec8f8916fdf18852c
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-key-sort/post-header-key-sort.creq b/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-key-sort/post-header-key-sort.creq
deleted file mode 100644
index ebe943e8..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-key-sort/post-header-key-sort.creq
+++ /dev/null
@@ -1,9 +0,0 @@
-POST
-/
-
-host:example.amazonaws.com
-my-header1:value1
-x-amz-date:20150830T123600Z
-
-host;my-header1;x-amz-date
-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-key-sort/post-header-key-sort.req b/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-key-sort/post-header-key-sort.req
deleted file mode 100644
index 0253f194..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-key-sort/post-header-key-sort.req
+++ /dev/null
@@ -1,4 +0,0 @@
-POST / HTTP/1.1
-Host:example.amazonaws.com
-My-Header1:value1
-X-Amz-Date:20150830T123600Z
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-key-sort/post-header-key-sort.sreq b/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-key-sort/post-header-key-sort.sreq
deleted file mode 100644
index b4b78a16..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-key-sort/post-header-key-sort.sreq
+++ /dev/null
@@ -1,5 +0,0 @@
-POST / HTTP/1.1
-Host:example.amazonaws.com
-My-Header1:value1
-X-Amz-Date:20150830T123600Z
-Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=c5410059b04c1ee005303aed430f6e6645f61f4dc9e1461ec8f8916fdf18852c
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-key-sort/post-header-key-sort.sts b/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-key-sort/post-header-key-sort.sts
deleted file mode 100644
index eb663626..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-key-sort/post-header-key-sort.sts
+++ /dev/null
@@ -1,4 +0,0 @@
-AWS4-HMAC-SHA256
-20150830T123600Z
-20150830/us-east-1/service/aws4_request
-9368318c2967cf6de74404b30c65a91e8f6253e0a8659d6d5319f1a812f87d65
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-value-case/post-header-value-case.authz b/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-value-case/post-header-value-case.authz
deleted file mode 100644
index d9e52a37..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-value-case/post-header-value-case.authz
+++ /dev/null
@@ -1 +0,0 @@
-AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=cdbc9802e29d2942e5e10b5bccfdd67c5f22c7c4e8ae67b53629efa58b974b7d
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-value-case/post-header-value-case.creq b/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-value-case/post-header-value-case.creq
deleted file mode 100644
index af824c88..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-value-case/post-header-value-case.creq
+++ /dev/null
@@ -1,9 +0,0 @@
-POST
-/
-
-host:example.amazonaws.com
-my-header1:VALUE1
-x-amz-date:20150830T123600Z
-
-host;my-header1;x-amz-date
-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-value-case/post-header-value-case.req b/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-value-case/post-header-value-case.req
deleted file mode 100644
index 3f9987af..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-value-case/post-header-value-case.req
+++ /dev/null
@@ -1,4 +0,0 @@
-POST / HTTP/1.1
-Host:example.amazonaws.com
-My-Header1:VALUE1
-X-Amz-Date:20150830T123600Z
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-value-case/post-header-value-case.sreq b/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-value-case/post-header-value-case.sreq
deleted file mode 100644
index 99c3210c..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-value-case/post-header-value-case.sreq
+++ /dev/null
@@ -1,5 +0,0 @@
-POST / HTTP/1.1
-Host:example.amazonaws.com
-My-Header1:VALUE1
-X-Amz-Date:20150830T123600Z
-Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=cdbc9802e29d2942e5e10b5bccfdd67c5f22c7c4e8ae67b53629efa58b974b7d
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-value-case/post-header-value-case.sts b/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-value-case/post-header-value-case.sts
deleted file mode 100644
index 40062c79..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-header-value-case/post-header-value-case.sts
+++ /dev/null
@@ -1,4 +0,0 @@
-AWS4-HMAC-SHA256
-20150830T123600Z
-20150830/us-east-1/service/aws4_request
-d51ced243e649e3de6ef63afbbdcbca03131a21a7103a1583706a64618606a93
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-sts-token/post-sts-header-after/post-sts-header-after.authz b/tests/unit/sigv4/aws-sig-v4-test-suite/post-sts-token/post-sts-header-after/post-sts-header-after.authz
deleted file mode 100644
index 89e572e6..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-sts-token/post-sts-header-after/post-sts-header-after.authz
+++ /dev/null
@@ -1 +0,0 @@
-AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5da7c1a2acd57cee7505fc6676e4e544621c30862966e37dddb68e92efbe5d6b
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-sts-token/post-sts-header-after/post-sts-header-after.creq b/tests/unit/sigv4/aws-sig-v4-test-suite/post-sts-token/post-sts-header-after/post-sts-header-after.creq
deleted file mode 100644
index 5c3a9434..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-sts-token/post-sts-header-after/post-sts-header-after.creq
+++ /dev/null
@@ -1,8 +0,0 @@
-POST
-/
-
-host:example.amazonaws.com
-x-amz-date:20150830T123600Z
-
-host;x-amz-date
-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-sts-token/post-sts-header-after/post-sts-header-after.req b/tests/unit/sigv4/aws-sig-v4-test-suite/post-sts-token/post-sts-header-after/post-sts-header-after.req
deleted file mode 100644
index 3dc41790..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-sts-token/post-sts-header-after/post-sts-header-after.req
+++ /dev/null
@@ -1,3 +0,0 @@
-POST / HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-sts-token/post-sts-header-after/post-sts-header-after.sreq b/tests/unit/sigv4/aws-sig-v4-test-suite/post-sts-token/post-sts-header-after/post-sts-header-after.sreq
deleted file mode 100644
index 291ed075..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-sts-token/post-sts-header-after/post-sts-header-after.sreq
+++ /dev/null
@@ -1,5 +0,0 @@
-POST / HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
-X-Amz-Security-Token:AQoDYXdzEPT//////////wEXAMPLEtc764bNrC9SAPBSM22wDOk4x4HIZ8j4FZTwdQWLWsKWHGBuFqwAeMicRXmxfpSPfIeoIYRqTflfKD8YUuwthAx7mSEI/qkPpKPi/kMcGdQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA==
-Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5da7c1a2acd57cee7505fc6676e4e544621c30862966e37dddb68e92efbe5d6b
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-sts-token/post-sts-header-after/post-sts-header-after.sts b/tests/unit/sigv4/aws-sig-v4-test-suite/post-sts-token/post-sts-header-after/post-sts-header-after.sts
deleted file mode 100644
index a6367039..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-sts-token/post-sts-header-after/post-sts-header-after.sts
+++ /dev/null
@@ -1,4 +0,0 @@
-AWS4-HMAC-SHA256
-20150830T123600Z
-20150830/us-east-1/service/aws4_request
-553f88c9e4d10fc9e109e2aeb65f030801b70c2f6468faca261d401ae622fc87
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-sts-token/post-sts-header-before/post-sts-header-before.authz b/tests/unit/sigv4/aws-sig-v4-test-suite/post-sts-token/post-sts-header-before/post-sts-header-before.authz
deleted file mode 100644
index 64aa046d..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-sts-token/post-sts-header-before/post-sts-header-before.authz
+++ /dev/null
@@ -1 +0,0 @@
-AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date;x-amz-security-token, Signature=85d96828115b5dc0cfc3bd16ad9e210dd772bbebba041836c64533a82be05ead
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-sts-token/post-sts-header-before/post-sts-header-before.creq b/tests/unit/sigv4/aws-sig-v4-test-suite/post-sts-token/post-sts-header-before/post-sts-header-before.creq
deleted file mode 100644
index 1d5a462e..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-sts-token/post-sts-header-before/post-sts-header-before.creq
+++ /dev/null
@@ -1,9 +0,0 @@
-POST
-/
-
-host:example.amazonaws.com
-x-amz-date:20150830T123600Z
-x-amz-security-token:AQoDYXdzEPT//////////wEXAMPLEtc764bNrC9SAPBSM22wDOk4x4HIZ8j4FZTwdQWLWsKWHGBuFqwAeMicRXmxfpSPfIeoIYRqTflfKD8YUuwthAx7mSEI/qkPpKPi/kMcGdQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA==
-
-host;x-amz-date;x-amz-security-token
-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-sts-token/post-sts-header-before/post-sts-header-before.req b/tests/unit/sigv4/aws-sig-v4-test-suite/post-sts-token/post-sts-header-before/post-sts-header-before.req
deleted file mode 100644
index 9d917755..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-sts-token/post-sts-header-before/post-sts-header-before.req
+++ /dev/null
@@ -1,4 +0,0 @@
-POST / HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
-X-Amz-Security-Token:AQoDYXdzEPT//////////wEXAMPLEtc764bNrC9SAPBSM22wDOk4x4HIZ8j4FZTwdQWLWsKWHGBuFqwAeMicRXmxfpSPfIeoIYRqTflfKD8YUuwthAx7mSEI/qkPpKPi/kMcGdQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA==
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-sts-token/post-sts-header-before/post-sts-header-before.sreq b/tests/unit/sigv4/aws-sig-v4-test-suite/post-sts-token/post-sts-header-before/post-sts-header-before.sreq
deleted file mode 100644
index 37b2f041..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-sts-token/post-sts-header-before/post-sts-header-before.sreq
+++ /dev/null
@@ -1,5 +0,0 @@
-POST / HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
-X-Amz-Security-Token:AQoDYXdzEPT//////////wEXAMPLEtc764bNrC9SAPBSM22wDOk4x4HIZ8j4FZTwdQWLWsKWHGBuFqwAeMicRXmxfpSPfIeoIYRqTflfKD8YUuwthAx7mSEI/qkPpKPi/kMcGdQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA==
-Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date;x-amz-security-token, Signature=85d96828115b5dc0cfc3bd16ad9e210dd772bbebba041836c64533a82be05ead
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-sts-token/post-sts-header-before/post-sts-header-before.sts b/tests/unit/sigv4/aws-sig-v4-test-suite/post-sts-token/post-sts-header-before/post-sts-header-before.sts
deleted file mode 100644
index bc39ccfc..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-sts-token/post-sts-header-before/post-sts-header-before.sts
+++ /dev/null
@@ -1,4 +0,0 @@
-AWS4-HMAC-SHA256
-20150830T123600Z
-20150830/us-east-1/service/aws4_request
-c237e1b440d4c63c32ca95b5b99481081cb7b13c7e40434868e71567c1a882f6
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-sts-token/readme.txt b/tests/unit/sigv4/aws-sig-v4-test-suite/post-sts-token/readme.txt
deleted file mode 100644
index cc342823..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-sts-token/readme.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-A note about using temporary security credentials:
-
-You can use temporary security credentials provided by the AWS Security Token Service (AWS STS) to sign a request. The process is the same as using long-term credentials but requires an additional HTTP header or query string parameter for the security token. The name of the header or query string parameter is X-Amz-Security-Token, and the value is the session token (the string that you received from AWS STS when you obtained temporary security credentials).
-
-When you add X-Amz-Security-Token, some services require that you include this parameter in the canonical (signed) request. For other services, you add this parameter at the end, after you calculate the signature. For details see the API reference documentation for that service.
-
-The test suite has 2 examples:
-
-post-sts-header-before - The X-Amz-Security-Token header is part of the canonical request.
-
-post-sts-header-after - The X-Amz-Security-Token header is added to the request after you calculate the signature.
-
-The test suite uses this example value for X-Amz-Security-Token:
-
-AQoDYXdzEPT//////////wEXAMPLEtc764bNrC9SAPBSM22wDOk4x4HIZ8j4FZTwdQWLWsKWHGBuFqwAeMicRXmxfpSPfIeoIYRqTflfKD8YUuwthAx7mSEI/qkPpKPi/kMcGdQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA==
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.authz b/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.authz
deleted file mode 100644
index 44280cd7..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.authz
+++ /dev/null
@@ -1 +0,0 @@
-AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=28038455d6de14eafc1f9222cf5aa6f1a96197d7deb8263271d420d138af7f11
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.creq b/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.creq
deleted file mode 100644
index f5058d43..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.creq
+++ /dev/null
@@ -1,8 +0,0 @@
-POST
-/
-Param1=value1
-host:example.amazonaws.com
-x-amz-date:20150830T123600Z
-
-host;x-amz-date
-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.req b/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.req
deleted file mode 100644
index 9157bc74..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.req
+++ /dev/null
@@ -1,3 +0,0 @@
-POST /?Param1=value1 HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.sreq b/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.sreq
deleted file mode 100644
index 82af1505..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.sreq
+++ /dev/null
@@ -1,4 +0,0 @@
-POST /?Param1=value1 HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
-Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=28038455d6de14eafc1f9222cf5aa6f1a96197d7deb8263271d420d138af7f11
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.sts b/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.sts
deleted file mode 100644
index ca7cc661..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.sts
+++ /dev/null
@@ -1,4 +0,0 @@
-AWS4-HMAC-SHA256
-20150830T123600Z
-20150830/us-east-1/service/aws4_request
-9d659678c1756bb3113e2ce898845a0a79dbbc57b740555917687f1b3340fbbd
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla-query/post-vanilla-query.authz b/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla-query/post-vanilla-query.authz
deleted file mode 100644
index 44280cd7..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla-query/post-vanilla-query.authz
+++ /dev/null
@@ -1 +0,0 @@
-AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=28038455d6de14eafc1f9222cf5aa6f1a96197d7deb8263271d420d138af7f11
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla-query/post-vanilla-query.creq b/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla-query/post-vanilla-query.creq
deleted file mode 100644
index f5058d43..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla-query/post-vanilla-query.creq
+++ /dev/null
@@ -1,8 +0,0 @@
-POST
-/
-Param1=value1
-host:example.amazonaws.com
-x-amz-date:20150830T123600Z
-
-host;x-amz-date
-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla-query/post-vanilla-query.req b/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla-query/post-vanilla-query.req
deleted file mode 100644
index 9157bc74..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla-query/post-vanilla-query.req
+++ /dev/null
@@ -1,3 +0,0 @@
-POST /?Param1=value1 HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla-query/post-vanilla-query.sreq b/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla-query/post-vanilla-query.sreq
deleted file mode 100644
index 82af1505..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla-query/post-vanilla-query.sreq
+++ /dev/null
@@ -1,4 +0,0 @@
-POST /?Param1=value1 HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
-Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=28038455d6de14eafc1f9222cf5aa6f1a96197d7deb8263271d420d138af7f11
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla-query/post-vanilla-query.sts b/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla-query/post-vanilla-query.sts
deleted file mode 100644
index ca7cc661..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla-query/post-vanilla-query.sts
+++ /dev/null
@@ -1,4 +0,0 @@
-AWS4-HMAC-SHA256
-20150830T123600Z
-20150830/us-east-1/service/aws4_request
-9d659678c1756bb3113e2ce898845a0a79dbbc57b740555917687f1b3340fbbd
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla/post-vanilla.authz b/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla/post-vanilla.authz
deleted file mode 100644
index 89e572e6..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla/post-vanilla.authz
+++ /dev/null
@@ -1 +0,0 @@
-AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5da7c1a2acd57cee7505fc6676e4e544621c30862966e37dddb68e92efbe5d6b
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla/post-vanilla.creq b/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla/post-vanilla.creq
deleted file mode 100644
index 5c3a9434..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla/post-vanilla.creq
+++ /dev/null
@@ -1,8 +0,0 @@
-POST
-/
-
-host:example.amazonaws.com
-x-amz-date:20150830T123600Z
-
-host;x-amz-date
-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla/post-vanilla.req b/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla/post-vanilla.req
deleted file mode 100644
index 3dc41790..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla/post-vanilla.req
+++ /dev/null
@@ -1,3 +0,0 @@
-POST / HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla/post-vanilla.sreq b/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla/post-vanilla.sreq
deleted file mode 100644
index a5ada0d9..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla/post-vanilla.sreq
+++ /dev/null
@@ -1,4 +0,0 @@
-POST / HTTP/1.1
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
-Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5da7c1a2acd57cee7505fc6676e4e544621c30862966e37dddb68e92efbe5d6b
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla/post-vanilla.sts b/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla/post-vanilla.sts
deleted file mode 100644
index a6367039..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-vanilla/post-vanilla.sts
+++ /dev/null
@@ -1,4 +0,0 @@
-AWS4-HMAC-SHA256
-20150830T123600Z
-20150830/us-east-1/service/aws4_request
-553f88c9e4d10fc9e109e2aeb65f030801b70c2f6468faca261d401ae622fc87
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.authz b/tests/unit/sigv4/aws-sig-v4-test-suite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.authz
deleted file mode 100644
index 531b89b4..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.authz
+++ /dev/null
@@ -1 +0,0 @@
-AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=1a72ec8f64bd914b0e42e42607c7fbce7fb2c7465f63e3092b3b0d39fa77a6fe
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.creq b/tests/unit/sigv4/aws-sig-v4-test-suite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.creq
deleted file mode 100644
index 8ec0d6cf..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.creq
+++ /dev/null
@@ -1,9 +0,0 @@
-POST
-/
-
-content-type:application/x-www-form-urlencoded; charset=utf8
-host:example.amazonaws.com
-x-amz-date:20150830T123600Z
-
-content-type;host;x-amz-date
-9095672bbd1f56dfc5b65f3e153adc8731a4a654192329106275f4c7b24d0b6e
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.req b/tests/unit/sigv4/aws-sig-v4-test-suite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.req
deleted file mode 100644
index 5ce537e6..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-x-www-form-urlencoded-parameters/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
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
-
-Param1=value1
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.sreq b/tests/unit/sigv4/aws-sig-v4-test-suite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.sreq
deleted file mode 100644
index 88beb82a..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.sreq
+++ /dev/null
@@ -1,7 +0,0 @@
-POST / HTTP/1.1
-Content-Type:application/x-www-form-urlencoded; charset=utf8
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
-Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=1a72ec8f64bd914b0e42e42607c7fbce7fb2c7465f63e3092b3b0d39fa77a6fe
-
-Param1=value1
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.sts b/tests/unit/sigv4/aws-sig-v4-test-suite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.sts
deleted file mode 100644
index 3e83c524..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.sts
+++ /dev/null
@@ -1,4 +0,0 @@
-AWS4-HMAC-SHA256
-20150830T123600Z
-20150830/us-east-1/service/aws4_request
-2e1cf7ed91881a30569e46552437e4156c823447bf1781b921b5d486c568dd1c
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.authz b/tests/unit/sigv4/aws-sig-v4-test-suite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.authz
deleted file mode 100644
index d7baf535..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.authz
+++ /dev/null
@@ -1 +0,0 @@
-AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=ff11897932ad3f4e8b18135d722051e5ac45fc38421b1da7b9d196a0fe09473a
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.creq b/tests/unit/sigv4/aws-sig-v4-test-suite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.creq
deleted file mode 100644
index d7197f17..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.creq
+++ /dev/null
@@ -1,9 +0,0 @@
-POST
-/
-
-content-type:application/x-www-form-urlencoded
-host:example.amazonaws.com
-x-amz-date:20150830T123600Z
-
-content-type;host;x-amz-date
-9095672bbd1f56dfc5b65f3e153adc8731a4a654192329106275f4c7b24d0b6e
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.req b/tests/unit/sigv4/aws-sig-v4-test-suite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.req
deleted file mode 100644
index ada7f877..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.req
+++ /dev/null
@@ -1,6 +0,0 @@
-POST / HTTP/1.1
-Content-Type:application/x-www-form-urlencoded
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
-
-Param1=value1
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.sreq b/tests/unit/sigv4/aws-sig-v4-test-suite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.sreq
deleted file mode 100644
index 9bac9311..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.sreq
+++ /dev/null
@@ -1,7 +0,0 @@
-POST / HTTP/1.1
-Content-Type:application/x-www-form-urlencoded
-Host:example.amazonaws.com
-X-Amz-Date:20150830T123600Z
-Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=ff11897932ad3f4e8b18135d722051e5ac45fc38421b1da7b9d196a0fe09473a
-
-Param1=value1
\ No newline at end of file
diff --git a/tests/unit/sigv4/aws-sig-v4-test-suite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.sts b/tests/unit/sigv4/aws-sig-v4-test-suite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.sts
deleted file mode 100644
index 65ab6637..00000000
--- a/tests/unit/sigv4/aws-sig-v4-test-suite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.sts
+++ /dev/null
@@ -1,4 +0,0 @@
-AWS4-HMAC-SHA256
-20150830T123600Z
-20150830/us-east-1/service/aws4_request
-42a5e5bb34198acb3e84da4f085bb7927f2bc277ca766e6d19c73c2154021281
\ No newline at end of file
diff --git a/tests/unit/sigv4/sigv4.pro b/tests/unit/sigv4/sigv4.pro
deleted file mode 100644
index d6bf65a8..00000000
--- a/tests/unit/sigv4/sigv4.pro
+++ /dev/null
@@ -1,12 +0,0 @@
-TARGET = testsigv4
-
-include(../../../config.pri)
-INCLUDEPATH += $$top_srcdir/libnymea-app-core
-LIBS += -L$$top_builddir/libnymea-app-core/ -lnymea-app-core
-
-QT += testlib network sql
-CONFIG += testcase
-
-DEFINES += TESTDATADIR=\\\"$${PWD}\/aws-sig-v4-test-suite\\\"
-
-SOURCES += testsigv4.cpp
diff --git a/tests/unit/sigv4/testsigv4.cpp b/tests/unit/sigv4/testsigv4.cpp
deleted file mode 100644
index 95f1418b..00000000
--- a/tests/unit/sigv4/testsigv4.cpp
+++ /dev/null
@@ -1,150 +0,0 @@
-#include
-
-#include "connection/sigv4utils.h"
-
-class TestSigV4: public QObject
-{
- Q_OBJECT
-public:
- TestSigV4(QObject* parent = nullptr);
-
-private slots:
- void canonicalRequest_data();
- void canonicalRequest();
-
-private:
- QString m_region = "us-east-1";
- QString m_service = "service";
- QByteArray m_accessKeyId = "AKIDEXAMPLE";
- QByteArray m_secretAccessKey = "wJalrXUtnFEMI/K7MDENG+bPxRfiCYEXAMPLEKEY";
-};
-
-Q_DECLARE_METATYPE(QNetworkAccessManager::Operation)
-
-TestSigV4::TestSigV4(QObject *parent): QObject(parent)
-{
-}
-
-void TestSigV4::canonicalRequest_data() {
- QTest::addColumn("method");
- QTest::addColumn("dateTime");
- QTest::addColumn("request");
- QTest::addColumn("payload");
- QTest::addColumn("expectedCanonicalRequest");
- QTest::addColumn("expectedStringToSign");
- QTest::addColumn("expectedSignature");
-
-
- QDir dir(TESTDATADIR);
- foreach (const QString &subDirName, dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot)) {
- QDir subDir(QString(TESTDATADIR) + '/' + subDirName);
- if(subDir.entryList({"*.req"}).count() != 1) {
- qWarning() << "Skipping folder:" << subDir.absolutePath();
- continue;
- }
- QFile f(subDir.entryInfoList({"*.req"}).first().absoluteFilePath());
- f.open(QFile::ReadOnly);
-
- // line 1, read operation and path
- QByteArray line = f.readLine();
- QByteArray methodString = line.split(' ').first();
- QNetworkAccessManager::Operation operation;
- if (methodString == "GET") {
- operation = QNetworkAccessManager::GetOperation;
- } else if (methodString == "POST") {
- operation = QNetworkAccessManager::PostOperation;
- }
- QByteArray path = line.split(' ').at(1);
-
-
-
- QNetworkRequest request;
- QByteArray host;
- QByteArray dateTime;
-
- // read headers
- QByteArray lastHeaderName;
- while (!f.atEnd()) {
- QByteArray line = f.readLine().trimmed();
- if (line.isEmpty()) {
- break;
- }
- QByteArray header = QString(line).replace(QRegExp("[\\ ]{1,}"), " ").toUtf8();
- if (!header.contains(':')) {
- request.setRawHeader(lastHeaderName, request.rawHeader(lastHeaderName) + ',' + header);
- continue;
- }
- QByteArray headerName = header.split(':').first().trimmed();
- QByteArray headerValue = header.split(':').last().trimmed();
- qDebug() << "working on header:" << headerName << headerValue;
- if (headerName == "Host") {
- host = headerValue;
- }
- if (headerName == "X-Amz-Date") {
- dateTime = headerValue;
- }
- if (!request.hasRawHeader(headerName)) {
- request.setRawHeader(headerName, headerValue);
- } else {
- request.setRawHeader(headerName, request.rawHeader(headerName) + ',' + headerValue);
- }
- lastHeaderName = headerName;
- }
-
- QByteArray payload;
- if (!f.atEnd()) {
- payload = f.readAll();
- }
-
- QUrl url = QUrl(QString("https://" + host + path));
- request.setUrl(url);
-
- // read creq file
- QFile creq(subDir.entryInfoList({"*.creq"}).first().absoluteFilePath());
- creq.open(QFile::ReadOnly);
-
- // read sts file
- QFile sts(subDir.entryInfoList({"*.sts"}).first().absoluteFilePath());
- sts.open(QFile::ReadOnly);
-
- // read authz file
- QFile authz(subDir.entryInfoList({"*.authz"}).first().absoluteFilePath());
- authz.open(QFile::ReadOnly);
-
- QTest::newRow(f.fileName().split('/').last().toUtf8()) << operation << dateTime << request << payload << creq.readAll() << sts.readAll() << authz.readAll();
- }
-
-
-}
-
-void TestSigV4::canonicalRequest()
-{
- QFETCH(QNetworkAccessManager::Operation, method);
- QFETCH(QByteArray, dateTime);
- QFETCH(QNetworkRequest, request);
- QFETCH(QByteArray, payload);
- QFETCH(QByteArray, expectedCanonicalRequest);
- QFETCH(QByteArray, expectedStringToSign);
- QFETCH(QByteArray, expectedSignature);
-
- qDebug() << "Request:" << request.url() << "Host:" << request.url().host() << "Path:" << request.url().path() << "Query:" << request.url().query();
- QByteArray canonicalRequest = SigV4Utils::getCanonicalRequest(method, request, payload);
-
- QCOMPARE(canonicalRequest, expectedCanonicalRequest);
-
- QByteArray stringTosign = SigV4Utils::getStringToSign(canonicalRequest, dateTime, m_region.toUtf8(), m_service.toUtf8());
-
- QCOMPARE(stringTosign, expectedStringToSign);
-
- QByteArray signature = SigV4Utils::getSignature(stringTosign, m_secretAccessKey, dateTime, m_region, m_service);
-
- QByteArray signHeader = SigV4Utils::getAuthorizationHeader(m_accessKeyId, dateTime, m_region, m_service, request, signature);
-
- QCOMPARE(signHeader, expectedSignature);
-// qDebug() << "CanonicalRequest" << canonicalRequest;
-
-}
-
-#include "testsigv4.moc"
-QTEST_MAIN(TestSigV4)
-
diff --git a/tests/unit/unit.pro b/tests/unit/unit.pro
deleted file mode 100644
index ecab530c..00000000
--- a/tests/unit/unit.pro
+++ /dev/null
@@ -1,4 +0,0 @@
-TEMPLATE = subdirs
-
-SUBDIRS += sigv4
-