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

google-auth: connection leaks in urllib3 transport and metadata helper during mTLS updates

Đang mở
#17,755 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ó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
72/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
gcp, python
Lĩnh vực
backend, cloud

Hướng nghiên cứu

Đọc google/auth/transport/urllib3.py và google/auth/compute_engine/_metadata.py, bắt đầu với configure_mtls_channel và đường dẫn mount MdsMtlsAdapter cho từng request. Xác nhận rằng PoolManager cũ được dọn dẹp và metadata adapter được tái sử dụng hoặc đóng thay vì tích lũy socket, sau đó thêm hoặc chạy các kiểm thử hồi quy tập trung cho cả hai đường dẫn.

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

Mô tả

When mTLS is configured or dynamically updated, the SDK creates and mounts new HTTP adapters/transports but leaves the old ones hanging. While PR #17689 addressed this for the requests transport, the leak still exists in two other places:

  1. urllib3 transport (google/auth/transport/urllib3.py)
    In configure_mtls_channel, self.http = new_http replaces the old PoolManager. We need to call .clear() on the old PoolManager instance before overwriting it so that the active connection pool is cleaned up.

  2. Compute Engine metadata (google/auth/compute_engine/_metadata.py)
    If mTLS is enabled, _metadata.py instantiates and mounts a new MdsMtlsAdapter on the session for every single request. Overwriting the mounted adapter without closing the old one leaks sockets. We should either cache and reuse the adapter or close the old one before mounting.

Ngôn ngữ chính
Python
Star
5.4k
Fork
1.8k
Merge trung bình
2 ngày 12 giờ
Pull request đã merge (30 ngày)
143

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

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 googleapis/google-cloud-python

Tất cả issue của googleapis/google-cloud-python

Issue tương tự

Thêm issue về Python

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.