kubernetes-client / csharp

Officially supported dotnet Kubernetes Client library
Apache License 2.0
1.06k stars 291 forks source link

IdentityModel 5.2.0 nonsupport IdentityServer4.AccessTokenValidation 3.0.1 #1563

Open fzwu opened 2 weeks ago

fzwu commented 2 weeks ago

Describe the bug fail: IdentityServer4.AccessTokenValidation.IdentityServerAuthenticationHandler[0]
Method not found: 'IdentityModel.Client.DiscoveryEndpoint IdentityModel.Client.DiscoveryEndpoint.ParseUrl(System.String)'. System.MissingMethodException: Method not found: 'IdentityModel.Client.DiscoveryEndpoint IdentityModel.Client.DiscoveryEndpoint.ParseUrl(System.String)'. at IdentityServer4.AccessTokenValidation.IdentityServerAuthenticationOptions.ConfigureJwtBearer(JwtBearerOptions jwtOptions)
at IdentityServer4.AccessTokenValidation.ConfigureInternalOptions.Configure(String name, JwtBearerOptions options)
at Microsoft.Extensions.Options.OptionsFactory1.Create(String name) at Microsoft.Extensions.Options.OptionsMonitor1.<>c.b10_0(String name, IOptionsFactory1 factory) at Microsoft.Extensions.Options.OptionsCache1.<>c__DisplayClass3_1`1.b2()
at System.Lazy1.ViaFactory(LazyThreadSafetyMode mode) at System.Lazy1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
at System.Lazy1.CreateValue() at System.Lazy1.get_Value()
at Microsoft.Extensions.Options.OptionsCache1.GetOrAdd[TArg](String name, Func3 createOptions, TArg factoryArgument)
at Microsoft.Extensions.Options.OptionsMonitor1.Get(String name) at Microsoft.AspNetCore.Authentication.AuthenticationHandler1.InitializeAsync(AuthenticationScheme scheme, HttpContext context)
at Microsoft.AspNetCore.Authentication.AuthenticationHandlerProvider.GetHandlerAsync(HttpContext context, String authenticationScheme)
at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme)
at IdentityServer4.AccessTokenValidation.IdentityServerAuthenticationHandler.HandleAuthenticateAsync()

Kubernetes C# SDK Client Version e.g. 14.0.2

Server Kubernetes Version e.g. 1.29.2

Dotnet Runtime Version e.g. net6

public static DiscoveryEndpoint ParseUrl(string input, string path = null) version 5,2,0 public static DiscoveryEndpoint ParseUrl(string input) version 4,2,2

Whether can downgrade the IdentityModel to 4.1.0?

tg123 commented 2 weeks ago

for now there is no way to downgrade:(

could you please try older version?