dotnet / dotnet/aspnetcore

Cannot handle error if host is not reachable for JwtBearer

Offen
#11,368 4 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
area-auth
Vorherrschende Sprache
C#
Sterne
38.4k
Forks
10.9k
Ø Merge
2 T. 9 Std.
Gemergte PRs (30 T.)
276

Beschreibung

### Describe the bug

if you have more then one authentication server (JWT or OpenID) that you trust if one of them is down we are getting error:

```
IDX20803: Unable to obtain configuration from: '[PII is hidden by default. Set the 'ShowPII' flag in IdentityModelEventSource.cs to true to reveal it.]'.
```

We should have a way to make this check optional

### To Reproduce
Steps to reproduce the behavior:
1. Add two authentication schemas with two Authority URLs
2. Turn off one of the authorities
3. See error when try to navigate to endpoint supporting both authorities

Sample configuration of two JWT bearer can be found here
https://stackoverflow.com/questions/49694383/use-multiple-jwt-bearer-authentication

### Expected behavior

Ignore authentication service if not available. Return 401 if it is the only trusted source.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Reproduziere die Konfiguration mit zwei JWT-Bearer-Authentifizierungsschemata und zwei Authority-URLs, schalte dann eine Authority aus und beobachte den Fehler beim Zugriff auf einen Endpunkt, der beide unterstützt. Untersuche, wie JwtBearer nicht verfügbare Authentifizierungsdienste behandelt; als abgeschlossen gilt die Untersuchung, wenn eine nicht verfügbare Quelle ignoriert wird, während eine Anfrage, die nur diese Quelle verwendet, 401 zurückgibt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
csharp
Bereich
authentication, backend
Issue-Typ
Bug
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.