[Bug]: RegistryClient ignores credentials in HTTPS_PROXY, so image pulls fail with proxyAuthenticationRequired
Maintainer thường phản hồi trong vòng 2 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 68/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ệ
- swift
- Lĩnh vực
- networking
Hướng nghiên cứu
Bắt đầu tại RegistryClient, nơi httpConfiguration.proxy được thiết lập từ host và port của proxy, rồi tìm nơi HTTPS_PROXY được đọc và phân tích. Chuyển username và password từ URL proxy vào HTTPClient.Configuration.Proxy.server(host:port:authorization:) bằng .basic(username:password:). Hoàn thành khi một yêu cầu qua proxy yêu cầu xác thực Basic gửi header Proxy-Authorization, và một URL proxy không có thông tin xác thực hoạt động như trước.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I have done the following
- I have searched the existing issues
- If possible, I've reproduced the issue using the 'main' branch of this project
Steps to reproduce
I reproduced this through container 1.7.1, which pins containerization at baf212e. The setup is the same as apple/container#2499: a user that has never used container, and a local proxy on 127.0.0.1:18080 that requires Basic auth with repro:secret. curl gets a 200 through the same proxy URL.
$ HTTPS_PROXY=http://repro:[email protected]:18080 container system start --disable-kernel-install
$ container image pull --progress plain docker.io/library/alpine:3.20
[1/2] Fetching image [43s]
Error: HTTPClientError.proxyAuthenticationRequired
The services that system start launches inherit HTTPS_PROXY, so the pull goes through the proxy. With the services started without the proxy, the same pull succeeds. It happens every time.
Current behavior
RegistryClient never sends a Proxy-Authorization header. It keeps only the proxy's host and port. The line is the same at baf212e and on main:
httpConfiguration.proxy = HTTPClient.Configuration.Proxy.server(host: proxyHost, port: proxyPort)
Current behavior
RegistryClient never sends a Proxy-Authorization header. It keeps only the proxy's host and port. The line is the same at baf212e and on main:
httpConfiguration.proxy = HTTPClient.Configuration.Proxy.server(host: proxyHost, port: proxyPort)
Expected behavior
The user and password in the proxy URL are sent as Basic proxy auth, as curl does with the same variable. AsyncHTTPClient accepts them with .server(host:port:authorization: .basic(username:password:)).
Environment
- OS: macOS 27.2 (26B123)
- Xcode: not installed (Command Line Tools 27.0)
- Swift: Apple Swift version 6.4 (swiftlang-6.4.0.34.1 clang-2100.3.34.1)
- Containerization: `baf212e`, through container CLI 1.7.1 (Homebrew)
Relevant log output
The proxy log shows 21 CONNECTs over about 40 seconds, none with credentials, although the proxy keeps the connection open after each 407:
23:33:15 CONNECT registry-1.docker.io:443 Proxy-Authorization=absent -> 407
...
23:33:53 CONNECT registry-1.docker.io:443 Proxy-Authorization=absent -> 407
Code of Conduct
- I agree to follow this project's Code of Conduct
- Ngôn ngữ chính
- Swift
- Star
- 9k
- Fork
- 412
- Merge trung bình
- 3 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 12
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của apple/containerization
-
[Bug]: archive ownership changes clear set-ID permission bitsCó thể đã có người làm @maksim-romanov đã nhận 100 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
apple/containerization#819 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[Bug]: archive extraction strips special permission bitsCó thể đã có người làm @maksim-romanov đã nhận 100 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
apple/containerization#818 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
LinuxContainer.create() leaks the VZ VM/XPC process when vm.start() throws — no do/catch around itCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
apple/containerization#804 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[Bug]: TimeSyncer steps the guest clock backward every 30 s, and the first sync steps it by up to ±0.5 sCó thể đã có người làm @castlemilk đã nhận 1 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 46/100
apple/containerization#1019 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 65/100
apple/containerization#1017 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của apple/containerization
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Switch to new string APIĐang mởfxios-coreexperience
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
mozilla-mobile/firefox-ios#36661 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
manaflow-ai/cmux#45713 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Save the clothespinsĐang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
alejandrobujan/tendedero#151 ·
Maintainer thường phản hồi trong vòng 2 ngày