Azure / Azure/data-api-builder
🥕[Bug]: `runtime` defaults start but do not run.
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- C#
- Estrellas
- 1.5k
- Forks
- 372
- Merge medio
- 3 d 22 h
- PR fusionados (30 d)
- 9
Descripción
If you use all defaults in your configuration, like this:
Configuration snippet
"runtime": {
"mode": "development"
},
And then you dab start it runs!
However, when you navigate to the endpoint, you get:
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
Request starting HTTP/1.1 GET http://localhost:5000/ - - -
warn: Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware[3]
Failed to determine the https port for redirect.
fail: Microsoft.AspNetCore.Server.Kestrel[13]
Connection id "0HN9L5T7UV68Q", Request id "0HN9L5T7UV68Q:00000001": An unhandled exception was thrown by the application.
System.InvalidOperationException: No authentication handler is registered for the scheme 'OAuthAuthentication'. The registered schemes are: StaticWebAppsAuthentication. Did you forget to call AddAuthentication().Add[SomeAuthHandler]("OAuthAuthentication",...)?
at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme)
at Azure.DataApiBuilder.Core.AuthenticationHelpers.ClientRoleHeaderAuthenticationMiddleware.InvokeAsync(HttpContext httpContext) in /_/src/Core/AuthenticationHelpers/ClientRoleHeaderAuthenticationMiddleware.cs:line 76
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Azure.DataApiBuilder.Service.Startup.<>c__DisplayClass15_0.<<Configure>b__3>d.MoveNext() in /_/src/Service/Startup.cs:line 374
--- End of stack trace from previous location ---
at Azure.DataApiBuilder.Core.Services.PathRewriteMiddleware.InvokeAsync(HttpContext httpContext) in /_/src/Core/Services/PathRewriteMiddleware.cs:line 89
at Azure.DataApiBuilder.Core.Services.CorrelationIdMiddleware.Invoke(HttpContext httpContext) in /_/src/Core/Services/CorrelationIdMiddleware.cs:line 53
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
Request finished HTTP/1.1 GET http://localhost:5000/ - 500 0 - 30.5962ms
Problem
No authentication handler is registered for the scheme 'OAuthAuthentication'. The registered schemes are: StaticWebAppsAuthentication. Did you forget to call AddAuthentication().Add[SomeAuthHandler]("OAuthAuthentication",...)?
Something changed to make this required.
Also
Did you forget to call AddAuthentication().Add[SomeAuthHandler]("OAuthAuthentication",...)?
This is an internal message and should NOT be exposed.
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.
Línea de trabajo
Comience con src/Core/AuthenticationHelpers/ClientRoleHeaderAuthenticationMiddleware.cs en la línea 76 y src/Service/Startup.cs en la línea 374, usando la configuración de ejecución predeterminada indicada para reproducir el fallo de la solicitud. Trace por qué se selecciona el esquema OAuthAuthentication cuando solo está registrado StaticWebAppsAuthentication. Se considera terminado cuando la configuración predeterminada sirve el endpoint correctamente y no se expone el mensaje interno del controlador de autenticación.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- csharp
- Área
- api, authentication, backend
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100