[Bug] The built-in retry never retries the token POST: HTTPAdapter(max_retries=1) keeps urllib3's default allowed_methods
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Estancado
- Stack tecnológico
- python
- Área
- authentication
Línea de trabajo
Read msal/application.py lines 716-718 and check how the mounted HTTPAdapter configures urllib3 retries for POST requests. The linked pull request #958 is already open; compare its change with the reported local reset repro and verify the retry behavior and existing tests before considering the issue done.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
msal/application.py lines 716-718 mount HTTPAdapter(max_retries=1) as "a minimal retry, better than nothing". For the token endpoint it is nothing: urllib3's Retry(1) keeps the default allowed_methods, which excludes POST, so a connection reset during the token request escapes after one attempt as requests.exceptions.ConnectionError.
Repro over a local TLS server that resets the first /token connection (self-signed cert, verify=False, nothing leaves 127.0.0.1): https://gist.github.com/HardMax71/fd1025dc346b2aefe1291e11cc343d8c
msal 1.38.0 | requests 2.33.0 | urllib3 2.7.0
default http_client (HTTPAdapter(max_retries=1)): ConnectionError escaped, connections after discovery=1: ('Connection aborted.', OSError(22, 'Invalid argument'))
custom http_client, Retry(allowed_methods=None): token=yes | connections after discovery=2
Same on 1.37.0. I know #432 settled on retries being an http-layer concern and a custom http_client being the answer, and that is what we run. This is narrower: the adapter MSAL itself mounts does not do what its comment says. HTTPAdapter(max_retries=Retry(total=1, connect=1, allowed_methods=None, backoff_factor=0.3)) keeps the same one-retry budget and makes it real for the POST. Can send the PR.
- Lenguaje dominante
- Python
- Estrellas
- 971
- Forks
- 223
- Merge medio
- 3 h 6 min
- PR fusionados (30 d)
- 4
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin 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 AzureAD/microsoft-authentication-library-for-python
-
AzureSDK bug P1
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
-
http_client docstring does not say that timeout, verify and proxies only configure the default sessionPosiblemente ocupada @HardMax71 la tomó hace 37 días. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 25/100
-
public-client untriaged
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
-
[Bug] Interactive auth callback hangs forever when an idle connection reaches AuthCodeReceiver firstPosiblemente ocupada @Thanatos9404 la tomó hace 2 días. Abiertobug public-client
Dificultad 4/5 1-2 días Aptitud para principiantes 48/100
AzureAD/microsoft-authentication-library-for-python#950 · 2 comentarios · 3 reacciones ·
-
needs attention public-client Similar-Issue untriaged
Dificultad 4/5 3-5 días Aptitud para principiantes 43/100
AzureAD/microsoft-authentication-library-for-python#908 · 3 comentarios ·
Todos los issues de AzureAD/microsoft-authentication-library-for-python
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
TomerAberbach/profiler-md#733 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
its-me-prash/vwgroup-connect-ha#1858 ·
Los mantenedores suelen responder en 1 día
-
area: client bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Deleting all alarms or timers shows deleted ones until the next update when there are none leftAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
leikoilja/ha-google-home#1107 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Graphify-Labs/graphify#4524 · 1 comentario ·
Los mantenedores suelen responder en 1 día