Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GATE-5639: update teams account via PATCH and add custom certificate setting #1811

Merged
merged 3 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/1811.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
teams_account: adds custom certificate setting to teams account configuration
```
9 changes: 9 additions & 0 deletions teams_accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 (
Expand Down
6 changes: 6 additions & 0 deletions teams_accounts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ func TestTeamsAccountUpdateConfiguration(t *testing.T) {
},
"extended_email_matching": {
"enabled": true
},
"custom_certificate": {
"enabled": true
}
}
}
Expand All @@ -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)
Expand Down