Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLICKHOUSE-3832: Add HTTP Basic authentification in replication protocol #2727

Merged
merged 6 commits into from
Jul 26, 2018

Conversation

alesapin
Copy link
Member

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

String password = config().getString("interserver_http_credentials.password", "");

if (user.empty())
throw Exception("Empty interserver_http_credentials user can't be empty");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error code

@@ -230,6 +230,17 @@ int Server::main(const std::vector<std::string> & /*args*/)
global_context->setInterserverIOAddress(this_host, port);
}

if (config().has("interserver_http_credentials.user"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe config().has("interserver_http_credentials") is better.

@@ -65,8 +92,18 @@ void InterserverIOHTTPHandler::handleRequest(Poco::Net::HTTPServerRequest & requ

try
{
processQuery(request, response);
LOG_INFO(log, "Done processing query");
if (auto [msg, success] = checkAuthentication(request); success)
Copy link
Member

@alexey-milovidov alexey-milovidov Jul 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

msg is unused.

... or is it visible in else?

Copy link
Member Author

@alesapin alesapin Jul 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's visible inside else branch.

@alexey-milovidov alexey-milovidov merged commit 24b0be2 into ClickHouse:master Jul 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants