From fcd831cd946cbf7481da8b12e98e976a3c9b12a3 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Tue, 8 Oct 2024 14:23:57 +1100 Subject: [PATCH] [8.x] [Security Solution] Add csp-rule-template to the Security Default Saved Objects (#194224) (#195338) # Backport This will backport the following commits from `main` to `8.x`: - [[Security Solution] Add csp-rule-template to the Security Default Saved Objects (#194224)](https://github.com/elastic/kibana/pull/194224) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) Co-authored-by: Paulo Silva --- .../security_saved_objects.ts | 3 ++ .../platform_security/authorization.ts | 34 +++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/x-pack/plugins/security_solution/server/lib/product_features_service/security_saved_objects.ts b/x-pack/plugins/security_solution/server/lib/product_features_service/security_saved_objects.ts index a1ea96631bdc2..b739d44db3e4f 100644 --- a/x-pack/plugins/security_solution/server/lib/product_features_service/security_saved_objects.ts +++ b/x-pack/plugins/security_solution/server/lib/product_features_service/security_saved_objects.ts @@ -12,6 +12,8 @@ import { savedObjectTypes } from '../../saved_objects'; // Same as the saved-object type for rules defined by Cloud Security Posture const CLOUD_POSTURE_SAVED_OBJECT_RULE_TYPE = 'csp_rule'; const CLOUD_SECURITY_POSTURE_SETTINGS = 'cloud-security-posture-settings'; +// Benchmark Rule Templates installed by the Cloud Security Posture package stored as Saved Objects: +const CLOUD_SECURITY_POSTURE_BENCHMARK_RULE_TEMPLATE = 'csp-rule-template'; export const securityDefaultSavedObjects = [ 'exception-list', @@ -20,4 +22,5 @@ export const securityDefaultSavedObjects = [ ...savedObjectTypes, CLOUD_POSTURE_SAVED_OBJECT_RULE_TYPE, CLOUD_SECURITY_POSTURE_SETTINGS, + CLOUD_SECURITY_POSTURE_BENCHMARK_RULE_TEMPLATE, ]; diff --git a/x-pack/test_serverless/api_integration/test_suites/security/platform_security/authorization.ts b/x-pack/test_serverless/api_integration/test_suites/security/platform_security/authorization.ts index 8852f274aeea3..c3b37539946ff 100644 --- a/x-pack/test_serverless/api_integration/test_suites/security/platform_security/authorization.ts +++ b/x-pack/test_serverless/api_integration/test_suites/security/platform_security/authorization.ts @@ -397,6 +397,18 @@ export default function ({ getService }: FtrProviderContext) { "saved_object:cloud-security-posture-settings/delete", "saved_object:cloud-security-posture-settings/bulk_delete", "saved_object:cloud-security-posture-settings/share_to_space", + "saved_object:csp-rule-template/bulk_get", + "saved_object:csp-rule-template/get", + "saved_object:csp-rule-template/find", + "saved_object:csp-rule-template/open_point_in_time", + "saved_object:csp-rule-template/close_point_in_time", + "saved_object:csp-rule-template/create", + "saved_object:csp-rule-template/bulk_create", + "saved_object:csp-rule-template/update", + "saved_object:csp-rule-template/bulk_update", + "saved_object:csp-rule-template/delete", + "saved_object:csp-rule-template/bulk_delete", + "saved_object:csp-rule-template/share_to_space", "saved_object:telemetry/bulk_get", "saved_object:telemetry/get", "saved_object:telemetry/find", @@ -1242,6 +1254,18 @@ export default function ({ getService }: FtrProviderContext) { "saved_object:cloud-security-posture-settings/delete", "saved_object:cloud-security-posture-settings/bulk_delete", "saved_object:cloud-security-posture-settings/share_to_space", + "saved_object:csp-rule-template/bulk_get", + "saved_object:csp-rule-template/get", + "saved_object:csp-rule-template/find", + "saved_object:csp-rule-template/open_point_in_time", + "saved_object:csp-rule-template/close_point_in_time", + "saved_object:csp-rule-template/create", + "saved_object:csp-rule-template/bulk_create", + "saved_object:csp-rule-template/update", + "saved_object:csp-rule-template/bulk_update", + "saved_object:csp-rule-template/delete", + "saved_object:csp-rule-template/bulk_delete", + "saved_object:csp-rule-template/share_to_space", "saved_object:telemetry/bulk_get", "saved_object:telemetry/get", "saved_object:telemetry/find", @@ -1823,6 +1847,11 @@ export default function ({ getService }: FtrProviderContext) { "saved_object:cloud-security-posture-settings/find", "saved_object:cloud-security-posture-settings/open_point_in_time", "saved_object:cloud-security-posture-settings/close_point_in_time", + "saved_object:csp-rule-template/bulk_get", + "saved_object:csp-rule-template/get", + "saved_object:csp-rule-template/find", + "saved_object:csp-rule-template/open_point_in_time", + "saved_object:csp-rule-template/close_point_in_time", "saved_object:config/bulk_get", "saved_object:config/get", "saved_object:config/find", @@ -2184,6 +2213,11 @@ export default function ({ getService }: FtrProviderContext) { "saved_object:cloud-security-posture-settings/find", "saved_object:cloud-security-posture-settings/open_point_in_time", "saved_object:cloud-security-posture-settings/close_point_in_time", + "saved_object:csp-rule-template/bulk_get", + "saved_object:csp-rule-template/get", + "saved_object:csp-rule-template/find", + "saved_object:csp-rule-template/open_point_in_time", + "saved_object:csp-rule-template/close_point_in_time", "saved_object:config/bulk_get", "saved_object:config/get", "saved_object:config/find",