concept certificate in category istio

appears as: certificates, certificate, certificates, certificate, The certificates
Istio in Action

This is an excerpt from Manning's book Istio in Action.

Lastly, ACME company found that the service teams implementing service A and B were handling security completely differently. Team A favored secure connections with certificates and private keys, while service B created their own custom framework built on servlet interceptors. The team operating service C decided they didn’t need any additional security since these were "internal" services behind the company firewall.

The previous statement wasn’t entirely correct: the client doesn’t technically decrypt the traffic with the server’s public key. The TLS handshake includes a more sophisticated protocol that combines the public/private keys (asymemntric) for initial communication and then create a session key (symmetric) that is used for the TLS session to encrypt/decrypt traffic. See the book "Bulletproof SSL and TLS" for a more in-depth treatment of TLS.

Now we can configure our Istio Gateway resource to use the certificates and keys:

apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  name: coolstore-gateway
spec:
  selector:
    istio: ingressgateway
  servers:
  - port:
      number: 80 #1
      name: http
      protocol: HTTP
    hosts:
    - "apiserver.istioinaction.io"
  - port:
      number: 443 #2
      name: https
      protocol: HTTPS
    tls:
      mode: SIMPLE #3
      credentialName: apiserver-credential
    hosts:
    - "apiserver.istioinaction.io"

As we can see in our Gateway resource in listing XX, we’ve opened port 443 on our ingress gateway, and we’ve specified its protocol to be HTTPS. Additionally, we’ve added a tls section to our gateway configuration where we’ve specified the locations to find the certificates and keys to use for TLS. Note, these are the same locations that were mounted into the istio-ingressgateway that we saw earlier.