summaryrefslogtreecommitdiffstats
path: root/model/config.go
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2018-06-12 10:16:39 -0700
committerChristopher Speller <crspeller@gmail.com>2018-06-12 10:16:39 -0700
commit656c8a62d145fc565e9a98e060329239d2d59fbd (patch)
treeb4922cbf8b14992c353742e9e4225d7736a2e3a3 /model/config.go
parent4ea7f6a2f7e61356996a3dfa85169f8db5d4d064 (diff)
downloadchat-656c8a62d145fc565e9a98e060329239d2d59fbd.tar.gz
chat-656c8a62d145fc565e9a98e060329239d2d59fbd.tar.bz2
chat-656c8a62d145fc565e9a98e060329239d2d59fbd.zip
Prototype for CBA (#8475)
* Prototype for CBA * Fixing gofmt issues * Do not require password if logging in with certificate * Fixing issues from feedback * Adding unit tests * Fixing feedback
Diffstat (limited to 'model/config.go')
-rw-r--r--model/config.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/model/config.go b/model/config.go
index f2bebf03b..47e2f68a4 100644
--- a/model/config.go
+++ b/model/config.go
@@ -160,6 +160,9 @@ const (
COMPLIANCE_EXPORT_TYPE_GLOBALRELAY = "globalrelay"
GLOBALRELAY_CUSTOMER_TYPE_A9 = "A9"
GLOBALRELAY_CUSTOMER_TYPE_A10 = "A10"
+
+ CLIENT_SIDE_CERT_CHECK_PRIMARY_AUTH = "primary"
+ CLIENT_SIDE_CERT_CHECK_SECONDARY_AUTH = "secondary"
)
type ServiceSettings struct {
@@ -545,6 +548,21 @@ func (s *MetricsSettings) SetDefaults() {
}
}
+type ExperimentalSettings struct {
+ ClientSideCertEnable *bool
+ ClientSideCertCheck *string
+}
+
+func (s *ExperimentalSettings) SetDefaults() {
+ if s.ClientSideCertEnable == nil {
+ s.ClientSideCertEnable = NewBool(false)
+ }
+
+ if s.ClientSideCertCheck == nil {
+ s.ClientSideCertCheck = NewString(CLIENT_SIDE_CERT_CHECK_SECONDARY_AUTH)
+ }
+}
+
type AnalyticsSettings struct {
MaxUsersForStatistics *int
}
@@ -1829,6 +1847,7 @@ type Config struct {
NativeAppSettings NativeAppSettings
ClusterSettings ClusterSettings
MetricsSettings MetricsSettings
+ ExperimentalSettings ExperimentalSettings
AnalyticsSettings AnalyticsSettings
WebrtcSettings WebrtcSettings
ElasticsearchSettings ElasticsearchSettings
@@ -1891,6 +1910,7 @@ func (o *Config) SetDefaults() {
o.PasswordSettings.SetDefaults()
o.TeamSettings.SetDefaults()
o.MetricsSettings.SetDefaults()
+ o.ExperimentalSettings.SetDefaults()
o.SupportSettings.SetDefaults()
o.AnnouncementSettings.SetDefaults()
o.ThemeSettings.SetDefaults()