Xabaril / AspNetCore.Diagnostics.HealthChecks

Enterprise HealthChecks for ASP.NET Core Diagnostics Package
Apache License 2.0
3.98k stars 771 forks source link

Allow RS512 as valid signing algorithm #2176

Open m-gug opened 4 months ago

m-gug commented 4 months ago

What this PR does / why we need it: The current implementation of the OpenIdConnect health check requires that the server supports RS256 as a signing algorithm. If the server only supports RS512, the health check will fail. This PR extends the checking of permitted signature algorithms to include RS512 (others can be added to the constant).

Which issue(s) this PR fixes:

2175

Special notes for your reviewer: The test be_healthy_if_idsvr_is_available fails in my setup - i guess it needs a running OIDC Server?

Does this PR introduce a user-facing change?: No

Please make sure you've completed the relevant tasks for this PR, out of the following list:

m-gug commented 4 months ago

@dotnet-policy-service agree

m-gug commented 3 months ago

I have added the possibility that the signature algorithms can be passed as parameters. It's not the prettiest implementation, but it's backwards compatible.