Skip to content

Commit

Permalink
config: set the default value of auto_tls to false (#27486) (#29472)
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-srebot authored Nov 5, 2021
1 parent 7b068ea commit 8ec9a51
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ var defaultConf = Config{
Security: Security{
SpilledFileEncryptionMethod: SpilledFileEncryptionMethodPlaintext,
EnableSEM: false,
AutoTLS: true,
AutoTLS: false,
RSAKeySize: 4096,
},
DeprecateIntegerDisplayWidth: false,
Expand Down
4 changes: 3 additions & 1 deletion config/config.toml.example
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,9 @@ spilled-file-encryption-method = "plaintext"
# Security Enhanced Mode (SEM) restricts the "SUPER" privilege and requires fine-grained privileges instead.
enable-sem = false

# Automatic creation of TLS certificates
# Automatic creation of TLS certificates.
# Setting it to 'true' is recommended because it is safer and tie with the default configuration of MySQL.
# If this config is commented/missed, the value would be 'false' for the compatibility with TiDB versions that does not support it.
auto-tls = true

# Minium TLS version to use, e.g. "TLSv1.2"
Expand Down
3 changes: 2 additions & 1 deletion config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,8 @@ spilled-file-encryption-method = "aes128-ctr"
configFile = filepath.Join(filepath.Dir(localFile), "config.toml.example")
require.NoError(t, conf.Load(configFile))

// Make sure the example config is the same as default config.
// Make sure the example config is the same as default config except `auto_tls`.
conf.Security.AutoTLS = false
require.Equal(t, GetGlobalConfig(), conf)

// Test for log config.
Expand Down

0 comments on commit 8ec9a51

Please sign in to comment.