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 JDBC driver logging passwords in plain text. #1571

Closed
xfiodembo opened this issue Mar 20, 2024 · 0 comments · Fixed by #1607
Closed

Clickhouse JDBC driver logging passwords in plain text. #1571

xfiodembo opened this issue Mar 20, 2024 · 0 comments · Fixed by #1607
Assignees
Labels

Comments

@xfiodembo
Copy link

Describe the bug

Not quite a bug however can be a security issue. The jdbc driver is logging passwords in plain text.

Steps to reproduce

  1. Log at debug level
  2. Make a connection via clickhouse jdbc driver (I am using it in flyway)

Expected behaviour

user credentials should not be logged. unless set to do so explicitly

Error log



{"logger":"com.clickhouse.client.http.ClickHouseHttpConnectionFactory","level":"WARN","message":"Error when creating APACHE_HTTP_CLIENT, fall back to HTTP_URL_CONNECTION"}
{"logger":"com.clickhouse.client.http.ClickHouseHttpConnection","level":"DEBUG","message":"url [http://clickhouse-release:8123/?compress=1&extremes=0]"}
{"logger":"com.clickhouse.client.AbstractClient","level":"DEBUG","message":"Connection established: com.clickhouse.client.http.HttpUrlConnectionImpl@65ae095c"}
{"logger":"com.clickhouse.client.http.ClickHouseHttpClient","level":"DEBUG","message":"Query: select 1"}
{"logger":"com.clickhouse.client.http.HttpUrlConnectionImpl","level":"DEBUG","message":"Adding header key [accept] value [*/*]"}
{"logger":"com.clickhouse.client.http.HttpUrlConnectionImpl","level":"DEBUG","message":"Adding header key [user-agent] value [ClickHouse-JdbcDriver/unknown (Linux/6.2.0-1012-aws; OpenJDK 64-Bit Server VM/Temurin-21.0.2+13; HttpURLConnection; rv:unknown)]"}
{"logger":"com.clickhouse.client.http.HttpUrlConnectionImpl","level":"DEBUG","message":"Adding header key [x-clickhouse-user] value [my user]"}
{"logger":"com.clickhouse.client.http.HttpUrlConnectionImpl","level":"DEBUG","message":"Adding header key [x-clickhouse-key] value [my password]"}
{"logger":"com.clickhouse.client.http.HttpUrlConnectionImpl","level":"DEBUG","message":"Adding header key [x-clickhouse-database] value [my user name]"}
{"logger":"com.clickhouse.client.http.HttpUrlConnectionImpl","level":"DEBUG","message":"Adding header key [x-clickhouse-format] value [RowBinaryWithNamesAndTypes]"}
{"logger":"com.clickhouse.client.http.HttpUrlConnectionImpl","level":"DEBUG","message":"Adding header key [accept-encoding] value [lz4]"}
{"logger":"com.clickhouse.client.http.HttpUrlConnectionImpl","level":"DEBUG","message":"http response code [200]"}
{"logger":"com.clickhouse.client.ClickHouseStreamResponse","level":"DEBUG","message":"10 bytes skipped before closing input stream"}
{"logger":"org.flywaydb.core.FlywayExecutor","level":"DEBUG","message":"Memory usage: 15 of 24M"}
@xfiodembo xfiodembo added the bug label Mar 20, 2024
@chernser chernser self-assigned this Mar 28, 2024
@chernser chernser mentioned this issue Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants