[Bug]: Kernel download ignores credentials in HTTPS_PROXY and fails with proxyAuthenticationRequired
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 76/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- swift
- Área
- networking
Línea de trabajo
Empieza en Sources/Services/ContainerAPIService/Client/FileDownloader.swift, en la línea de configuración del proxy identificada en el issue, y comprueba cómo se pueden pasar las credenciales de la URL del proxy a AsyncHTTPClient. La reproducción reportada usa HTTPS_PROXY con Basic auth y container system start --enable-kernel-install; se considera terminado cuando la descarga del kernel se autentica correctamente a través del proxy.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Swift
- Estrellas
- 51.9k
- Forks
- 1.8k
- Merge medio
- 2 d 3 h
- PR fusionados (30 d)
- 27
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apple/container
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
[Bug]: `container machine logs -f` exits immediately when the log is emptyPosiblemente ocupada @srivilliamsai la tomó hace 5 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
apple/container#2492 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[Bug]: Intermittent failure in PathUtilsTests.testNewDirectoryIsExcludedAndExistingChoiceIsKeptAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
apple/container#2474 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
[Request]: container ls --filter label=key=valuePosiblemente ocupada @kavix la tomó hace 21 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
apple/container#2403 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[Request]: Improve robustness and path resolution in ensure-hawkeye.shPosiblemente ocupada @denizguney la tomó hace 45 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
Todos los issues de apple/container
Issues similares
-
compiler diagnostics quality ownership SIL ownership
Dificultad 1/5 Menos de una hora Aptitud para principiantes 64/100
Los mantenedores suelen responder en 1 día
-
T-Defect
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
element-hq/element-x-ios#6536 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Switch to new string APIAbiertofxios-coreexperience
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
mozilla-mobile/firefox-ios#36661 ·
Los mantenedores suelen responder en 1 día
-
needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
manaflow-ai/cmux#45713 · 1 comentario ·
Los mantenedores suelen responder en 1 día