[Bug]: RegistryClient ignores credentials in HTTPS_PROXY, so image pulls fail with proxyAuthenticationRequired
Les mainteneurs répondent en général sous 2 jours
Évaluation
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Accessibilité débutants
- 68/100
- Type d'issue
- Bug
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- swift
- Domaine
- networking
Piste de recherche
Commence dans RegistryClient, où httpConfiguration.proxy est défini à partir de l'hôte et du port du proxy, puis cherche où HTTPS_PROXY est lu et analysé. Transmets le nom d'utilisateur et le mot de passe de l'URL du proxy à HTTPClient.Configuration.Proxy.server(host:port:authorization:) en utilisant .basic(username:password:). C'est terminé lorsqu'une requête passant par un proxy exigeant l'authentification Basic envoie un en-tête Proxy-Authorization, et qu'une URL de proxy sans identifiants se comporte comme auparavant.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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
- Langage dominant
- Swift
- Étoiles
- 9k
- Forks
- 412
- Merge moyen
- 3 j 10 h
- PR mergées (30 j)
- 12
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de apple/containerization
-
[Bug]: archive ownership changes clear set-ID permission bitsPeut-être pris @maksim-romanov l’a pris il y a 101 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
apple/containerization#819 · 1 commentaire · 1 réaction ·
Les mainteneurs répondent en général sous 2 jours
-
[Bug]: archive extraction strips special permission bitsPeut-être pris @maksim-romanov l’a pris il y a 101 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
apple/containerization#818 · 2 commentaires ·
Les mainteneurs répondent en général sous 2 jours
-
LinuxContainer.create() leaks the VZ VM/XPC process when vm.start() throws — no do/catch around itPeut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
apple/containerization#804 · 1 commentaire ·
Les mainteneurs répondent en général sous 2 jours
-
[Bug]: TimeSyncer steps the guest clock backward every 30 s, and the first sync steps it by up to ±0.5 sPeut-être pris @castlemilk l’a pris il y a 1 jour. Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 46/100
apple/containerization#1019 · 1 commentaire · 1 personne assignée ·
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 3/5 1-2 jours Accessibilité débutants 65/100
apple/containerization#1017 ·
Les mainteneurs répondent en général sous 2 jours
Toutes les issues de apple/containerization
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
Les mainteneurs répondent en général sous 1 jour
-
compiler diagnostics quality ownership SIL ownership
Difficulté 1/5 Moins d'une heure Accessibilité débutants 64/100
Les mainteneurs répondent en général sous 1 jour
-
T-Defect
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
element-hq/element-x-ios#6536 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
Switch to new string APIOuvertefxios-coreexperience
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
mozilla-mobile/firefox-ios#36661 ·
Les mainteneurs répondent en général sous 1 jour