[Bug] JsonWebKeyConverter.ConvertFromX509SecurityKey
lies about the Key Type
#2217
Open
1 of 14 tasks
Labels
Customer reported
Indicates issue was opened by customer
Which version of Microsoft.IdentityModel are you using?
6.32.1
Where is the issue?
Is this a new or an existing app?
c. This is a new app or an experiment.
Repro
I'm trying to take an X509 certificate and expose it in an endpoint as a JWK.
Assuming an X509 certificate using ECDSA for encryption located at
./cert/fullchain.pem
, example contents:Expected behavior
jwk.Kty
should be"EC"
.Actual behavior
jwt.Kty
is"RSA"
.Possible solution
Seems like
ConvertFromX509SecurityKey
just sets "RSA" as a constant:It should investigate the
X509SecurityKey
to find that out. Investigatingx509Key.Certificate.PublicKey.Oid
yields an ECC oid, so it's not an issue with the X509SecurityKey object.I might be off base here, but I can't find a different path to convert an X509 cert with an ECDSA key to JWK.
The text was updated successfully, but these errors were encountered: