-
Notifications
You must be signed in to change notification settings - Fork 729
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
Integrate custom CA for http interface #4522
Comments
A few thoughts:
This way you would pre-provision a single LoadBalancer service, and a single public-facing HTTPS certificate for all clusters you want to manage. And keep using "internal" HTTPS certs internally only. See this gclb and traefik examples.
More generally, I think I'd be +1 with adding a feature to allow users to provide their own CA certs to use for the HTTP layer, for consistency with the transport layer. |
Thank you for your reply.
|
We currently have the following layout in the secret for the HTTP layer of Elasticsearch as documented here: ca.crt: optional CA certificate
tls.key: private key for the HTTP layer certificate
tls.crt: HTTP layer certificate We could extend that as follows: ca.key: private key for the CA certificate
ca.crt: CA certificate
tls.key: private key for the HTTP layer certificate
tls.crt: HTTP layer certificate The following combinations would be valid: New mode to generate the HTTP layer certificate from a CA cert/with key ca.key: ...
ca.crt: ... as before: HTTP layer certificate from a well known CA: tls.key: ...
tls.crt: ... as before: HTTP layer certificate from an internal CA ca.crt: ...
tls.key: ...
tls.crt: ... The only inconsistency I see is that for the transport layer we went with |
I have a request regarding the certificate management for the http certificate management.
The basic construct is as follows.
Customers should not need to generate their own certificates.
Instead, this CA should be utilized during the creation of the Cluster deployments to automatically enable a trusted communication.
As I take the documentation there are currently multiple ways to utilize certificates for the http interface in order to communicate with an Elasticsearch installation based on ECK:
Since developers should not generate their own certificates, option 2 is out of the question for our use case.
When utilizing version 1, using a self signed certificate, the operator generates a certificate including a whole bunch of SANs out of the box:
Especially the IP Adress of the LoadBalancer gets injected directly, which is pretty handy, since this may be utilized to directly communicate through the service.
However, this only works as long as self-signed certificates are utilized.
Currently, if we want to use a centralized CA certificate in order to generate http certificates, we need to use third party tools like the cert-manager (https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-custom-http-certificate.html#k8s_custom_self_signed_certificate_using_cert_manager) to generate the http certificate, e.g. via:
With this, there are no default SANs integrated in the certificate.
Each SAN needs to be generated programatically, which is okay for some cases, however one integration is missing, which is the IP of the LoadBalancer.
Since deployments are generated automatically, LoadBalancer IPs are generated automatically as well.
If we want to integrate the LoadBalancer IP, it seems we need even more additional tooling like Argo Events for example.
This would enable a workflow like -> check for the creation of a new LoadBalancer -> check out its IP -> generate the Certificate -> deploy the Elasticsearch Cluster.
Correct me if I'm wrong, I couldn't find an elegant solution and therefore am stuck with this fragile process.
Long story short :)
For the transport interface, there is a way to link a certificate authority (https://www.elastic.co/guide/en/cloud-on-k8s/master/k8s-transport-settings.html#k8s_configure_a_custom_certificate_authority).
Based on this CA, the certificates for the internal communication are generated.
Would it be possible to integrate a similar mechanism for the http interface, e.g. specifying a custom-ca.
And then generating the currently self-signed http certificate based on this custom-ca, e.g. with SANs like this out of the box:
and the option to define own SANs as well:
This way no additional tooling would be needed for the certificate management, allowing us to build self-contained helm charts and to implement a more robust system.
The text was updated successfully, but these errors were encountered: