TLS Authentication in clusters

When setting up clusters, all servers in the cluster, if using TLS, will both verify the connecting endpoints and the server responses. So certificates are checked in both directions. Certificates can be configured only for the server’s cluster identity, keeping client and server certificates separate from cluster formation.

TLS Mutual Authentication is the only way of securing routes.

  1. cluster {
  2. listen: 127.0.0.1:4244
  3. tls {
  4. # Route cert
  5. cert_file: "./configs/certs/srva-cert.pem"
  6. # Private key
  7. key_file: "./configs/certs/srva-key.pem"
  8. # Optional certificate authority verifying connected routes
  9. # Required when we have self-signed CA, etc.
  10. ca_file: "./configs/certs/ca.pem"
  11. }
  12. # Routes are actively solicited and connected to from this server.
  13. # Other servers can connect to us if they supply the correct credentials
  14. # in their routes definitions from above.
  15. routes = [
  16. nats://127.0.0.1:4246
  17. ]
  18. }