Can users set a fully custom User-Agent that completely replaces the default one, without appending the driver version?

Open
#2,935 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
java
Domain
api

Research direction

Start by tracing how the Java client constructs the User-Agent header and how client_name is applied. Check the existing client request tests, then verify that a fully custom value replaces the default header without appending the driver version.

Written by the indexing model from the issue text.

Description

area:general client-api-v2 enhancement
Use case

Security/compliance policies in some organizations require hiding internal client version information from server logs. Currently there is no way to do this from the client side.

Describe the solution you'd like

Allow setting a fully custom User-Agent that completely replaces the default one, without appending the driver version.

Describe the alternatives you've considered

When using the ClickHouse client to send requests to server, the User-Agent header always includes the driver version:User-Agent: ClickHouse-JavaClient/0.6.5 (OpenJDK 64-Bit Server VM/BiSheng_JDK_Enterprise_205.2.0.110.B001; Apache-HttpClient/5.3.4)

Using client_name can only prepend a custom prefix, but the driver version suffix is always appended at the end and cannot be removed.

Additional context
Dominant language
Java
Stars
1.6k
Forks
637
Avg merge
2d 12h
Merged PRs (30d)
28

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ClickHouse/clickhouse-java

All issues in ClickHouse/clickhouse-java

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.