Skip to content

Commit

Permalink
Merge pull request #1423 from webbgeorge/teams-account-enhanced-file-…
Browse files Browse the repository at this point in the history
…detection

Add support for `body_scanning` (Enhanced File Detection) in teams account configuration
  • Loading branch information
jacobbednarz authored Oct 22, 2023
2 parents 8e3cfea + b8df4aa commit af6d964
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/1423.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
foo: Add support for body_scanning (Enhanced File Detection) in teams account configuration
```
12 changes: 12 additions & 0 deletions teams_accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ type TeamsAccountSettings struct {
BrowserIsolation *BrowserIsolation `json:"browser_isolation,omitempty"`
FIPS *TeamsFIPS `json:"fips,omitempty"`
ProtocolDetection *TeamsProtocolDetection `json:"protocol_detection,omitempty"`
BodyScanning *TeamsBodyScanning `json:"body_scanning,omitempty"`
}

type BrowserIsolation struct {
Expand Down Expand Up @@ -84,6 +85,17 @@ type TeamsBlockPage struct {
SuppressFooter *bool `json:"suppress_footer,omitempty"`
}

type TeamsInspectionMode = string

const (
TeamsShallowInspectionMode TeamsInspectionMode = "shallow"
TeamsDeepInspectionMode TeamsInspectionMode = "deep"
)

type TeamsBodyScanning struct {
InspectionMode TeamsInspectionMode `json:"inspection_mode,omitempty"`
}

type TeamsRuleType = string

const (
Expand Down
4 changes: 4 additions & 0 deletions teams_accounts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ func TestTeamsAccountConfiguration(t *testing.T) {
"logo_path": "https://logos.com/a.png",
"background_color": "#ff0000",
"suppress_footer": true
},
"body_scanning": {
"inspection_mode": "deep"
}
}
}
Expand All @@ -96,6 +99,7 @@ func TestTeamsAccountConfiguration(t *testing.T) {
TLSDecrypt: &TeamsTLSDecrypt{Enabled: true},
ProtocolDetection: &TeamsProtocolDetection{Enabled: true},
FIPS: &TeamsFIPS{TLS: true},
BodyScanning: &TeamsBodyScanning{InspectionMode: "deep"},

BlockPage: &TeamsBlockPage{
Enabled: BoolPtr(true),
Expand Down

0 comments on commit af6d964

Please sign in to comment.