Authentication timeout in a flow that uses `max_age` parameter has a 'send another authorisation code' button that doesn't allow login
まだ誰も着手していません。
評価
- 難易度
- 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分
- マージ済み PR(30日)
- 2
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
AzureAD/microsoft-authentication-library-for-python のほかの issue
-
needs attention untriaged
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
-
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 が 39 日前に担当しました。 オープン
難易度 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 が 45 日前に担当しました。 オープンbug untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
AzureAD/microsoft-authentication-library-for-python#957 · コメント 3 件 ·
-
public-client untriaged
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
AzureAD/microsoft-authentication-library-for-python の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
docling-project/docling-mcp#147 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
autowarefoundation/autoware_carla_scenario#405 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
mohitmishra786/readprism#322 ·
メンテナーはふだん 1 日以内に返信