You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to support SSL connection when using MongoDB integration engine?
Use Case
This will enable us to integrate securely with MongoDB servers from outside of ClickHouse private network. Besides, it will enable us to integrate with Azure CosmosDB (as it supports MongoDB interface, but it only comes with SSL enabled).
Context
When we tried to connect to an SSL secured MongoDB server from ClickHouse, ClickHouse was not responding (see this for more details), connecting to a MongoDB server without SSL connection was working fine.
Version 1
We tried a quick and dirty experiment to connect to our SSL secured MongoDB server like the way found in ClickHouse in src/Storages/StorageMongoDB.cpp.
Poco::MongoDB::Connection connection(MONGO_HOST, MONGO_PORT);
Poco::MongoDB::Database poco_db(MONGO_DATABASE_NAME);
if (!poco_db.authenticate(connection, MONGO_USERNAME, MONGO_PASSWORD, Poco::MongoDB::Database::AUTH_SCRAM_SHA1))
{
std::cout << "Cannot authenticate in MongoDB, incorrect user or password";
}
else
{
std::cout << "Authentication succeeded";
}
Running the previous code gave us a similar behavior - no response.
Fix looks ok, and follows the Poco recommended/documented way of doing it: "ssl: If ssl=true is specified, a custom SocketFactory subclass creating a SecureStreamSocket must be supplied."
Is it possible to support SSL connection when using
MongoDB
integration engine?Use Case
This will enable us to integrate securely with MongoDB servers from outside of ClickHouse private network. Besides, it will enable us to integrate with Azure CosmosDB (as it supports MongoDB interface, but it only comes with SSL enabled).
Context
When we tried to connect to an SSL secured MongoDB server from ClickHouse, ClickHouse was not responding (see this for more details), connecting to a MongoDB server without SSL connection was working fine.
Version 1
We tried a quick and dirty experiment to connect to our SSL secured MongoDB server like the way found in ClickHouse in
src/Storages/StorageMongoDB.cpp
.Running the previous code gave us a similar behavior - no response.
Version 2
By changing the code to be as follows:
We were able to connect successfully to our SSL secured MongoDB server.
The text was updated successfully, but these errors were encountered: