[Security Solution, Cases] Adds Explicit deprecation levels (#118268) (#118412)

* 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>

Co-authored-by: Ryland Herrick <ryalnd@gmail.com>
This commit is contained in:
Kibana Machine 2021-11-11 14:56:44 -05:00 committed by GitHub
parent 59b34d346c
commit d59f144a4a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 7 deletions

View file

@ -16,7 +16,7 @@ export const config: PluginConfigDescriptor<ConfigType> = {
markdownPlugins: true,
},
deprecations: ({ renameFromRoot }) => [
renameFromRoot('xpack.case.enabled', 'xpack.cases.enabled'),
renameFromRoot('xpack.case.enabled', 'xpack.cases.enabled', { level: 'critical' }),
],
};
export const plugin = (initializerContext: PluginInitializerContext) =>

View file

@ -21,26 +21,31 @@ export const config: PluginConfigDescriptor<ConfigSchema> = {
},
schema: configSchema,
deprecations: ({ renameFromRoot }) => [
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' }
),
],
};