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

Investigate support for X509 Certs and EC Keys #1533

Open
josephdecock opened this issue Mar 14, 2024 · 1 comment
Open

Investigate support for X509 Certs and EC Keys #1533

josephdecock opened this issue Mar 14, 2024 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@josephdecock
Copy link
Member

josephdecock commented Mar 14, 2024

EC Keys in X509 certs came up in DuendeSoftware/Support#1154, and I'm curious if the situation has improved since we originally implemented the key manager. Or possibly, can we use Microsoft.IdentityModel.Tokens.ECDsaSecurityKey instead of Microsoft.IdentityModel.Tokens.X509SecurityKey?

Alternatively, is there some other helper we could build that would make dealing with EC keys more pleasant?

Here's a bit of code from the KeyManager.cs that comments on the issue:

 else if (alg.IsEcKey)
        {
            var ec = CryptoHelper.CreateECDsaSecurityKey(CryptoHelper.GetCurveNameFromSigningAlgorithm(alg.Name));
            // X509 certs don't currently work with EC keys.
            container = //_options.KeyManagement.WrapKeysInX509Certificate ? //new X509KeyContainer(ec, alg, now, _options.KeyManagement.KeyRetirementAge, iss) :
                (KeyContainer) new EcKeyContainer(ec, alg.Name, now);
        }
@josephdecock josephdecock added this to the Future milestone Mar 14, 2024
@brockallen brockallen added the enhancement New feature or request label Mar 21, 2024
@joegoldman2
Copy link

X509SecurityKey will support EC keys with AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet#2377.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants