Altinity / Altinity/clickhouse-operator
HTTP requests fail if password contains reserved characters
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 2.6k
- Forks
- 574
- Avg merge
- 8d 6h
- Merged PRs (30d)
- 6
Description
If the clickhouse_operator password contains a # character, HTTP requests using basic auth fail with a parse error.
It appears the metrics-exporter is not properly percent/URL-encoding.
E0916 22:38:06.764842 1 connection.go:90] connect():FAILED Ping(http://clickhouse_operator:***@HOSTNAME:8123/). Err: parse "http://clickhouse_operator:cs": invalid port ":cs" after host
In this case the password started with cs#.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at connection.go:90 in the metrics-exporter, where the failed Ping request is logged, and reproduce the request with a password containing # or another reserved character. Trace how the ClickHouse HTTP basic-auth URL is assembled; done means reserved password characters are encoded correctly and the request succeeds without a parse error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clickhouse, go, kubernetes
- Domain
- backend, databases, observability
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100