add config option to enable or disable TLS for nats

This commit is contained in:
David Christofas
2022-10-21 12:40:21 +02:00
committed by Michael Barz
parent ff8b16f9da
commit 45b92fc56f
26 changed files with 132 additions and 86 deletions
@@ -137,6 +137,7 @@ type Events struct {
ClusterID string `yaml:"cluster" env:"STORAGE_USERS_EVENTS_CLUSTER" desc:"The clusterID of the event system. The event system is the message queuing service. It is used as message broker for the microservice architecture. Mandatory when using NATS as event system."`
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_INSECURE;STORAGE_USERS_EVENTS_TLS_INSECURE" desc:"Whether to verify the server TLS certificates."`
TLSRootCaCertPath string `yaml:"tls_root_ca_cert_path" env:"STORAGE_USERS_EVENTS_TLS_ROOT_CA_CERT" desc:"The root CA certificate used to validate the server's TLS certificate. If provided STORAGE_USERS_EVENTS_TLS_INSECURE will be seen as false."`
EnableTLS bool `yaml:"enable_tls" env:"OCIS_EVENTS_ENABLE_TLS;STORAGE_USERS_EVENTS_ENABLE_TLS" desc:"Enable TLS for the connection to the events broker."`
}
// Cache holds cache config
@@ -75,9 +75,9 @@ func DefaultConfig() *config.Config {
},
},
Events: config.Events{
Addr: "127.0.0.1:9233",
ClusterID: "ocis-cluster",
TLSInsecure: true,
Addr: "127.0.0.1:9233",
ClusterID: "ocis-cluster",
EnableTLS: false,
},
Cache: config.Cache{
Store: "memory",