[Bug]: Kernel download ignores credentials in HTTPS_PROXY and fails with proxyAuthenticationRequired
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ó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 76/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ừ Sources/Services/ContainerAPIService/Client/FileDownloader.swift, tại dòng cấu hình proxy được nêu trong issue, và kiểm tra cách truyền thông tin xác thực trong URL proxy vào AsyncHTTPClient. Bước tái hiện được báo cáo dùng HTTPS_PROXY với Basic auth và container system start --enable-kernel-install; hoàn thành khi việc tải kernel xác thực thành công qua proxy.
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
Starting state: container 1.7.1 from Homebrew, run as a macOS user that has never used container. There is no ~/Library/Application Support/com.apple.container, and container system status reports apiserver is not running and not registered with launchd.
A local proxy on 127.0.0.1:18080 requires Basic auth with repro:secret.
- Check that the proxy works for a client that sends the credentials:
$ HTTPS_PROXY=http://repro:[email protected]:18080 curl -sS -o /dev/null -w "%{http_code}\n" https://github.com/kata-containers/kata-containers/releases 200 - Start
containerwith the same proxy:$ HTTPS_PROXY=http://repro:[email protected]:18080 container system start --enable-kernel-install Launching container-apiserver... Testing access to container-apiserver... Verifying machine API server is running... Installing kernel... Error: HTTPClientError.proxyAuthenticationRequired $ echo $? 1
It happens every time.
Problem description
The kernel download never sends a Proxy-Authorization header. The proxy keeps the connection open after each 407, but its log shows 20 CONNECTs over about 30 seconds, all without credentials:
23:32:45 CONNECT github.com:443 Proxy-Authorization=absent -> 407
...
23:33:14 CONNECT github.com:443 Proxy-Authorization=absent -> 407
Expected: the user and password in the proxy URL are sent as Basic proxy auth, as curl does with the same HTTPS_PROXY.
Sources/Services/ContainerAPIService/Client/FileDownloader.swift keeps only the proxy's host and port. The line is the same in 1.7.1 and on main:
httpConfiguration.proxy = HTTPClient.Configuration.Proxy.server(host: proxyHost, port: proxyURL.port ?? 8080)
AsyncHTTPClient can take the credentials with .server(host:port:authorization: .basic(username:password:)).
Image pulls have the same problem in containerization's RegistryClient: apple/containerization#1012.
CONTAINER_DEBUG=1 adds no output, and container system logs --last 10m has no related entries.
Environment
- OS: macOS 27.2 (26B123)
- Xcode: not installed (Command Line Tools 27.0)
- Container: container CLI version 1.7.1 (build: release, commit: unspeci), Homebrew `container` 1.7.1_1
Code of Conduct
- I agree to follow this project's Code of Conduct
- Ngôn ngữ chính
- Swift
- Star
- 51.9k
- Fork
- 1.8k
- Merge trung bình
- 2 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 27
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- 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/container
-
Độ 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
-
[Bug]: `container machine logs -f` exits immediately when the log is emptyCó thể đã có người làm @srivilliamsai đã nhận 5 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
apple/container#2492 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: Intermittent failure in PathUtilsTests.testNewDirectoryIsExcludedAndExistingChoiceIsKeptĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
apple/container#2474 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Request]: container ls --filter label=key=valueCó thể đã có người làm @kavix đã nhận 21 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
apple/container#2403 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Request]: Improve robustness and path resolution in ensure-hawkeye.shCó thể đã có người làm @denizguney đã nhận 45 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của apple/container
Issue tương tự
-
compiler diagnostics quality ownership SIL ownership
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 1 ngày
-
T-Defect
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
element-hq/element-x-ios#6536 ·
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