Skip to content

Commit

Permalink
GATE-5639: Add custom certificate setting to teams account configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
alyssamw committed Apr 17, 2024
1 parent 6ba12b6 commit 3dec75d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
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:bug
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

0 comments on commit 3dec75d

Please sign in to comment.