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

server: improve TLS certificate generation #2362

Closed
dnephin opened this issue Jun 22, 2022 · 0 comments · Fixed by #2444
Closed

server: improve TLS certificate generation #2362

dnephin opened this issue Jun 22, 2022 · 0 comments · Fixed by #2444
Assignees
Labels
area/api Issue or PR related to the Infra API. kind/improvement A report of a quality problem, or a change that addresses a quality problem.

Comments

@dnephin
Copy link
Contributor

dnephin commented Jun 22, 2022

Today we have a few problems with the TLS certificate generation in the server:

Proposal

  1. Generate the CA in helm, and save it to a kubernetes secret. Include that secret in the server deployment so the server can access it. Depends on server: allow user to provide their own TLS cert and key #2176 so that we can tell the server about the path to the CA from the helm chart.
  2. On first request, if we don't have a certificate, generate one using the CA. We should use x509.Ed25519 instead of RSA to reduce the generation time. We also need to add some kind of synchronization to solve SelfSignedOrLetsEncryptCert can race with itself, creating multiple primary keys and certs #2067.
  3. In the CLI, use tls.Config.VerifyPeerCertificate (instead of the cert we get back from x509.UnknownAuthorityError) to prompt for trust of the CA (instead of prompting for trust of the server certificate). Since the server certificate may change, but the CA remains across restarts, we need to trust the CA instead of the leaf cert.

Related issues

@dnephin dnephin added area/api Issue or PR related to the Infra API. kind/improvement A report of a quality problem, or a change that addresses a quality problem. labels Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api Issue or PR related to the Infra API. kind/improvement A report of a quality problem, or a change that addresses a quality problem.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant