You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem with policies/invite code after .net 8 upgrade: GetRSAPublicKey() method comes back null and throws exception "Certificate is not an RSA certificate"
#631
Open
tomtrost opened this issue
Aug 22, 2024
· 1 comment
Hello. I can't seem to find any documentation or workaround for this issue. I am having an issue wit the .well-known/keys endpoint in the Oidc controller after porting it into my .NET 8 project. I have the policies/invite code running locally and accessing a signed certificate and this endpoint works great, however it doesn't work great when ported into my project. The main difference: my project is .NET 8 whereas the example code is .NET Core 3.1. Consequently, the Microsoft.IdentityModel.Tokens Nuget package (I think that's the culprit) is version 8.0.0 as opposed to 6.6.0 that I have running on the "invite" code.
I noticed that GetRSAPublicKey() method in the jwksModel is returning null, which is throwing that error. I also noticed that this method has quite different approaches after stepping into the different versions. Both projects are processing the exact same signed certificate and seem to be passing similar values into their respective DecodePublicKey methods. I am really at a loss here. I've stepped into the code to try to figure out what's wrong, but end up pretty far "into the weeds" with the cryptographic parsing that goes on. Any advice would be GREATLY appreciated!
The text was updated successfully, but these errors were encountered:
tomtrost
changed the title
Problem with policies/invite code after .net 8 upgrade: GetRSAPublicKey() method comes back null and throws exception "Certificate is not an RSA certificate
Problem with policies/invite code after .net 8 upgrade: GetRSAPublicKey() method comes back null and throws exception "Certificate is not an RSA certificate"
Aug 23, 2024
Hello. I can't seem to find any documentation or workaround for this issue. I am having an issue wit the .well-known/keys endpoint in the Oidc controller after porting it into my .NET 8 project. I have the policies/invite code running locally and accessing a signed certificate and this endpoint works great, however it doesn't work great when ported into my project. The main difference: my project is .NET 8 whereas the example code is .NET Core 3.1. Consequently, the Microsoft.IdentityModel.Tokens Nuget package (I think that's the culprit) is version 8.0.0 as opposed to 6.6.0 that I have running on the "invite" code.
I noticed that GetRSAPublicKey() method in the jwksModel is returning null, which is throwing that error. I also noticed that this method has quite different approaches after stepping into the different versions. Both projects are processing the exact same signed certificate and seem to be passing similar values into their respective DecodePublicKey methods. I am really at a loss here. I've stepped into the code to try to figure out what's wrong, but end up pretty far "into the weeds" with the cryptographic parsing that goes on. Any advice would be GREATLY appreciated!
The text was updated successfully, but these errors were encountered: