MsalProvider.cs ctors convert scope strings to lowercase but should not do that!
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 1/5
- Thời gian dự kiến
- Dưới một 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ệ
- azure, csharp
- Lĩnh vực
- authentication
Hướng nghiên cứu
Mở MsalProvider.cs và kiểm tra các constructor trong đó mỗi scope được truyền qua Select(s =\u003e s.ToLower()). Xác nhận cách flow xác thực sử dụng mảng scope. Hoàn tất có nghĩa là kiểu chữ ban đầu của mỗi scope được giữ nguyên để scope phân biệt chữ hoa chữ thường được chấp nhận.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- C#
- Star
- 156
- Fork
- 37
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không 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 CommunityToolkit/Graph-Controls
-
bug :bug:
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
CommunityToolkit/Graph-Controls#211 · 3 bình luận ·
-
CommunityToolkit.Authentication.Msal use Microsoft Graph V4 but if you install V5,you cannot releaseĐang mởbug :bug: needs attention :wave: needs triage :mag:
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
CommunityToolkit/Graph-Controls#208 · 20 bình luận ·
-
enhancement :sparkles:
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
-
Area: Providers
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 55/100
CommunityToolkit/Graph-Controls#195 · 1 bình luận ·
-
Area: Providers bug :bug:
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
CommunityToolkit/Graph-Controls#189 · 3 bình luận ·
Tất cả issue của CommunityToolkit/Graph-Controls
Issue tương tự
-
[Core] IPlatformServices.PrefersDarkTheme: the desktop's theme as the signed-in user sees itĐang mởarea: core bug help wanted ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
ZaidX88/sluice#265 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: remote bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Install a C# EnvironmentĐang mở📅 Sprint 4 Module-Tools Setup Submit:None 🦔 Size Tiny
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
CodeYourFuture/Module-Tools#712 ·
-
A: Mapping P3: Standard T: New Feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
space-wizards/space-station-14#46878 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 60/100
CommunityToolkit/Windows#896 · 2 bình luận ·