From 6afd3ffd69c1a2551e9a97e38e051baf2f24aaa0 Mon Sep 17 00:00:00 2001 From: alyssamw <44008488+alyssamw@users.noreply.github.com> Date: Wed, 17 Apr 2024 20:22:03 -0700 Subject: [PATCH] GATE-5639: update teams account via PATCH and add custom certificate setting (#1811) * GATE-5639: Add custom certificate setting to teams account configuration * Update 1811.txt * Update 1811.txt --------- Co-authored-by: Jacob Bednarz --- .changelog/1811.txt | 3 +++ teams_accounts.go | 9 +++++++++ teams_accounts_test.go | 6 ++++++ 3 files changed, 18 insertions(+) create mode 100644 .changelog/1811.txt diff --git a/.changelog/1811.txt b/.changelog/1811.txt new file mode 100644 index 00000000000..86b6399a22a --- /dev/null +++ b/.changelog/1811.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +teams_account: adds custom certificate setting to teams account configuration +``` diff --git a/teams_accounts.go b/teams_accounts.go index fc8fbb984fd..a027dbee9b7 100644 --- a/teams_accounts.go +++ b/teams_accounts.go @@ -46,6 +46,7 @@ type TeamsAccountSettings struct { ProtocolDetection *TeamsProtocolDetection `json:"protocol_detection,omitempty"` BodyScanning *TeamsBodyScanning `json:"body_scanning,omitempty"` ExtendedEmailMatching *TeamsExtendedEmailMatching `json:"extended_email_matching,omitempty"` + CustomCertificate *TeamsCustomCertificate `json:"custom_certificate,omitempty"` } type BrowserIsolation struct { @@ -103,6 +104,14 @@ type TeamsExtendedEmailMatching struct { Enabled *bool `json:"enabled,omitempty"` } +type TeamsCustomCertificate struct { + Enabled *bool `json:"enabled,omitempty"` + ID string `json:"id,omitempty"` + BindingStatus string `json:"binding_status,omitempty"` + QsPackId string `json:"qs_pack_id,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` +} + type TeamsRuleType = string const ( diff --git a/teams_accounts_test.go b/teams_accounts_test.go index a7d096d1cf4..10f4807a2f7 100644 --- a/teams_accounts_test.go +++ b/teams_accounts_test.go @@ -169,6 +169,9 @@ func TestTeamsAccountUpdateConfiguration(t *testing.T) { }, "extended_email_matching": { "enabled": true + }, + "custom_certificate": { + "enabled": true } } } @@ -184,6 +187,9 @@ func TestTeamsAccountUpdateConfiguration(t *testing.T) { ExtendedEmailMatching: &TeamsExtendedEmailMatching{ Enabled: BoolPtr(true), }, + CustomCertificate: &TeamsCustomCertificate{ + Enabled: BoolPtr(true), + }, } mux.HandleFunc("/accounts/"+testAccountID+"/gateway/configuration", handler)