|
4 | 4 | * you may not use this file except in compliance with the Elastic License. |
5 | 5 | */ |
6 | 6 |
|
7 | | -import { PluginInitializerContext } from '../../../../src/core/server'; |
| 7 | +import { PluginInitializerContext, PluginConfigDescriptor } from '../../../../src/core/server'; |
8 | 8 | import { Plugin, PluginSetup, PluginStart } from './plugin'; |
9 | 9 | import { configSchema, ConfigType } from './config'; |
| 10 | +import { SIGNALS_INDEX_KEY } from '../common/constants'; |
10 | 11 |
|
11 | 12 | export const plugin = (context: PluginInitializerContext) => { |
12 | 13 | return new Plugin(context); |
13 | 14 | }; |
14 | 15 |
|
15 | | -export const config = { schema: configSchema }; |
| 16 | +export const config: PluginConfigDescriptor<ConfigType> = { |
| 17 | + schema: configSchema, |
| 18 | + deprecations: ({ renameFromRoot }) => [ |
| 19 | + renameFromRoot('xpack.siem.enabled', 'xpack.securitySolution.enabled'), |
| 20 | + renameFromRoot( |
| 21 | + 'xpack.siem.maxRuleImportExportSize', |
| 22 | + 'xpack.securitySolution.maxRuleImportExportSize' |
| 23 | + ), |
| 24 | + renameFromRoot( |
| 25 | + 'xpack.siem.maxRuleImportPayloadBytes', |
| 26 | + 'xpack.securitySolution.maxRuleImportPayloadBytes' |
| 27 | + ), |
| 28 | + renameFromRoot( |
| 29 | + 'xpack.siem.maxTimelineImportExportSize', |
| 30 | + 'xpack.securitySolution.maxTimelineImportExportSize' |
| 31 | + ), |
| 32 | + renameFromRoot( |
| 33 | + 'xpack.siem.maxTimelineImportPayloadBytes', |
| 34 | + 'xpack.securitySolution.maxTimelineImportPayloadBytes' |
| 35 | + ), |
| 36 | + renameFromRoot( |
| 37 | + `xpack.siem.${SIGNALS_INDEX_KEY}`, |
| 38 | + `xpack.securitySolution.${SIGNALS_INDEX_KEY}` |
| 39 | + ), |
| 40 | + ], |
| 41 | +}; |
16 | 42 |
|
17 | 43 | export { ConfigType, Plugin, PluginSetup, PluginStart }; |
18 | 44 |
|
|
0 commit comments