MsalProvider.cs ctors convert scope strings to lowercase but should not do that!
まだ誰も着手していません。
評価
- 難易度
- 1/5
- 見積もり時間
- 1時間未満
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- azure, csharp
調査の方向性
MsalProvider.cs を開き、各スコープが Select(s =\u003e s.ToLower()) を通じて渡されるコンストラクターを調査します。認証フローでスコープ配列がどのように使用されるかを確認します。完了とは、各スコープの元の大文字と小文字が保持され、大文字と小文字を区別するスコープが受け入れられることです。
索引モデルが issue の本文から書いたものです。
説明
Toolkit Version 7.1.1
MsalProvider.cs Contructors convert the scope arrays to lowercase:
Scopes = scopes.Select(s => s.ToLower()).ToArray() ?? new string[] { string.Empty };
It should not do this because OpenID specs define scopes as CASE SENSITIVE.
https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims
"Multiple scope values MAY be used by creating a space delimited, case sensitive list of ASCII scope values."
https://tools.ietf.org/html/rfc6749#section-3.3
"The value of the scope parameter is expressed as a list of space-delimited, case-sensitive strings. The strings are defined by the authorization server. If the value contains multiple space-delimited strings, their order does not matter, and each string adds an additional access range to the requested scope."
I'm running an .NET Core 6 Azure Web App Api with an case sensitive scope in the AAD app registration. Using standard MSAL PublicClientApplication runs fine with that. Using the MsalProvider wrapper of the community toolkit breaks this, because the "lowercased" scope is not accepted by Microsoft.IdentityModel.Tokens.SecurityToken:
IDX10214: Audience validation failed. Audiences: 'https://abce.de/webapp-abcd.azurewebsites.net'. Did not match: validationParameters.ValidAudience: 'https://abce.de/WebApp-abce.azurewebsites.net'
Please not the uppercase 'W' in the scope.
Earlier versions of MSAL also had that bug and fixed it:
https://github.com/AzureAD/microsoft-authentication-library-for-objc/issues/395
https://github.com/AzureAD/microsoft-authentication-library-for-js/issues/1922
Best Regards,
Torsten
- 主要言語
- C#
- スター
- 156
- フォーク
- 37
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
CommunityToolkit/Graph-Controls のほかの issue
-
bug :bug:
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
CommunityToolkit/Graph-Controls#211 · コメント 3 件 ·
-
CommunityToolkit.Authentication.Msal use Microsoft Graph V4 but if you install V5,you cannot releaseオープンbug :bug: needs attention :wave: needs triage :mag:
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
CommunityToolkit/Graph-Controls#208 · コメント 20 件 ·
-
enhancement :sparkles:
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
-
Area: Providers
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
CommunityToolkit/Graph-Controls#195 · コメント 1 件 ·
-
Area: Providers bug :bug:
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
CommunityToolkit/Graph-Controls#189 · コメント 3 件 ·
CommunityToolkit/Graph-Controls の issue をすべて見る
似ている issue
-
area: core bug help wanted ready
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
ZaidX88/sluice#265 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area: remote bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
📅 Sprint 4 Module-Tools Setup Submit:None 🦔 Size Tiny
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
CodeYourFuture/Module-Tools#712 ·
-
A: Mapping P3: Standard T: New Feature
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
space-wizards/space-station-14#46878 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 半日 初心者へのやさしさ 60/100
CommunityToolkit/Windows#896 · コメント 2 件 ·