MsalProvider.cs ctors convert scope strings to lowercase but should not do that!
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 1/5
- Tiempo estimado
- Menos de una hora
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Estancado
- Stack tecnológico
- azure, csharp
- Área
- authentication
Línea de trabajo
Abre MsalProvider.cs e inspecciona los constructores en los que cada scope se pasa mediante Select(s =\u003e s.ToLower()). Confirma cómo utiliza el flujo de autenticación el array de scopes. Se considera terminado cuando se conserva el uso original de mayúsculas y minúsculas de cada scope para que se acepte el scope sensible a mayúsculas y minúsculas.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- C#
- Estrellas
- 156
- Forks
- 37
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de CommunityToolkit/Graph-Controls
-
bug :bug:
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
CommunityToolkit/Graph-Controls#211 · 3 comentarios ·
-
CommunityToolkit.Authentication.Msal use Microsoft Graph V4 but if you install V5,you cannot releaseAbiertobug :bug: needs attention :wave: needs triage :mag:
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
CommunityToolkit/Graph-Controls#208 · 20 comentarios ·
-
enhancement :sparkles:
Dificultad 2/5 1-3 horas Aptitud para principiantes 35/100
-
Area: Providers
Dificultad 2/5 1-3 horas Aptitud para principiantes 55/100
CommunityToolkit/Graph-Controls#195 · 1 comentario ·
-
Area: Providers bug :bug:
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
CommunityToolkit/Graph-Controls#189 · 3 comentarios ·
Todos los issues de CommunityToolkit/Graph-Controls
Issues similares
-
[Core] IPlatformServices.PrefersDarkTheme: the desktop's theme as the signed-in user sees itAbiertoarea: core bug help wanted ready
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
ZaidX88/sluice#265 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
area: remote bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Install a C# EnvironmentAbierto📅 Sprint 4 Module-Tools Setup Submit:None 🦔 Size Tiny
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
CodeYourFuture/Module-Tools#712 ·
-
A: Mapping P3: Standard T: New Feature
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
space-wizards/space-station-14#46878 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 Medio día Aptitud para principiantes 60/100
CommunityToolkit/Windows#896 · 2 comentarios ·