Skip to content

Commit

Permalink
feat: update teams antivirus settings to configure notification
Browse files Browse the repository at this point in the history
  • Loading branch information
Rex Scaria committed Feb 8, 2024
1 parent cca23db commit 9d5edcb
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .changelog/1499.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
teams_rules: `AntiVirus` settings includes notification settings
```
7 changes: 4 additions & 3 deletions teams_accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,10 @@ type BrowserIsolation struct {
}

type TeamsAntivirus struct {
EnabledDownloadPhase bool `json:"enabled_download_phase"`
EnabledUploadPhase bool `json:"enabled_upload_phase"`
FailClosed bool `json:"fail_closed"`
EnabledDownloadPhase bool `json:"enabled_download_phase"`
EnabledUploadPhase bool `json:"enabled_upload_phase"`
FailClosed bool `json:"fail_closed"`
NotificationSettings *TeamsNotificationSettings `json:"notification_settings"`
}

type TeamsFIPS struct {
Expand Down
20 changes: 16 additions & 4 deletions teams_accounts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,13 @@ func TestTeamsAccountConfiguration(t *testing.T) {
"result": {
"settings": {
"antivirus": {
"enabled_download_phase": true
},
"enabled_download_phase": true,
"notification_settings": {
"enabled":true,
"msg":"msg",
"support_url":"https://hi.com"
}
},
"tls_decrypt": {
"enabled": true
},
Expand All @@ -82,7 +87,7 @@ func TestTeamsAccountConfiguration(t *testing.T) {
"browser_isolation": {
"url_browser_isolation_enabled": true,
"non_identity_enabled": true
},
},
"body_scanning": {
"inspection_mode": "deep"
},
Expand All @@ -101,7 +106,14 @@ func TestTeamsAccountConfiguration(t *testing.T) {

if assert.NoError(t, err) {
assert.Equal(t, actual.Settings, TeamsAccountSettings{
Antivirus: &TeamsAntivirus{EnabledDownloadPhase: true},
Antivirus: &TeamsAntivirus{
EnabledDownloadPhase: true,
NotificationSettings: &TeamsNotificationSettings{
Enabled: &trueValue,
Message: "msg",
SupportURL: "https://hi.com",
},
},
ActivityLog: &TeamsActivityLog{Enabled: true},
TLSDecrypt: &TeamsTLSDecrypt{Enabled: true},
ProtocolDetection: &TeamsProtocolDetection{Enabled: true},
Expand Down

0 comments on commit 9d5edcb

Please sign in to comment.