Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] System.InvalidOperationException in AddJwtBearer because missing configuration when reading well-known configuration with objects #2728

Open
1 of 14 tasks
tehho opened this issue Jul 17, 2024 · 3 comments
Labels
More info needed Customer has been asked for more information Regression:7xto8x

Comments

@tehho
Copy link

tehho commented Jul 17, 2024

Which version of Microsoft.IdentityModel are you using?
8.0.0

Where is the issue?

  • M.IM.JsonWebTokens
  • M.IM.KeyVaultExtensions
  • M.IM.Logging
  • M.IM.ManagedKeyVaultSecurityKey
  • M.IM.Protocols
  • M.IM.Protocols.OpenIdConnect
  • M.IM.Protocols.SignedHttpRequest
  • M.IM.Protocols.WsFederation
  • M.IM.TestExtensions
  • M.IM.Tokens
  • M.IM.Tokens.Saml
  • M.IM.Validators
  • M.IM.Xml
  • S.IM.Tokens.Jwt
  • Other (please describe)

Is this a new or an existing app?
I have upgraded to a new version of Microsoft.AspNetCore.Authentication.JwtBearer 8.0.7 in a .Net 8.0 upgrade and with Microsoft.IdentityModel.Protocols.OpenIdConnect 8.0.0 it does not work.
Specifying version 7.6.3 in csproj works perfectly fine.

Expected behavior
Parse objects in well-known configuration correctly.

Actual behavior
Missing configuration because reader encounter JsonTokenType.EndObject before actual end.

System.InvalidOperationException: Cannot redirect to the authorization endpoint, the configuration may be missing or invalid.

Possible solution
Ignore objects in well-known that are not supported by OpenIdConnectConfiguration

Additional context / logs / screenshots / links to code
Related to #2407

@GeoK
Copy link
Member

GeoK commented Jul 18, 2024

@tehho This issue should be addressed in Microsoft.IdentityModel.Protocols.OpenIdConnect 8.0 with #2491. Can you please provide a repro?

@brentschmaltz
Copy link
Member

@tehho can you please provide metadata that will exibit this issue?

@keegan-caruso keegan-caruso added the More info needed Customer has been asked for more information label Aug 6, 2024
@attilah
Copy link

attilah commented Aug 30, 2024

@GeoK I think this is the same issue I found when using Identity Server, I have a repro in the referenced issue and exact details about the package incompatibility that's causing this: DuendeSoftware/Support#1391

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
More info needed Customer has been asked for more information Regression:7xto8x
Projects
None yet
Development

No branches or pull requests

6 participants