@@ -443,13 +443,15 @@ type configJSON struct {
443
443
}
444
444
445
445
type securityConfig struct {
446
- CertFile string `json:"cert-file"`
447
- KeyFile string `json:"key-file"`
448
- ClientCertFile string `json:"client-cert-file"`
449
- ClientKeyFile string `json:"client-key-file"`
450
- CertAuth bool `json:"client-cert-auth"`
451
- TrustedCAFile string `json:"trusted-ca-file"`
452
- AutoTLS bool `json:"auto-tls"`
446
+ CertFile string `json:"cert-file"`
447
+ KeyFile string `json:"key-file"`
448
+ ClientCertFile string `json:"client-cert-file"`
449
+ ClientKeyFile string `json:"client-key-file"`
450
+ CertAuth bool `json:"client-cert-auth"`
451
+ TrustedCAFile string `json:"trusted-ca-file"`
452
+ AutoTLS bool `json:"auto-tls"`
453
+ AllowedCN string `json:"allowed-cn"`
454
+ AllowedHostname string `json:"allowed-hostname"`
453
455
}
454
456
455
457
// NewConfig creates a new Config populated with default values.
@@ -629,6 +631,8 @@ func (cfg *configYAML) configFromFile(path string) error {
629
631
tls .ClientKeyFile = ysc .ClientKeyFile
630
632
tls .ClientCertAuth = ysc .CertAuth
631
633
tls .TrustedCAFile = ysc .TrustedCAFile
634
+ tls .AllowedCN = ysc .AllowedCN
635
+ tls .AllowedHostname = ysc .AllowedHostname
632
636
}
633
637
copySecurityDetails (& cfg .ClientTLSInfo , & cfg .ClientSecurityJSON )
634
638
copySecurityDetails (& cfg .PeerTLSInfo , & cfg .PeerSecurityJSON )
0 commit comments