mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-14 10:10:42 -07:00
Strict verification for route TLS
This commit is contained in:
@@ -188,6 +188,11 @@ func parseCluster(cm map[string]interface{}, opts *Options) error {
|
||||
if opts.ClusterTLSConfig, err = GenTLSConfig(tc); err != nil {
|
||||
return err
|
||||
}
|
||||
// For clusters, we will force strict verification. We also act
|
||||
// as both client and server, so will mirror the rootCA to the
|
||||
// clientCA pool.
|
||||
opts.ClusterTLSConfig.ClientAuth = tls.RequireAndVerifyClientCert
|
||||
opts.ClusterTLSConfig.ClientCAs = opts.ClusterTLSConfig.RootCAs
|
||||
opts.ClusterTLSTimeout = tc.Timeout
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user