Skip to content
Open
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
6 changes: 2 additions & 4 deletions programs/client/Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,7 @@ void Client::login()
{
throw Exception(
ErrorCodes::BAD_ARGUMENTS,
"Could not retrieve authentication endpoints for host '{}'. Please specify --oauth-url and --oauth-client-id if you are "
"not using ClickHouse Cloud.",
"Could not retrieve authentication endpoints for host '{}'. Please specify --oauth-url and --oauth-client-id.",
host);
}

Expand Down Expand Up @@ -732,8 +731,7 @@ void Client::addExtraOptions(OptionsDescription & options_description)
("login", po::value<std::string>()->implicit_value(""),
"Authenticate via OAuth2. Optional mode: 'browser' (auth-code + PKCE, opens browser) "
"or 'device' (device flow, prints URL + code). "
"Example: --login=browser or --login=device. "
"Bare --login uses the ClickHouse Cloud auto-login path.")
"Example: --login=browser or --login=device.")
("oauth-credentials", po::value<std::string>(),
"Path to OAuth credentials JSON file "
"(default: ~/.clickhouse-client/oauth_client.json)")
Expand Down
3 changes: 0 additions & 3 deletions src/Access/AccessControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -657,9 +657,6 @@ AuthResult AccessControl::authenticate(const Credentials & credentials, const Po

message << R"(

If you use ClickHouse Cloud, the password can be reset at https://clickhouse.cloud/
on the settings page for the corresponding service.

If you have installed ClickHouse and forgot password you can reset it in the configuration file.
The password for default user is typically located at /etc/clickhouse-server/users.d/default-password.xml
and deleting this file will reset the password.
Expand Down
4 changes: 2 additions & 2 deletions src/Client/CloudJWTProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ void CloudJWTProvider::exchangeIdPTokenForClickHouseJWT(bool show_messages)
if (!endpoints)
throw Exception(
ErrorCodes::BAD_ARGUMENTS,
"Cannot determine token exchange endpoint from hostname {}. Please provide a ClickHouse Cloud hostname.",
"Cannot determine token exchange endpoint from hostname {}.",
host_str);

Poco::URI exchange_url = Poco::URI(endpoints->api_host + "/.api/auth/tokenExchange");
Expand Down Expand Up @@ -172,7 +172,7 @@ void CloudJWTProvider::exchangeIdPTokenForClickHouseJWT(bool show_messages)
clickhouse_jwt_expires_at = Poco::Timestamp::fromEpochTime(jwt::decode(clickhouse_jwt).get_payload_claim("exp").as_integer());

if (show_messages)
output_stream << "Authenticated with ClickHouse Cloud.\n" << std::endl;
output_stream << "Authenticated.\n" << std::endl;
}

}
Expand Down
3 changes: 1 addition & 2 deletions src/Core/Settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6222,8 +6222,7 @@ This setting takes a ClickHouse version number as a string, like `22.3`, `22.8`.
Disabled by default.

:::note
In ClickHouse Cloud, the service-level default compatibility setting must be set by ClickHouse Cloud support. Please [open a case](https://clickhouse.cloud/support) to have it set.
However, the compatibility setting can be overridden at the user, role, profile, query, or session level using standard ClickHouse setting mechanisms such as `SET compatibility = '22.3'` in a session or `SETTINGS compatibility = '22.3'` in a query.
The compatibility setting can be overridden at the user, role, profile, query, or session level using standard ClickHouse setting mechanisms such as `SET compatibility = '22.3'` in a session or `SETTINGS compatibility = '22.3'` in a query.
:::
)", 0) \
\
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
1
< HTTP/1.1 403 Forbidden
If you use ClickHouse Cloud, the password can be reset at https://clickhouse.cloud/
< HTTP/1.1 403 Forbidden
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ ${CLICKHOUSE_CURL} -H 'Authorization: never' "$URL?query=SELECT%201"
# If the Authorization is set to "never", and the credentials are provided in URL parameters,
# the server will return 403 instead of 401 Unauthorized, so there will be no prompt in the browser.
URL="${CLICKHOUSE_PORT_HTTP_PROTO}://${CLICKHOUSE_HOST}:${CLICKHOUSE_PORT_HTTP}/?user=default&password=invalid_password"
${CLICKHOUSE_CURL} -H 'Authorization: never' -v "$URL?query=SELECT%201" 2>&1 | grep -P '403 Forbidden|ClickHouse Cloud'
${CLICKHOUSE_CURL} -H 'Authorization: never' -v "$URL?query=SELECT%201" 2>&1 | grep -P '403 Forbidden'
Loading