|
@@ -303,6 +303,7 @@ func (t *ThrottleConfig) UnmarshalYAML(unmarshal func(interface{}) error) (err e
|
303
|
303
|
type AccountConfig struct {
|
304
|
304
|
Registration AccountRegistrationConfig
|
305
|
305
|
AuthenticationEnabled bool `yaml:"authentication-enabled"`
|
|
306
|
+ AdvertiseSCRAM bool `yaml:"advertise-scram"` // undocumented, see #1782
|
306
|
307
|
RequireSasl struct {
|
307
|
308
|
Enabled bool
|
308
|
309
|
Exempted []string
|
|
@@ -1379,7 +1380,12 @@ func LoadConfig(filename string) (config *Config, err error) {
|
1379
|
1380
|
config.Accounts.VHosts.validRegexp = defaultValidVhostRegex
|
1380
|
1381
|
}
|
1381
|
1382
|
|
1382
|
|
- config.Server.capValues[caps.SASL] = "PLAIN,EXTERNAL,SCRAM-SHA-256"
|
|
1383
|
+ saslCapValue := "PLAIN,EXTERNAL,SCRAM-SHA-256"
|
|
1384
|
+ // TODO(#1782) clean this up:
|
|
1385
|
+ if !config.Accounts.AdvertiseSCRAM {
|
|
1386
|
+ saslCapValue = "PLAIN,EXTERNAL"
|
|
1387
|
+ }
|
|
1388
|
+ config.Server.capValues[caps.SASL] = saslCapValue
|
1383
|
1389
|
if !config.Accounts.AuthenticationEnabled {
|
1384
|
1390
|
config.Server.supportedCaps.Disable(caps.SASL)
|
1385
|
1391
|
}
|