-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Certificate issuance cleanup and hardening #9110
Comments
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
k8s-ci-robot
added
the
lifecycle/stale
Denotes an issue or PR has remained open with no activity and has become stale.
label
Aug 8, 2020
Progress:
/remove-lifecycle stale |
k8s-ci-robot
removed
the
lifecycle/stale
Denotes an issue or PR has remained open with no activity and has become stale.
label
Aug 8, 2020
This work is complete. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'd like to clean up and consolidate our certificate issuance code. It would be nice to harden things in the process. I'd like some input on the requirements.
Currently, most certificates and private keys are created out of
Keystore.CreateKeypair()
, called fromupup/pkg/fi/fitasks/Keypair
. All of these pairs are per-cluster, stored in the keystore in the VFS. They're also all issued with 10 year lifetimes.The exceptions are created at nodeup time and are one per node:
The master kubelet client certificate is created by
KubeletBuilder.buildMsterKubeletKubeconfig()
. It also has a 10 year lifetime.The kube-apiserver-healthcheck client cert is created by
KubeAPIServerBuilder.buildClientKeypair()
. It also has a 10 year lifetime.The kube-apiserver client cert for authenticating to etcd is created by
EtcdManagerTLSBuilder.buildKubeAPIServerKeypair()
. It has a 1 year lifetime.The Cilium client cert for agents authenticating to the cilium etcd is created by
CiliumBuilder.buildCiliumEtcdSecrets
. It has a 1 year lifetime.My first question is about the discrepancy between 1 year and 10 year lifetimes. Is there a requirement to support masters or node instances with lifetimes greater than one year? If not, then I'd like to reduce the lifetimes of all non-CA certificates to 1 year, to reduce the number of places that 10-year keys are left around. If so, then those existing 1 year lifetimes are a problem.
Perhaps we'd want a field in the cluster spec for the lifetime of non-CA certificates, so sites that update their nodes every 30 days or so could drop the lifetime down to something like the 60-day range?
I think for cleanup I'd create a nodeup task for creating a keypair and transition all the non-CA keypairs (or at least all master non-CA keypairs) from
fitasks.Keypair
to it. An alternative would be to move all those that happen after apiserver and kops-controller are up to using acertificatesigningrequest
API.@justinsb what are your thoughts?
The text was updated successfully, but these errors were encountered: