Skip to content

Commit

Permalink
config: set the default value of auto_tls to false (pingcap#27515)
Browse files Browse the repository at this point in the history
  • Loading branch information
bb7133 authored Aug 23, 2021
1 parent 904dc99 commit b2af0b8
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 @@ -676,7 +676,7 @@ var defaultConf = Config{
Security: Security{
SpilledFileEncryptionMethod: SpilledFileEncryptionMethodPlaintext,
EnableSEM: false,
AutoTLS: true,
AutoTLS: false,
},
DeprecateIntegerDisplayWidth: false,
EnableEnumLengthLimit: true,
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

[status]
Expand Down
3 changes: 2 additions & 1 deletion config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,8 @@ spilled-file-encryption-method = "aes128-ctr"
configFile = filepath.Join(filepath.Dir(localFile), "config.toml.example")
c.Assert(conf.Load(configFile), IsNil)

// 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
c.Assert(conf, DeepEquals, GetGlobalConfig())

// Test for log config.
Expand Down

0 comments on commit b2af0b8

Please sign in to comment.