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

Request for clarification on Certificates #18139

Closed
gnoejuan opened this issue Oct 20, 2020 · 6 comments
Closed

Request for clarification on Certificates #18139

gnoejuan opened this issue Oct 20, 2020 · 6 comments
Labels
area/install Issues related to installation, including offline/air gap and initial setup kind/question Questions that haven't been identified as being feature requests or bugs.

Comments

@gnoejuan
Copy link

Summary

According to chectl : To provide own certificate for Kubernetes infrastructure, 'che-tls' secret with TLS certificate must be pre-created in the configured namespace.

How would I use a certificate deployed with a ClusterIssuer? Before I learned of ClusterIssuer(s), my research led me to: https://cert-manager.io/docs/faq/kubed/ to sync the certificate across namespaces.

Would I need to take the extra step to sync the default cluster certificate to the Che namespace?

Relevant information

@gnoejuan gnoejuan added the kind/question Questions that haven't been identified as being feature requests or bugs. label Oct 20, 2020
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Oct 20, 2020
@tolusha
Copy link
Contributor

tolusha commented Oct 20, 2020

/cc @mmorhun

@RomanNikitenko RomanNikitenko added area/chectl Issues related to chectl, the CLI of Che and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Oct 20, 2020
@mmorhun
Copy link
Contributor

mmorhun commented Oct 21, 2020

Hello @gnoejuan. As of now Eclispe Che uses a separate TLS certificate to secure its ingresses in Kubernetes cluster. The requirements may vary depending on the cluster and/or Che settings. In general, there are two secrets: che-tls (secret name can be changed with tlsSecretName property) and self-signed-certificate (optional). The secret(s) should be pre-created in the namespace where Che is planned to be installed into. che-tls secret should contain server private key and public part (tls.key, tls.crt data fields respectively). If the cluster configured to use commonly trusted certificate that should be enough. Otherwise, self-signed-certificate secret should be created with CA certificate (only public part) under ca.crt date field.
Please note, that it is required to have CA certificate and then sign with it server one. Just single self-signed certificate is not going to work. If nothing is provided, Che installer generates both self-signed CA certificate and server one.
In case of already existing Cert Manager, this might help. But the idea is to have the secret(s) in place and it doesn't matter how they appeared there.
If it doesn't answer your question or you have follow up questions, feel free to ask.

@mmorhun mmorhun added the area/install Issues related to installation, including offline/air gap and initial setup label Oct 21, 2020
@tolusha tolusha removed the area/chectl Issues related to chectl, the CLI of Che label Oct 21, 2020
@gnoejuan
Copy link
Author

After double-checking the chectl server:deploy args, I assume changing tlsSecretName and che-tls aren't changed through a chectl deployment.

Sounds like the easiest/fastest way to use a ClusterIssuer / Let'sEncrypt certificate is to have the certificate synced.

@mmorhun
Copy link
Contributor

mmorhun commented Oct 27, 2020

I assume changing tlsSecretName and che-tls aren't changed through a chectl deployment.

It should be changed in case of Operator installer, otherwise it is a bug.

@gnoejuan
Copy link
Author

gnoejuan commented Oct 31, 2020

If the cluster configured to use commonly trusted certificate that should be enough

I might have misread this, but a standard chectl server:deploy -a helm -b url.com -p microk8s did not work with a ClusterIssuer already in place. I ended up copying the tls secret to the che namespace.

Since I was interested in a helm deployment and kubed doesn't appear to work with microk8s, my KISS solution is below:

kubectl get secret acme-secret-prod --namespace=default -o yaml > che-tls.yaml where acme-secret-prod has the tls.crt and tls.key. Edit che-tls.yaml fields name --> che-tls (required with helm, I think) and namespace --> che ( same value from deployment chectl server:deploy --chenamespace=chenamespace )

@mmorhun
Copy link
Contributor

mmorhun commented Nov 2, 2020

did not work with a ClusterIssuer already in place

Yes, it's true. I meant that default ingress controller already uses a commonly trusted certificate and che-tls is created. Sorry if it wasn't clear enough.

BTW, I think, that soon it will be possible to avoid using of any secret in case of commonly trusted certificate. A bit of details: #18079 and #18259

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/install Issues related to installation, including offline/air gap and initial setup kind/question Questions that haven't been identified as being feature requests or bugs.
Projects
None yet
Development

No branches or pull requests

5 participants