[Bug]: RegistryClient ignores credentials in HTTPS_PROXY, so image pulls fail with proxyAuthenticationRequired
Maintainer antworten meist innerhalb von 2 Tagen
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 68/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- swift
- Bereich
- networking
Rechercherichtung
Beginne bei RegistryClient, wo httpConfiguration.proxy aus Proxy-Host und Port gesetzt wird, und finde, wo HTTPS_PROXY gelesen und geparst wird. Übernimm Benutzername und Passwort aus der Proxy-URL in HTTPClient.Configuration.Proxy.server(host:port:authorization:) mit .basic(username:password:). Fertig ist es, wenn eine Anfrage über einen Proxy, der Basic-Authentifizierung verlangt, einen Proxy-Authorization-Header sendet, und eine Proxy-URL ohne Zugangsdaten sich wie bisher verhält.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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
- Vorherrschende Sprache
- Swift
- Sterne
- 9k
- Forks
- 412
- Ø Merge
- 3 T. 10 Std.
- Gemergte PRs (30 T.)
- 12
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus apple/containerization
-
[Bug]: archive ownership changes clear set-ID permission bitsEvtl. vergeben @maksim-romanov hat das vor 101 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
apple/containerization#819 · 1 Kommentar · 1 Reaktion ·
Maintainer antworten meist innerhalb von 2 Tagen
-
[Bug]: archive extraction strips special permission bitsEvtl. vergeben @maksim-romanov hat das vor 101 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
apple/containerization#818 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 2 Tagen
-
LinuxContainer.create() leaks the VZ VM/XPC process when vm.start() throws — no do/catch around itEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
apple/containerization#804 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 2 Tagen
-
[Bug]: TimeSyncer steps the guest clock backward every 30 s, and the first sync steps it by up to ±0.5 sEvtl. vergeben @castlemilk hat das vor 1 Tag übernommen. Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 46/100
apple/containerization#1019 · 1 Kommentar · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 65/100
apple/containerization#1017 ·
Maintainer antworten meist innerhalb von 2 Tagen
Alle Issues in apple/containerization
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 1 Tag
-
compiler diagnostics quality ownership SIL ownership
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 64/100
Maintainer antworten meist innerhalb von 1 Tag
-
T-Defect
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
element-hq/element-x-ios#6536 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
Switch to new string APIOffenfxios-coreexperience
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
mozilla-mobile/firefox-ios#36661 ·
Maintainer antworten meist innerhalb von 1 Tag