Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

ClickHouse retry logs print CLICKHOUSE_URL with its password

Đang mở Phù hợp với người mới
#551 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
92/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript

Hướng nghiên cứu

Bắt đầu với việc ghi log thử lại trong packages/db/src/clickhouse/round-robin.ts và xem lại maskUrlCredentials trong client.ts. Hai lệnh ghi log được nêu phải sử dụng URL đã che thay vì slot.url. Xác minh bằng cách tái hiện thử lại rằng log của API và worker vẫn giữ URL của node nhưng bỏ qua thông tin xác thực của nó.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

When a ClickHouse request is retried, the round-robin client logs the node's URL exactly as configured. If CLICKHOUSE_URL carries credentials (http://user:password@host:8123/db, the form the self-hosting docs use), the password ends up in the logs of the api and the worker.

Where (main, a887576): packages/db/src/clickhouse/round-robin.ts

  • logger.info({ url: slot.url, attempt }, 'CH operation succeeded after retry') (~line 305)
  • logger.warn({ ..., url: slot.url, ... }, 'CH node unreachable; ...') (~line 340)

slot.url comes from new RoundRobinPicker(clients, clickhouseUrls, ...) in client.ts (line 192), which gets the raw URLs. maskUrlCredentials already exists in client.ts but is only applied to the urls reported at line 217.

To reproduce: set CLICKHOUSE_URL=http://openpanel:secret@clickhouse:8123/openpanel and restart ClickHouse while the worker is running. The worker logs "url":"http://openpanel:secret@clickhouse:8123/openpanel" on each retry.

Suggested fix: give the picker masked URLs for logging (or mask slot.url in those two log calls), as redactConnectionUrls now does for the migration banner.

On 2.3.0 (the current Docker Hub release) the migration banner also prints DATABASE_URL and CLICKHOUSE_URL unredacted. That is already fixed on main, but self-hosters on 2.3.0 are exposed until a release ships it.

Ngôn ngữ chính
TypeScript
Star
7.1k
Fork
516
Merge trung bình
1 ngày 2 giờ
Pull request đã merge (30 ngày)
18

Chuẩn bị môi trường

  • Có Dockerfile hoặc tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Openpanel-dev/openpanel

Tất cả issue của Openpanel-dev/openpanel

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.