[Bug] The built-in retry never retries the token POST: HTTPAdapter(max_retries=1) keeps urllib3's default allowed_methods
Évaluation
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Accessibilité débutants
- 35/100
- Type d'issue
- Bug
- Clarté
- Clairement spécifiée
- Activité
- À l'abandon
- Stack technique
- python
- Domaine
- authentication
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- Python
- Étoiles
- 971
- Forks
- 223
- Merge moyen
- 13 h 48 min
- PR mergées (30 j)
- 2
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 AzureAD/microsoft-authentication-library-for-python
-
needs attention untriaged
Difficulté 4/5 3-5 jours Accessibilité débutants 48/100
AzureAD/microsoft-authentication-library-for-python#973 · 2 commentaires ·
-
AzureSDK bug P1
Difficulté 4/5 3-5 jours Accessibilité débutants 48/100
-
http_client docstring does not say that timeout, verify and proxies only configure the default sessionPeut-être pris @HardMax71 l’a pris il y a 44 jours. Ouverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 25/100
-
public-client untriaged
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 25/100
-
[Bug] Interactive auth callback hangs forever when an idle connection reaches AuthCodeReceiver firstPeut-être pris @Thanatos9404 l’a pris il y a 10 jours. Ouvertebug public-client
Difficulté 4/5 1-2 jours Accessibilité débutants 48/100
AzureAD/microsoft-authentication-library-for-python#950 · 2 commentaires · 3 réactions ·
Toutes les issues de AzureAD/microsoft-authentication-library-for-python
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
google-agentic-commerce/AP2#388 ·
-
area:codegen backend:cuda backend:hip bug direction:input
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
CrossGL/crosstl#3061 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
rlaope/oh-my-hermes#2304 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
mochan-tk/agentic-dev-kit-for-codex#64 ·
Les mainteneurs répondent en général sous 1 jour
-
Windows ARM memory-leakOuvertebug docs performance
Difficulté 1/5 Moins d'une heure Accessibilité débutants 85/100
Les mainteneurs répondent en général sous 3 jours