Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config: set the default value of auto_tls to false #27486

Merged
merged 3 commits into from
Nov 4, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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