Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/communication/cmconnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ void CMConnection::RunSecureChannel()

mCondVar.wait_for(lock, cConnectionTimeout, [this]() { return mShutdown.load(); });

LOG_DBG() << "Reconnect CM secure channel";

continue;
}

Expand Down
3 changes: 2 additions & 1 deletion src/config/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ IAMConfig ParseIAMConfig(const common::utils::CaseInsensitiveObjectWrapper& obje
{
return IAMConfig {
object.GetValue<std::string>("IAMPublicServerURL"),
object.GetValue<std::string>("IAMProtectedServerURL"),
object.GetValue<std::string>("IAMMainPublicServerURL"),
object.GetValue<std::string>("IAMMainProtectedServerURL"),
object.GetValue<std::string>("CertStorage"),
object.GetValue<int>("OpenPort"),
object.GetValue<int>("SecurePort"),
Expand Down
3 changes: 2 additions & 1 deletion src/config/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ struct VChanConfig {
*/
struct IAMConfig {
std::string mIAMPublicServerURL;
std::string mIAMProtectedServerURL;
std::string mIAMMainPublicServerURL;
std::string mIAMMainProtectedServerURL;
std::string mCertStorage;
int mOpenPort;
int mSecurePort;
Expand Down
2 changes: 1 addition & 1 deletion src/iamclient/publicnodeclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Error PublicNodeClient::Init(
return err;
}

mUrl = publicServer ? cfg.mIAMPublicServerURL : cfg.mIAMProtectedServerURL;
mUrl = publicServer ? cfg.mIAMMainPublicServerURL : cfg.mIAMMainProtectedServerURL;

return ErrorEnum::eNone;
}
Expand Down
6 changes: 4 additions & 2 deletions tests/config/config_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ class ConfigTest : public ::testing::Test {
"ImageStoreDir": "/path/to/images",
"IAMConfig": {
"IAMPublicServerURL": "localhost:8090",
"IAMProtectedServerURL": "localhost:8091",
"IAMMainPublicServerURL": "main:8090",
"IAMMainProtectedServerURL": "main:8091",
"CertStorage": "iam",
"OpenPort": 8080,
"SecurePort": 8081
Expand Down Expand Up @@ -96,7 +97,8 @@ TEST_F(ConfigTest, ParseConfig)
EXPECT_EQ(config.mImageStoreDir, "/path/to/images");

EXPECT_EQ(config.mIAMConfig.mIAMPublicServerURL, "localhost:8090");
EXPECT_EQ(config.mIAMConfig.mIAMProtectedServerURL, "localhost:8091");
EXPECT_EQ(config.mIAMConfig.mIAMMainPublicServerURL, "main:8090");
EXPECT_EQ(config.mIAMConfig.mIAMMainProtectedServerURL, "main:8091");
EXPECT_EQ(config.mIAMConfig.mCertStorage, "iam");
EXPECT_EQ(config.mIAMConfig.mOpenPort, 8080);
EXPECT_EQ(config.mIAMConfig.mSecurePort, 8081);
Expand Down
5 changes: 3 additions & 2 deletions tests/iamclient/iamclient_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ class IamClientTest : public Test {
public:
IamClientTest()
{
mConfig.mIAMConfig.mIAMPublicServerURL = "localhost:8002";
mConfig.mIAMConfig.mIAMProtectedServerURL = "localhost:8002";
mConfig.mIAMConfig.mIAMPublicServerURL = "localhost:8002";
mConfig.mIAMConfig.mIAMMainPublicServerURL = "localhost:8002";
mConfig.mIAMConfig.mIAMMainProtectedServerURL = "localhost:8002";
}

protected:
Expand Down
Loading