-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Use OpenShift service serving certificates to retrieve routes TLS CA #17174
Comments
We do not use |
@mmorhun please provide more details about how do we generate certificates on OpenShift when using self-signed certificates. |
The own tls certificates using a job - generates certificates for public domain. I'm not sure that we can reuse it. |
@sleshchenko why? |
@l0rd The referenced che-operator code is invoked for K8s platform only https://github.com/eclipse/che-operator/blob/aee5ca35678a34fbaac7bf2f77c775aa5a282f9f/pkg/controller/che/che_controller.go#L363
Because it's the certificate needed on Ingress level - mainly for securing the connection with client/browser. |
The point here is how do we get the certificate of the CA that is used to sign the routes certificates? In the (outdated) documentation we suggested users to do that manually: oc get secret router-ca -n openshift-ingress-operator -o jsonpath="{.data.tls\.crt}" | \
base64 -d > ca.crt But that command is not reliable. I doesn't work if the ingress controller in the cluster is not the default one. That's why we need to use service serving certificates or use the built-in certificate injection. |
@l0rd we use |
As about getting CA certiificate, if it is self-signed, Openshift sends it with the chain as well, at least on the infrastructures I was able to test (CRC, clusterbot, QE OCP 4.x). |
@mmorhun understand. We do not generate certificates when running on OpenShift and we retrieve the CA cert from a fake route. However using OpenShift service serving certificate or certificates injection seems more reliable. |
I don't think we should use ca-bandle injection as it will inject all trusted certificates of the cluster (a lot), because we need only one: to propagate to Che components and to give it to the users. Unfortunately we cannot use service serving certificate as it creates certificates only for internal communications which is not going to work outside the cluster, i.e. Che end user cannot use them. |
Che should NOT manage certificates. Che doesn't know how to revoke a certificate, how to rotate it etc...We should delegate that to an external service. I only see benefits of having (a lot) of trusted certificates injected via service serving.
Why do you think that a Che end user cannot use them? We already have documentation that explains how to import a certificate that is not trusted locally. What's the problem with that? |
Completely agree, it is not Che responsibility. However, that adds requirements for the user (Che instance admin) to manually generate and apply certificates as we did before the TLS automation. It will not be a problem for correctly configured Openshift or Kubernetes (because that's already done on cluster setup), but certainly will add manual work for all other cases (including local ones like Minikube, CRC).
The service serving certificates are bound to the internal cluster domain(s). No way to use it outside. |
"Are bound to the internal cluster domain(s)"? I don't understand what you mean. |
Yes. We should use a certificate service when available (OCP) and generate certificates if we cannot really find a better solution. |
I meant
|
@mmorhun we are talking about 2 different things:
As you mentioned correctly 1. is for internal hostnames. But this issue is about retrieving the cluster CA public certificates so that che-server, theia etc...trust it and so that users can copy it locally and configure their browser to trust it too. And we should leveage the automatic injection rather than extracting it from a test route. Does that make sense? |
Sorry, I was confused by
and assumed using of service serving certificates. We indeed had different contexts. Thank you for pointing out.
+1 from me that Che (and all components like Che Theia, plugin broker, etc.) should trust configured in Openshift certificates (whole ca-bandle). It is clean way to be on the same position as the cluster.
Do you mean CA certificates from the cluster ca-bandle? |
Do you mean CA certificates from the cluster ca-bandle?
We probably need only the certificate of the CA used to sign routes
certificates (and that should always be in the trusted-ca-bundle).
|
@l0rd |
How to get service CA certificate:
How to get ingress CA certificate:
Decoding with |
Is your enhancement related to a problem? Please describe.
We currently generate our own tls certificates using a job and the image che tls secret creator.
This mechanism works fine for local installations but doesn't scale at the enterprise level where certificate management goes way beyond a simple certificate generation. When available (i.e. on OpenShift) we should delegate certificates management to an external service.
Describe the solution you'd like
When Che is deployed on OpenShift we should use its service serving certificates instead of the tls-secret-creator job.
The text was updated successfully, but these errors were encountered: