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 f119e22
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 41 deletions.
3 changes: 3 additions & 0 deletions .changelog/1499.txt
@@ -0,0 +1,3 @@
```release-note:enhancement
teams_rules: `AntiVirus` settings includes notification settings
```
7 changes: 4 additions & 3 deletions teams_accounts.go
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
88 changes: 50 additions & 38 deletions teams_accounts_test.go
Expand Up @@ -53,44 +53,49 @@ func TestTeamsAccountConfiguration(t *testing.T) {
"messages": [],
"result": {
"settings": {
"antivirus": {
"enabled_download_phase": true
},
"tls_decrypt": {
"enabled": true
},
"protocol_detection": {
"enabled": true
},
"fips": {
"tls": true
},
"activity_log": {
"enabled": true
},
"block_page": {
"enabled": true,
"name": "Cloudflare",
"footer_text": "--footer--",
"header_text": "--header--",
"mailto_address": "admin@example.com",
"mailto_subject": "Blocked User Inquiry",
"logo_path": "https://logos.com/a.png",
"background_color": "#ff0000",
"suppress_footer": true
},
"browser_isolation": {
"url_browser_isolation_enabled": true,
"non_identity_enabled": true
},
"body_scanning": {
"inspection_mode": "deep"
},
"extended_email_matching": {
"enabled": true
"antivirus": {
"enabled_download_phase": true,
"notification_settings": {
"enabled":true,
"msg":"msg",
"support_url":"https://hi.com"
}
}
}
},
"tls_decrypt": {
"enabled":true
},
"protocol_detection": {
"enabled":true
},
"fips": {
"tls":true
},
"activity_log": {
"enabled":true
},
"block_page": {
"enabled":true,
"name":"Cloudflare",
"footer_text":"--footer--",
"header_text":"--header--",
"mailto_address":"admin@example.com",
"mailto_subject":"Blocked User Inquiry",
"logo_path":"https://logos.com/a.png",
"background_color":"#ff0000",
"suppress_footer":true
},
"browser_isolation": {
"url_browser_isolation_enabled":true,
"non_identity_enabled":true
},
"body_scanning": {
"inspection_mode":"deep"
},
"extended_email_matching": {
"enabled":true
}
}
}
}
`)
}
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 f119e22

Please sign in to comment.