From 7994a570893f2e4199e13ac1b1134b2cf13f305c Mon Sep 17 00:00:00 2001 From: Roy Lane Date: Wed, 11 Dec 2024 17:51:25 -0500 Subject: [PATCH] commoncontrols: check "takeout_service_status" in 12.1 --- .../commoncontrols/commoncontrols_api12_test.rego | 7 +++++++ scubagoggles/rego/Commoncontrols.rego | 1 + 2 files changed, 8 insertions(+) diff --git a/scubagoggles/Testing/RegoTests/commoncontrols/commoncontrols_api12_test.rego b/scubagoggles/Testing/RegoTests/commoncontrols/commoncontrols_api12_test.rego index e1dc2717..31a7eda7 100644 --- a/scubagoggles/Testing/RegoTests/commoncontrols/commoncontrols_api12_test.rego +++ b/scubagoggles/Testing/RegoTests/commoncontrols/commoncontrols_api12_test.rego @@ -7,6 +7,7 @@ import data.utils.PassTestResult GoodCaseInputApi12 := { "policies": { "topOU": { + "takeout_service_status": {"serviceState": "ENABLED"}, "blogger_user_takeout": {"takeoutStatus": "DISABLED"}, "books_user_takeout": {"takeoutStatus": "DISABLED"}, "location_history_user_takeout": {"takeoutStatus": "DISABLED"}, @@ -16,6 +17,10 @@ GoodCaseInputApi12 := { "play_console_user_takeout": {"takeoutStatus": "DISABLED"}, "play_user_takeout": {"takeoutStatus": "DISABLED"}, "youtube_user_takeout": {"takeoutStatus": "DISABLED"} + }, + "nextOU": { + "takeout_service_status": {"serviceState": "DISABLED"}, + "blogger_user_takeout": {"takeoutStatus": "ENABLED"} } }, "tenant_info": { @@ -26,6 +31,7 @@ GoodCaseInputApi12 := { BadCaseInputApi12 := { "policies": { "topOU": { + "takeout_service_status": {"serviceState": "ENABLED"}, "blogger_user_takeout": {"takeoutStatus": "ENABLED"}, "books_user_takeout": {"takeoutStatus": "ENABLED"}, "location_history_user_takeout": {"takeoutStatus": "ENABLED"}, @@ -45,6 +51,7 @@ BadCaseInputApi12 := { BadCaseInputApi12a := { "policies": { "topOU": { + "takeout_service_status": {"serviceState": "ENABLED"}, "blogger_user_takeout": {"takeoutStatus": "DISABLED"}, "books_user_takeout": {"takeoutStatus": "DISABLED"}, "location_history_user_takeout": {"takeoutStatus": "DISABLED"}, diff --git a/scubagoggles/rego/Commoncontrols.rego b/scubagoggles/rego/Commoncontrols.rego index 1b9ed227..eb4f54d7 100644 --- a/scubagoggles/rego/Commoncontrols.rego +++ b/scubagoggles/rego/Commoncontrols.rego @@ -2100,6 +2100,7 @@ NonCompliantOUs12_1 contains { } if { some OU, settings in input.policies + utils.AppEnabled(input.policies, "takeout", OU) EnabledApps :=[value | some key, value in Takeout section := sprintf("%s_user_takeout", [key])