[Bug]: Kernel download ignores credentials in HTTPS_PROXY and fails with proxyAuthenticationRequired
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 76/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- swift
- 領域
- networking
調査の方向性
issue で指摘されているプロキシ設定の行から、Sources/Services/ContainerAPIService/Client/FileDownloader.swift の調査を始めてください。プロキシ URL の認証情報を AsyncHTTPClient にどう渡せるかを確認します。報告された再現手順では、Basic 認証付きの HTTPS_PROXY と container system start --enable-kernel-install を使用しています。カーネルのダウンロードがプロキシ経由で認証に成功すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- Swift
- スター
- 51.9k
- フォーク
- 1.8k
- 平均マージ
- 2日 3時間
- マージ済み PR(30日)
- 27
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apple/container のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
[Bug]: `container machine logs -f` exits immediately when the log is empty対応中かも @srivilliamsai が 5 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
apple/container#2492 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: Intermittent failure in PathUtilsTests.testNewDirectoryIsExcludedAndExistingChoiceIsKeptオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
apple/container#2474 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
[Request]: container ls --filter label=key=value対応中かも @kavix が 21 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
apple/container#2403 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Request]: Improve robustness and path resolution in ensure-hawkeye.sh対応中かも @denizguney が 45 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
apple/container の issue をすべて見る
似ている issue
-
compiler diagnostics quality ownership SIL ownership
難易度 1/5 1時間未満 初心者へのやさしさ 64/100
メンテナーはふだん 1 日以内に返信
-
T-Defect
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
element-hq/element-x-ios#6536 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
fxios-coreexperience
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
mozilla-mobile/firefox-ios#36661 ·
メンテナーはふだん 1 日以内に返信
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
manaflow-ai/cmux#45713 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信