mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
agent: add top-level warning if mTLS is not configured (#16800)
Nomad's security model requires mTLS in order to secure client-to-server and server-to-server communications. Configuring ACLs alone is not enough. Loudly warn the user if mTLS is not configured in non-dev modes.
This commit is contained in:
@@ -328,6 +328,10 @@ func (c *Command) IsValidConfig(config, cmdConfig *Config) bool {
|
||||
c.Ui.Error(fmt.Sprintf("WARNING: Error when parsing TLS configuration: %v", err))
|
||||
}
|
||||
}
|
||||
if !config.DevMode && (config.TLSConfig == nil ||
|
||||
!config.TLSConfig.EnableHTTP || !config.TLSConfig.EnableRPC) {
|
||||
c.Ui.Error("WARNING: mTLS is not configured - Nomad is not secure without mTLS!")
|
||||
}
|
||||
|
||||
if config.Server.EncryptKey != "" {
|
||||
if _, err := config.Server.EncryptBytes(); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user