Authentication timeout in a flow that uses `max_age` parameter has a 'send another authorisation code' button that doesn't allow login
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá 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
Start by reading ConfidentialClientApplication.initiate_auth_code_flow and tracing how max_age and auth_time are checked across the password and MFA steps. Reproduce the reported delay between password entry and MFA, then compare the behavior with a fresh attempt after cancellation. Done means the timeout flow allows a valid MFA retry or requests password and MFA again without raising the reported error.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
The optional max_age parameter in the ConfidentialClientApplication. initiate_auth_code_flow is compared against the time the user entered their password instead of the full authentication with the MFA, which leads to odd behaviours for authentication timeout. A user that takes to long to enter the MFA sees a 'this has timed-out, send another authorization code' but entering the MFA again will not work because the time will be past the max_age, so an error will be raised instead.
To Reproduce
Steps to reproduce the behavior:
- Initiate a auth code flow with the
max_ageparameter set to 60 seconds (for example) - I enter my password, but don't enter my MFA devices for a couple of minutes
- I see that too much time has passed and a button saying 'send another authorisation code'
- I press on that 'send another authorization code' button
Expected behavior
I would expect one of two behaviors:
- I re-enter my MFA code and I can login
- I am asked to re-enter my password and MFA and I can login
What you see instead
I re-enter my MFA code and a python error is raised:
RuntimeError( RuntimeError: 13. auth_time (1642085298) was requested, by using max_age (60) parameter, and now (1642085502) too much time has elasped since last end-user authentication.
The MSAL Python version you are using
1.16.0
Additional context
If a user takes too long to enter their password everything works fine since the max_age is evaluated since the password was entered. This is only an issue if the user takes to long to add their MFA code.
This flow is also fine if after I enter my password and take too long to enter my MFA code, I click on 'cancel' and then try again, and it will ask for my password + MFA again.
- 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 39 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
-
[Bug] The built-in retry never retries the token POST: HTTPAdapter(max_retries=1) keeps urllib3's default allowed_methodsCó thể đã có người làm @HardMax71 đã nhận 45 ngày trước. Đang mởbug untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
AzureAD/microsoft-authentication-library-for-python#957 · 3 bình luận ·
-
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
Tất cả issue của AzureAD/microsoft-authentication-library-for-python
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
eclipse-score/inc_someip_gateway#356 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[BUG]: `GitHubRestAdapter.check_user_permission` and `has_write_access` raise `TypeError` (missing `params`), silently disabling the inactivity lifecycleCó thể đã có người làm @tarunagnihotri534 đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
AOSSIE-Org/Gitcord-GithubDiscordBot#167 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
mihai-vlc/sublime-jsfmt#56 ·
-
comp/cli comp/plugins P2 type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
NousResearch/hermes-agent#141917 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
riscv/riscv-opcodes#441 ·