I want to route traffic to services outside of Kubernetes over the Egress Gateway.
I don’t want to trust our internal Root Certificates on all pods so I’m asking if its possible to add/trust them on the Egress Gateway so that I call them without trusting them on each Pod.
In addition you can set the DestinationRule.TLSMode to SIMPLE and provide the CA certificate to be used by the Gateway to validate the external server’s certificate using DestinationRule.TLSSettings.caCertificate.
DISCLAIMER: I haven’t tried this personally but I suppose it should work.
The TLSSettings.caCertificates documentation states,
caCertificates string
OPTIONAL: The path to the file containing certificate authority certificates to use in verifying a presented server certificate. If omitted, the proxy will not verify the server’s certificate. Should be empty if mode is ISTIO_MUTUAL.
My understanding is that, if you don’t specify the caCertificates value the Gateway will skip validation of Server certificates, while if you do it will validate it based on the ca-certs you have uploaded.
@nicolasmi I forgot to mention, sorry - you have to use exportTo: '.' in your destination rule, so the destination rule will be applied in the egress gateway’s namespace only and the certificate will be loaded in that namespace only (for the egress gateway only).
Can you provide the cert detail? Not sure what do you mean “fqdn of other service is only a subject alt name” and why do we have the difference of the two services?
The services are running on a IIS Webserver (Windows Server 2016).
When I set the SSL option “Client Certificate” to accept or required I get:
“503 Service Unavailable” and “upstream connect error or disconnect/reset before headers. reset reason: connection Termination”
When I set the SSL option “Client Certificate” to ignore it works.
In the docs from Microsoft they state:
In a few cases, HTTP/2 can’t be used in combination with other features. In these situations, Windows will fall back to HTTP/1.1 and continue the transaction. This may involve negotiating HTTP/1.1 during the handshake, or sending an error code to the client instructing it to retry over an HTTP/1.1 connection.
Looks like the “negotiating HTTP/1.1 during the handshake, or sending an error code to the client instructing it to retry over an HTTP/1.1 connection” does not work with Istio.