generated from cisagov/ScubaGear
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New Policy 5.1 for Meet for 1:1 Calling (#316)
* Changes to meet, added in 1:1 policy * Update drift-rules/GWS Drift Monitoring Rules - Meet.csv Correcting Version Number Co-authored-by: Alden Hilton <[email protected]> * Update baselines/Google Meet Minimum Viable Secure Configuration Baseline v0.2.md Correct Version Number Co-authored-by: Alden Hilton <[email protected]> * Update baselines/Google Meet Minimum Viable Secure Configuration Baseline v0.2.md Correct Version Number Co-authored-by: Alden Hilton <[email protected]> * Apply suggestions from code review Co-authored-by: Alden Hilton <[email protected]> * Correct control ID to meet * Implement GWS.MEET.5.1v0.2 * Apply suggestions from code review Co-authored-by: David Bui <[email protected]> --------- Co-authored-by: Alden Hilton <[email protected]> Co-authored-by: jkaufman-mitre <[email protected]> Co-authored-by: Alden Hilton <[email protected]> Co-authored-by: David Bui <[email protected]>
- Loading branch information
1 parent
b0c764a
commit f946599
Showing
4 changed files
with
396 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,288 @@ | ||
package meet | ||
import future.keywords | ||
|
||
# | ||
# GWS.MEET.5.1v0.2 | ||
#-- | ||
test_Incoming_Correct_V1 if { | ||
# Test restricted to contacts | ||
PolicyId := "GWS.MEET.5.1v0.2" | ||
Output := tests with input as { | ||
"meet_logs": {"items": [ | ||
{ | ||
"id": {"time": "2022-12-20T00:02:28.672Z"}, | ||
"events": [{ | ||
"parameters": [ | ||
{ | ||
"name": "SETTING_NAME", | ||
"value": "Incoming call restrictions Allowed caller type" | ||
}, | ||
{"name": "NEW_VALUE", "value": "CONTACTS_AND_SAME_DOMAIN"}, | ||
{"name": "ORG_UNIT_NAME", "value": "Test Top-Level OU"}, | ||
] | ||
}] | ||
} | ||
]}, | ||
"tenant_info": { | ||
"topLevelOU": "" | ||
} | ||
} | ||
|
||
RuleOutput := [Result | some Result in Output; Result.PolicyId == PolicyId] | ||
count(RuleOutput) == 1 | ||
RuleOutput[0].RequirementMet | ||
not RuleOutput[0].NoSuchEvent | ||
RuleOutput[0].ReportDetails == "Requirement met in all OUs and groups." | ||
} | ||
|
||
test_Incoming_Correct_V2 if { | ||
# Test disabled | ||
PolicyId := "GWS.MEET.5.1v0.2" | ||
Output := tests with input as { | ||
"meet_logs": {"items": [ | ||
{ | ||
"id": {"time": "2022-12-20T00:02:28.672Z"}, | ||
"events": [{ | ||
"parameters": [ | ||
{ | ||
"name": "SETTING_NAME", | ||
"value": "Incoming call restrictions Allowed caller type" | ||
}, | ||
{"name": "NEW_VALUE", "value": "NO_ONE"}, | ||
{"name": "ORG_UNIT_NAME", "value": "Test Top-Level OU"}, | ||
] | ||
}] | ||
} | ||
]}, | ||
"tenant_info": { | ||
"topLevelOU": "" | ||
} | ||
} | ||
|
||
RuleOutput := [Result | some Result in Output; Result.PolicyId == PolicyId] | ||
count(RuleOutput) == 1 | ||
RuleOutput[0].RequirementMet | ||
not RuleOutput[0].NoSuchEvent | ||
RuleOutput[0].ReportDetails == "Requirement met in all OUs and groups." | ||
} | ||
|
||
test_Incoming_Correct_V3 if { | ||
# Test inheritance | ||
PolicyId := "GWS.MEET.5.1v0.2" | ||
Output := tests with input as { | ||
"meet_logs": {"items": [ | ||
{ | ||
"id": {"time": "2022-12-20T00:02:28.672Z"}, | ||
"events": [{ | ||
"parameters": [ | ||
{ | ||
"name": "SETTING_NAME", | ||
"value": "Incoming call restrictions Allowed caller type" | ||
}, | ||
{"name": "NEW_VALUE", "value": "NO_ONE"}, | ||
{"name": "ORG_UNIT_NAME", "value": "Test Top-Level OU"}, | ||
] | ||
}] | ||
}, | ||
{ | ||
"id": {"time": "2022-12-20T00:02:28.672Z"}, | ||
"events": [{ | ||
"parameters": [ | ||
{ | ||
"name": "SETTING_NAME", | ||
"value": "Incoming call restrictions Allowed caller type" | ||
}, | ||
{"name": "NEW_VALUE", "value": "NO_ONE"}, | ||
{"name": "ORG_UNIT_NAME", "value": "Test Second-Level OU"}, | ||
] | ||
}] | ||
}, | ||
{ | ||
"id": {"time": "2023-12-20T00:02:28.672Z"}, | ||
"events": [{ | ||
"name": "DELETE_APPLICATION_SETTING", | ||
"parameters": [ | ||
{"name": "SETTING_NAME", "value": "Incoming call restrictions Allowed caller type"}, | ||
{"name": "ORG_UNIT_NAME", "value": "Test Second-Level OU"}, | ||
] | ||
}] | ||
}, | ||
]}, | ||
"tenant_info": { | ||
"topLevelOU": "Test Top-Level OU" | ||
} | ||
} | ||
|
||
RuleOutput := [Result | some Result in Output; Result.PolicyId == PolicyId] | ||
count(RuleOutput) == 1 | ||
RuleOutput[0].RequirementMet | ||
not RuleOutput[0].NoSuchEvent | ||
RuleOutput[0].ReportDetails == "Requirement met in all OUs and groups." | ||
} | ||
|
||
test_Incoming_Incorrect_V1 if { | ||
# Test top-level OU wrong | ||
PolicyId := "GWS.MEET.5.1v0.2" | ||
Output := tests with input as { | ||
"meet_logs": {"items": [ | ||
{ | ||
"id": {"time": "2022-12-20T00:02:28.672Z"}, | ||
"events": [{ | ||
"parameters": [ | ||
{ | ||
"name": "SETTING_NAME", | ||
"value": "Incoming call restrictions Allowed caller type" | ||
}, | ||
{"name": "NEW_VALUE", "value": "ALL"}, | ||
{"name": "ORG_UNIT_NAME", "value": "Test Top-Level OU"}, | ||
] | ||
}] | ||
} | ||
]}, | ||
"tenant_info": { | ||
"topLevelOU": "" | ||
} | ||
} | ||
|
||
RuleOutput := [Result | some Result in Output; Result.PolicyId == PolicyId] | ||
count(RuleOutput) == 1 | ||
not RuleOutput[0].RequirementMet | ||
not RuleOutput[0].NoSuchEvent | ||
RuleOutput[0].ReportDetails == concat("", [ | ||
"The following OUs are non-compliant:<ul>", | ||
"<li>Test Top-Level OU: Users can receive calls from anyone</li>", | ||
"</ul>" | ||
]) | ||
} | ||
|
||
test_Incoming_Incorrect_V2 if { | ||
# Test child OU wrong | ||
PolicyId := "GWS.MEET.5.1v0.2" | ||
Output := tests with input as { | ||
"meet_logs": {"items": [ | ||
{ | ||
"id": {"time": "2022-12-20T00:02:28.672Z"}, | ||
"events": [{ | ||
"parameters": [ | ||
{ | ||
"name": "SETTING_NAME", | ||
"value": "Incoming call restrictions Allowed caller type" | ||
}, | ||
{"name": "NEW_VALUE", "value": "NO_ONE"}, | ||
{"name": "ORG_UNIT_NAME", "value": "Test Top-Level OU"}, | ||
] | ||
}] | ||
}, | ||
{ | ||
"id": {"time": "2022-12-20T00:02:28.672Z"}, | ||
"events": [{ | ||
"parameters": [ | ||
{ | ||
"name": "SETTING_NAME", | ||
"value": "Incoming call restrictions Allowed caller type" | ||
}, | ||
{"name": "NEW_VALUE", "value": "ALL"}, | ||
{"name": "ORG_UNIT_NAME", "value": "Test Second-Level OU"}, | ||
] | ||
}] | ||
} | ||
]}, | ||
"tenant_info": { | ||
"topLevelOU": "Test Top-Level OU" | ||
} | ||
} | ||
|
||
RuleOutput := [Result | some Result in Output; Result.PolicyId == PolicyId] | ||
count(RuleOutput) == 1 | ||
not RuleOutput[0].RequirementMet | ||
not RuleOutput[0].NoSuchEvent | ||
RuleOutput[0].ReportDetails == concat("", [ | ||
"The following OUs are non-compliant:<ul>", | ||
"<li>Test Second-Level OU: Users can receive calls from anyone</li>", | ||
"</ul>" | ||
]) | ||
} | ||
|
||
test_Incoming_Incorrect_V3 if { | ||
# Test group wrong | ||
PolicyId := "GWS.MEET.5.1v0.2" | ||
Output := tests with input as { | ||
"meet_logs": {"items": [ | ||
{ | ||
"id": {"time": "2022-12-20T00:02:28.672Z"}, | ||
"events": [{ | ||
"parameters": [ | ||
{ | ||
"name": "SETTING_NAME", | ||
"value": "Incoming call restrictions Allowed caller type" | ||
}, | ||
{"name": "NEW_VALUE", "value": "NO_ONE"}, | ||
{"name": "ORG_UNIT_NAME", "value": "Test Top-Level OU"}, | ||
] | ||
}] | ||
}, | ||
{ | ||
"id": {"time": "2022-12-20T00:02:28.672Z"}, | ||
"events": [{ | ||
"parameters": [ | ||
{ | ||
"name": "SETTING_NAME", | ||
"value": "Incoming call restrictions Allowed caller type" | ||
}, | ||
{"name": "NEW_VALUE", "value": "ALL"}, | ||
{"name": "GROUP_EMAIL", "value": "[email protected]"}, | ||
] | ||
}] | ||
} | ||
]}, | ||
"tenant_info": { | ||
"topLevelOU": "Test Top-Level OU" | ||
} | ||
} | ||
|
||
RuleOutput := [Result | some Result in Output; Result.PolicyId == PolicyId] | ||
count(RuleOutput) == 1 | ||
not RuleOutput[0].RequirementMet | ||
not RuleOutput[0].NoSuchEvent | ||
RuleOutput[0].ReportDetails == concat("", [ | ||
"The following groups are non-compliant:<ul>", | ||
"<li>[email protected]: Users can receive calls from anyone</li>", | ||
"</ul>" | ||
]) | ||
} | ||
|
||
test_Incoming_Incorrect_V4 if { | ||
# Test no events | ||
PolicyId := "GWS.MEET.5.1v0.2" | ||
Output := tests with input as { | ||
"meet_logs": {"items": [ | ||
{ | ||
"id": {"time": "2022-12-20T00:02:28.672Z"}, | ||
"events": [{ | ||
"parameters": [ | ||
{ | ||
"name": "SETTING_NAME", | ||
"value": "something else" | ||
}, | ||
{"name": "NEW_VALUE", "value": "ALL"}, | ||
{"name": "ORG_UNIT_NAME", "value": "Test Top-Level OU"}, | ||
] | ||
}] | ||
} | ||
]}, | ||
"tenant_info": { | ||
"topLevelOU": "" | ||
} | ||
} | ||
|
||
RuleOutput := [Result | some Result in Output; Result.PolicyId == PolicyId] | ||
count(RuleOutput) == 1 | ||
not RuleOutput[0].RequirementMet | ||
RuleOutput[0].NoSuchEvent | ||
RuleOutput[0].ReportDetails == concat("", [ | ||
"No relevant event in the current logs for the top-level OU, Test Top-Level OU. ", | ||
"While we are unable to determine the state from the logs, the default setting is non-compliant; ", | ||
"manual check recommended." | ||
]) | ||
} | ||
#-- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.