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

Add support for body_scanning (Enhanced File Detection) in teams account configuration #1423

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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading