mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-17 03:24:40 -07:00
Merge pull request #143 from nats-io/tls_strict_route
TLS strict route verifications
This commit is contained in:
@@ -31,6 +31,13 @@ Authorization Options:
|
||||
--user user User required for connections
|
||||
--pass password Password required for connections
|
||||
|
||||
TLS Options:
|
||||
--tls Enable TLS, do not verify clients (default: false)
|
||||
--tlscert FILE Server certificate file
|
||||
--tlskey FILE Private key for server certificate
|
||||
--tlsverify Enable TLS, very client certificates
|
||||
--tlscacert client Client certificate CA for verification
|
||||
|
||||
Cluster Options:
|
||||
--routes [rurl-1, rurl-2] Routes to solicit and connect
|
||||
|
||||
|
||||
@@ -189,6 +189,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