From 9d71a8a7944686f29a0c6147fa24cea23f023af1 Mon Sep 17 00:00:00 2001 From: Bohdan Tsymbala Date: Wed, 2 Dec 2020 21:00:38 +0100 Subject: [PATCH] Added migration of policy for AV registration config. (#84779) (#84802) * Added migration of policy for AV registration config. * Updated migration a bit to be more safe. --- .../common/endpoint/policy/migrations/to_v7_11.0.test.ts | 3 ++- .../common/endpoint/policy/migrations/to_v7_11.0.ts | 9 +++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/x-pack/plugins/security_solution/common/endpoint/policy/migrations/to_v7_11.0.test.ts b/x-pack/plugins/security_solution/common/endpoint/policy/migrations/to_v7_11.0.test.ts index 6d3e320fba3af..b516f7c57a96d 100644 --- a/x-pack/plugins/security_solution/common/endpoint/policy/migrations/to_v7_11.0.test.ts +++ b/x-pack/plugins/security_solution/common/endpoint/policy/migrations/to_v7_11.0.test.ts @@ -10,7 +10,7 @@ import { migratePackagePolicyToV7110 } from './to_v7_11.0'; describe('7.11.0 Endpoint Package Policy migration', () => { const migration = migratePackagePolicyToV7110; - it('adds malware notification checkbox and optional message', () => { + it('adds malware notification checkbox and optional message and adds AV registration config', () => { const doc: SavedObjectUnsanitizedDoc = { attributes: { name: 'Some Policy Name', @@ -77,6 +77,7 @@ describe('7.11.0 Endpoint Package Policy migration', () => { policy: { value: { windows: { + antivirus_registration: { enabled: false }, popup: { malware: { message: '', diff --git a/x-pack/plugins/security_solution/common/endpoint/policy/migrations/to_v7_11.0.ts b/x-pack/plugins/security_solution/common/endpoint/policy/migrations/to_v7_11.0.ts index 551e0ecfdcb4f..557633a747267 100644 --- a/x-pack/plugins/security_solution/common/endpoint/policy/migrations/to_v7_11.0.ts +++ b/x-pack/plugins/security_solution/common/endpoint/policy/migrations/to_v7_11.0.ts @@ -23,8 +23,13 @@ export const migratePackagePolicyToV7110: SavedObjectMigrationFn