[Bug] The built-in retry never retries the token POST: HTTPAdapter(max_retries=1) keeps urllib3's default allowed_methods
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- python
- Lĩnh vực
- authentication
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 971
- Fork
- 223
- Merge trung bình
- 13 giờ 48 phút
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của AzureAD/microsoft-authentication-library-for-python
-
needs attention untriaged
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
-
AzureSDK bug P1
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
-
http_client docstring does not say that timeout, verify and proxies only configure the default sessionCó thể đã có người làm @HardMax71 đã nhận 38 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 25/100
-
public-client untriaged
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
[Bug] Interactive auth callback hangs forever when an idle connection reaches AuthCodeReceiver firstCó thể đã có người làm @Thanatos9404 đã nhận 3 ngày trước. Đang mởbug public-client
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 48/100
AzureAD/microsoft-authentication-library-for-python#950 · 2 bình luận · 3 reaction ·
Tất cả issue của AzureAD/microsoft-authentication-library-for-python
Issue tương tự
-
documentation good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
drevendev/HungryCrab#273 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
drevendev/BeautifulRepo#19 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Moonshot: Kimi K3 always sends `reasoning_effort="max"`, though the API now accepts `low` and `high`Đang mởaccepted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
UKGovernmentBEIS/inspect_ai#5939 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug linux
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Fill paper for Screen2WordsĐang mởarea:data data-quality
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
reacher-z/Awesome-CUA#1468 ·
Maintainer thường phản hồi trong vòng 1 ngày