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

ECDSA private key #984

Closed
ghost opened this issue Jul 11, 2018 · 12 comments · Fixed by kubernetes/kubernetes#76390
Closed

ECDSA private key #984

ghost opened this issue Jul 11, 2018 · 12 comments · Fixed by kubernetes/kubernetes#76390
Assignees
Labels
area/security help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Milestone

Comments

@ghost
Copy link

ghost commented Jul 11, 2018

FEATURE REQUEST

I was trying to deploy a new cluster with autogenerated EC CAs when I discovered that kubeadm waits for CA key to be in RSA format.
I thought maybe there is no capabilities to generate EC certificates in kubeadm, so I've generated whole chain: ca, frontproxy-ca, apiserver, apiserver-kubelet-client, front-proxy-client and sa private and public keys.
Now kubeadm stopped on private key to apiserver certificate (while accepting ECDSA certificate itself)

So the feature request: please add support for EC keys if underlying infrastructure is able to support it.

@ghost ghost changed the title ECDSA certificate private key bug ECDSA certificate private key Jul 11, 2018
@ghost ghost changed the title ECDSA certificate private key EC private key Jul 11, 2018
@neolit123
Copy link
Member

i need to do some investigation for the stakes here, but for now my answer is that EC will not be supported any time soon (don't quote me on that).

@joejulian
Copy link

To repro:

ca-config.json

{"signing":{"default":{"expiry":"43800h"},"profiles":{"server":{"expiry":"43800h","usages":["signing","key encipherment","server auth","client auth"]},"client":{"expiry":"43800h","usages":["signing","key encipherment","client auth"]},"peer":{"expiry":"43800h","usages":["signing","key encipherment","server auth","client auth"]}}}}

ca-csr.json

{"CN":"etcd","key":{"algo":"ecdsa","size":256}}

Then use cfssl:

cfssl gencert -initca -config ca-config.json ca-csr.json | cfssljson -bare ca -
mv ca.pem ca.crt
mv ca-key.pem ca.key

Now try to use this CA cert:

kubeadm alpha phase certs all --cert-dir $PWD
failure loading ca certificate: the private key file /home/foo/test/ca.key isn't in RSA format

@joejulian
Copy link

@neolit123 What led you to your expectation that this would not be coming soon? Do you see some specific blocker?

@joejulian
Copy link

joejulian commented Jul 23, 2018

@andrewrynhard Your PR (kubernetes/kubernetes#41295) removed EC key support. I can't find any specific reasoning for that in the PR or the related issue. Is there any reason that you know of not to just re-add the EC support to pki_helpers?

After actually looking at that PR, there was no working code removed, just some placeholders.

@neolit123 neolit123 added help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. area/security and removed state/needs-more-information labels Jul 24, 2018
@neolit123
Copy link
Member

neolit123 commented Jul 24, 2018

@joejulian

@neolit123 What led you to your expectation that this would not be coming soon? Do you see some specific blocker?

i think the biggest blocker is that this is a relatively low priority task and the kubeadm team is busy.

i did some investigation and it feels like the rest of kubernetes is ECDSA "ready".
PRs for kubeadm are welcome!

@timothysc
Copy link
Member

/assign @liztio

@timothysc timothysc added the priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. label Oct 11, 2018
@neolit123 neolit123 changed the title EC private key ECDSA private key Nov 3, 2018
@geoffgarside
Copy link

Looks like the certutil.NewSignedCert functions have been updated to use crypto.Signer as of kubernetes/client-go@30575d7

@timothysc timothysc added this to the v1.14 milestone Jan 7, 2019
@timothysc timothysc removed the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Jan 7, 2019
@timothysc timothysc added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Jan 8, 2019
@neolit123 neolit123 modified the milestones: v1.14, Next Feb 3, 2019
@neolit123 neolit123 added the lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. label Feb 3, 2019
@rojkov
Copy link

rojkov commented Apr 9, 2019

I'd like to tackle this if nobody is working on it.

@fabriziopandini
Copy link
Member

@rojkov great
/assign @rojkov
/lifecycle active

@k8s-ci-robot k8s-ci-robot removed the lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. label Apr 11, 2019
@k8s-ci-robot
Copy link
Contributor

@fabriziopandini: GitHub didn't allow me to assign the following users: rojkov.

Note that only kubernetes members and repo collaborators can be assigned and that issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

@rojkov great
/assign @rojkov
/lifecycle active

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. label Apr 11, 2019
@rojkov
Copy link

rojkov commented Apr 17, 2019

/assign @rojkov

@rojkov
Copy link

rojkov commented Apr 25, 2019

The corresponding PR is kubernetes/kubernetes#76390.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/security help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants