Fix tls_compatibility key in yaml config (#955)

Closes #271
This commit is contained in:
Zach Wasserman 2021-06-04 08:44:36 -07:00 committed by GitHub
parent ec2814d77f
commit 16a8e13f85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 9 deletions

View File

@ -418,11 +418,9 @@ Configures the TLS settings for compatibility with various user agents. Options
```
server:
tlsprofile: intermediate
tls_compatibility: intermediate
```
Please note this option has an inconsistent key name in the config file. This will be fixed in Fleet 4.0.0.
###### `server_url_prefix`
Sets a URL prefix to use when serving the Fleet API and frontend. Prefixes should be in the form `/apps/fleet` (no trailing slash).

View File

@ -54,7 +54,7 @@ type ServerConfig struct {
Cert string
Key string
TLS bool
TLSProfile string // TODO #271 set `yaml:"tls_compatibility"`
TLSProfile string `yaml:"tls_compatibility"`
URLPrefix string `yaml:"url_prefix"`
Keepalive bool `yaml:"keepalive"`
}

View File

@ -39,11 +39,8 @@ func TestConfigRoundtrip(t *testing.T) {
switch conf_v.Type().Field(key_index).Name {
case "TLSProfile":
// we have to explicitly set value for this key as it will only
// accept old, intermediate, or modern
// TODO #271 use TLSProfileIntermediate to ensure that the
// non-default option gets set here.
key_v.SetString(TLSProfileIntermediate)
// accept intermediate or modern
key_v.SetString(TLSProfileModern)
default:
key_v.SetString(v.Elem().Type().Field(conf_index).Name + "_" + conf_v.Type().Field(key_index).Name)
}