From 35eb5ba32576cd5cfb892a99d0d761d3223c1a42 Mon Sep 17 00:00:00 2001 From: Ryland Herrick Date: Thu, 11 Nov 2021 18:38:55 -0600 Subject: [PATCH] [Security Solution, Cases] Adds Explicit deprecation levels (#118268) (#118415) * Add level for security solution deprecations These are all marked as critical, since behavior will be degraded if users have these old keys (i.e. those settings will be ignored). * Add critical level to cases config deprecation Use of the old config name will be ignored and thus change behavior. Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> # Conflicts: # x-pack/plugins/cases/server/index.ts # x-pack/plugins/security_solution/server/index.ts Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- x-pack/plugins/cases/server/index.ts | 2 +- .../plugins/security_solution/server/index.ts | 17 +++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/x-pack/plugins/cases/server/index.ts b/x-pack/plugins/cases/server/index.ts index 464a0d795c166..5147b656215cc 100644 --- a/x-pack/plugins/cases/server/index.ts +++ b/x-pack/plugins/cases/server/index.ts @@ -17,7 +17,7 @@ export const config: PluginConfigDescriptor = { }, deprecations: ({ deprecate, renameFromRoot }) => [ deprecate('enabled', '8.0.0'), - renameFromRoot('xpack.case.enabled', 'xpack.cases.enabled'), + renameFromRoot('xpack.case.enabled', 'xpack.cases.enabled', { level: 'critical' }), ], }; export const plugin = (initializerContext: PluginInitializerContext) => diff --git a/x-pack/plugins/security_solution/server/index.ts b/x-pack/plugins/security_solution/server/index.ts index c7726e95cae5a..973733df8393e 100644 --- a/x-pack/plugins/security_solution/server/index.ts +++ b/x-pack/plugins/security_solution/server/index.ts @@ -22,26 +22,31 @@ export const config: PluginConfigDescriptor = { schema: configSchema, deprecations: ({ deprecate, renameFromRoot }) => [ deprecate('enabled', '8.0.0'), - renameFromRoot('xpack.siem.enabled', 'xpack.securitySolution.enabled'), + renameFromRoot('xpack.siem.enabled', 'xpack.securitySolution.enabled', { level: 'critical' }), renameFromRoot( 'xpack.siem.maxRuleImportExportSize', - 'xpack.securitySolution.maxRuleImportExportSize' + 'xpack.securitySolution.maxRuleImportExportSize', + { level: 'critical' } ), renameFromRoot( 'xpack.siem.maxRuleImportPayloadBytes', - 'xpack.securitySolution.maxRuleImportPayloadBytes' + 'xpack.securitySolution.maxRuleImportPayloadBytes', + { level: 'critical' } ), renameFromRoot( 'xpack.siem.maxTimelineImportExportSize', - 'xpack.securitySolution.maxTimelineImportExportSize' + 'xpack.securitySolution.maxTimelineImportExportSize', + { level: 'critical' } ), renameFromRoot( 'xpack.siem.maxTimelineImportPayloadBytes', - 'xpack.securitySolution.maxTimelineImportPayloadBytes' + 'xpack.securitySolution.maxTimelineImportPayloadBytes', + { level: 'critical' } ), renameFromRoot( `xpack.siem.${SIGNALS_INDEX_KEY}`, - `xpack.securitySolution.${SIGNALS_INDEX_KEY}` + `xpack.securitySolution.${SIGNALS_INDEX_KEY}`, + { level: 'critical' } ), ], };