Authentication timeout in a flow that uses `max_age` parameter has a 'send another authorisation code' button that doesn't allow login
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 1-2 天
- 新手友好度
- 35/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- python
研究方向
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.
由索引模型根據 Issue 內容生成。
描述
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.
- 主要語言
- Python
- 星號
- 971
- 分支
- 223
- 平均合併
- 13 小時 48 分鐘
- 30 天內合併 PR
- 2
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
AzureAD/microsoft-authentication-library-for-python 的其他 Issue
-
needs attention untriaged
難度 4/5 3-5 天 新手友好度 48/100
AzureAD/microsoft-authentication-library-for-python#973 · 2 則留言 ·
-
AzureSDK bug P1
難度 4/5 3-5 天 新手友好度 48/100
-
http_client docstring does not say that timeout, verify and proxies only configure the default session可能已有人在做 @HardMax71 於 41 天前認領。 未關閉
難度 1/5 1 小時以內 新手友好度 25/100
-
[Bug] The built-in retry never retries the token POST: HTTPAdapter(max_retries=1) keeps urllib3's default allowed_methods可能已有人在做 @HardMax71 於 47 天前認領。 未關閉bug untriaged
難度 2/5 1-3 小時 新手友好度 35/100
AzureAD/microsoft-authentication-library-for-python#957 · 3 則留言 ·
-
public-client untriaged
難度 5/5 一週以上 新手友好度 25/100
查看 AzureAD/microsoft-authentication-library-for-python 的全部 Issue
相似的 Issue
-
comp/tools P2 type/bug
難度 2/5 1-3 小時 新手友好度 78/100
NousResearch/hermes-agent#142908 · 1 則留言 ·
-
[oblt-aw][autodoc] Fix malformed headings in new Buildkite docs pages可能已有人在做 @github-actions 今天認領。 未關閉documentation
難度 1/5 1 小時以內 新手友好度 83/100
維護者通常 1 天內回覆
-
[Bug]: fileUploadMatrix.test.ts URL case does a real DNS lookup and fails offline可能已有人在做 @r2jaff 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 72/100
ComposioHQ/composio#5054 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 88/100
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 82/100
pytorch/tensordict#3286 ·
維護者通常 1 天內回覆