I have a nodejs http-proxy behind traefik. Problem is, teh traefik cert is use instead of the website cert.
I need
CLIENT ----------> TRAEFIK -------> PROXY (nodejs http-proxy) -----> https://google.fr
Is this possible to keep the google cert between CLIENT and GOOGLE as a proxy/vpn does? Do you have some documention I could read about my issue?
I don't want to install an auto signed cert on every computer that use that service.
Related
I am using an Ingress using Google-managed SSL certs mostly similar to what is described here:
https://cloud.google.com/kubernetes-engine/docs/how-to/managed-certs#setting_up_a_google-managed_certificate
However my backend service is a grpc service that is using HTTP2. According to the same documentation if I am using HTTP2 my backend needs to be "configured with SSL".
This sounds like I need a separate set of certificates for my backend service to configure it with SSL.
Is there a way to use the same Google managed certs here as well?
What are my other options here? I am using, Google managed certs for the Ingress not to manage any certs on my own, if I then use self signed certificates for my service, that kind of defeats the purpose.
i don't think it's required to create SSL for the backend services if you are terminating the HTTPS at LB level. You can attach your certs to at LB level and the backed-end will be HTTPS > HTTP.
You might need to create SSL/TLS new cert in case there is diff version ssl-protocols: TLSv1.2 TLSv1.3, Cipher set in your ingress controller configmap which you are using Nginx ingress controller, Kong etc.
If you are looking for End to End HTTPS traffic definitely you need to create a cert for the backend service.
You can also create/manage the Managed certificate or Custom cert with Cert manager the K8s secret and mount to deployment which will be used further by the service, in that case, no need to manage or create the certs. Ingress will passthrough the HTTPS request to service directly.
In this case, it will be an end-to-end HTTPS setup.
Update :
Note: To ensure the load balancer can make a correct HTTP2 request to
your backend, your backend must be configured with SSL. For more
information on what types of certificates are accepted, see Encryption
from the load balancer to the backends ." end to end tls seems to be a
requirement for HTTP2
This is my site https://findmeip.com it's running on HTTP2 and terminating the SSL/TLS at the Nginx level only.
Definitely, it's good to go with the suggested practice so you can use the ESP option from the Google, setting GKE ingress + ESP + grpc stack.
https://cloud.google.com/endpoints/docs/openapi/specify-proxy-startup-options?hl=tr
If not want to use ESP check above suggested :
You can Mount Managed certificate to
deployment which will be used further by the service, in that case, no
need to manage or create the certs. In other words, cert-manager will create/manage/re-new SSL/TLS on behalf of you in K8s secret which will used by service.
Google Managed Certificates can only be used for the frontend portion of the load balancer (aka client to LB). If you need encryption from the LB to the backends you will have use self-signed certificates or some other way to store said certificates on GKE as secrets and configuring the Ingress to connect to the backend using these secrets.
Like this https://cloud.google.com/kubernetes-engine/docs/concepts/ingress-xlb#setting_up_https_tls_between_client_and_load_balancer
We have 10 different kubernetes pods which runs inside a private VPN, this pods are HTTP serving endpoints(not HTTPS). But this services would interact with HTTPS serving endpoints. Logically to make call to HTTP-S serving endpoints from a HTTP serving pod , the SSL server certificate trust is required. Hence we decided to store the SSL certificates inside each HTTP Service pods to make call to HTTPS serving pods.
I am wondering is there are any alternative approaches for managing SSL certificates across different pods in Kubernetes cluster? How about kubeadm for K8s certificate management ... any suggestions ?
This is more of a general SSL certificate question rather than specific to Kubernetes.
If the containers/pods providing the HTTPS endpoint already have their SSL correctly configured and the SSL certificate you are using was purchased/generated from a known, trusted CA (like letsencrypt or any one of the known, trusted certificate companies out there) then there is no reason your other container apps that are making connections to your HTTPS endpoint serving pods would need anything special stored in them.
The only exception to this is if you have your own private CA and you've generated certificates on that internally and are installing them in your HTTPS serving containers. (Or if you are generating self-signed certs). Your pods/containers connecting to the https endpoints would then need to know about the CA certificate. Here is a stackoverflow question/answer that deals with this scenario:
How do I add a CA root certificate inside a docker image?
Lastly, there are better patterns to manage SSL in containers and container schedulers like Kubernetes. It all depends on your design/architecture.
Some general ideas:
Terminate SSL at a load balancer before traffic hits your pods. The load balancer then handles the traffic from itself to the pods as HTTP, and your clients terminate SSL at the Load Balancer. (This doesn't really tackle your specific use case though)
Use something like Hashicorp Vault as an internal CA, and use automation around this product and Kubernetes to manage certificates automatically.
Use something like cert-manager by jetstack to manage SSL in your kubernetes environment automatically. It can connect to a multitude of 'providers' such as letsencrypt for free SSL. https://github.com/jetstack/cert-manager
Hope that helps.
I want to configure SSL on keycloak deployment on openshift. I am using jboss/keycloak image for keycloak deployment which used latest keycloak version 4.6.final. But I read it somewhere that keycloak doesn't accept default TLS certificates available on openshift.
My purpose is to run the keycloak application on https on openshift. It works fine on http, but when I create the route with TLS enabled, it fails to run. I think I am missing some parameter somewhere in the deployment config.
You must configure in Openshift a route with reencrypt termination.
In my case that was solving the problem.
You have from your frontend tot openshift router ssl en ssl from your router to your backend pod. That requires reencrypt termination.
In your route you have to define 4 certificates
tls certificate
tls key
ca certificate (your intermediate certificate)
destination certifcate (the certificate you use on the keycloak pod)
For the desination certifcate I have used the certificate in my alpine pod in /etc/ssl/certs (ca-certifcates.crt)
More about reencrypt termination: https://docs.openshift.com/container-platform/4.7/networking/routes/secured-routes.html
In order to configure route with reencrypt termination:
oc create route reencrypt <NAME> --service=keycloak --port=keycloak --cert=<CERTIFICATEFILE>.crt --key=<KEYFILE>.key --hostname=sso.apps.company.lan
I have a Docker container with nginx running on Jelastic. From the container I used certbot to get a ssl certificate from letsencrypt. Finally I changed the nginx conf accordingly. I have not enble ssl in the Jelastic user interface.
When browsing the site on https it seems that I get the generic certificate of the Jelastic provider but not my own certificate, because the error is SSL_ERROR_BAD_CERT_DOMAIN the ssl certificate served is for the domain of the provider. But I have not enabled the ssl on the Jelastic interface ?!
So can I use a letsencrypt ssl certificate in my docker container on Jelastic and how ?
Thank you
It seems that you are trying to use custom SSL cert without public IP.
In this case, all external traffic is going through the platform revers-proxies wich is providing platform shared SSL.
The solution is to use external IP.
I'm looking for information on how to configure an HTTP load balancer or proxy server (squid, nginx, HAProxy, etc.) to handle the SSL for my domain as an alternative to adding Heroku's SSL Endpoint add-on for $20/month.
The load balancer or proxy server would terminate the SSL connection and the last leg to the heroku server would be over http.
SSL is now included on all paid dynos. Thus, you pay only the certificate price.
https://blog.heroku.com/ssl-is-now-included-on-all-paid-dynos
A new add-on was added a few short months ago called Expedited SSL. This add-on provides you with both the registration of an SSL certificate along with the endpoint for serving it, whereas SSL Endpoint is only the endpoint used to serve the SSL certificate you've already purchased from an SSL provider.