diff --git a/src/core/server/config/deprecation/core_deprecations.ts b/src/core/server/config/deprecation/core_deprecations.ts index 1cf67f479f9b3..b115ea25fc363 100644 --- a/src/core/server/config/deprecation/core_deprecations.ts +++ b/src/core/server/config/deprecation/core_deprecations.ts @@ -13,6 +13,7 @@ const kibanaPathConf: ConfigDeprecation = (settings, fromPath, addDeprecation) = if (process.env?.KIBANA_PATH_CONF) { addDeprecation({ configPath: 'env.KIBANA_PATH_CONF', + level: 'critical', message: `Environment variable "KIBANA_PATH_CONF" is deprecated. It has been replaced with "KBN_PATH_CONF" pointing to a config folder`, correctiveActions: { manualSteps: [ @@ -27,6 +28,7 @@ const configPathDeprecation: ConfigDeprecation = (settings, fromPath, addDepreca if (process.env?.CONFIG_PATH) { addDeprecation({ configPath: 'env.CONFIG_PATH', + level: 'critical', message: `Environment variable "CONFIG_PATH" is deprecated. It has been replaced with "KBN_PATH_CONF" pointing to a config folder`, correctiveActions: { manualSteps: ['Use "KBN_PATH_CONF" instead of "CONFIG_PATH" to point to a config folder.'], @@ -39,6 +41,7 @@ const dataPathDeprecation: ConfigDeprecation = (settings, fromPath, addDeprecati if (process.env?.DATA_PATH) { addDeprecation({ configPath: 'env.DATA_PATH', + level: 'critical', message: `Environment variable "DATA_PATH" will be removed. It has been replaced with kibana.yml setting "path.data"`, correctiveActions: { manualSteps: [ @@ -53,13 +56,13 @@ const rewriteBasePathDeprecation: ConfigDeprecation = (settings, fromPath, addDe if (settings.server?.basePath && !settings.server?.rewriteBasePath) { addDeprecation({ configPath: 'server.basePath', + level: 'warning', title: 'Setting "server.rewriteBasePath" should be set when using "server.basePath"', message: 'You should set server.basePath along with server.rewriteBasePath. Starting in 7.0, Kibana ' + 'will expect that all requests start with server.basePath rather than expecting you to rewrite ' + 'the requests in your reverse proxy. Set server.rewriteBasePath to false to preserve the ' + 'current behavior and silence this warning.', - level: 'warning', correctiveActions: { manualSteps: [ `Set 'server.rewriteBasePath' in the config file, CLI flag, or environment variable (in Docker only).`, @@ -75,6 +78,7 @@ const rewriteCorsSettings: ConfigDeprecation = (settings, fromPath, addDeprecati if (typeof corsSettings === 'boolean') { addDeprecation({ configPath: 'server.cors', + level: 'warning', title: 'Setting "server.cors" is deprecated', message: '"server.cors" is deprecated and has been replaced by "server.cors.enabled"', correctiveActions: { @@ -113,6 +117,7 @@ const cspRulesDeprecation: ConfigDeprecation = (settings, fromPath, addDeprecati if (sourceList.find((source) => source.includes(NONCE_STRING))) { addDeprecation({ configPath: 'csp.rules', + level: 'critical', message: `csp.rules no longer supports the {nonce} syntax. Replacing with 'self' in ${policy}`, correctiveActions: { manualSteps: [`Replace {nonce} syntax with 'self' in ${policy}`], @@ -132,6 +137,7 @@ const cspRulesDeprecation: ConfigDeprecation = (settings, fromPath, addDeprecati ) { addDeprecation({ configPath: 'csp.rules', + level: 'critical', message: `csp.rules must contain the 'self' source. Automatically adding to ${policy}.`, correctiveActions: { manualSteps: [`Add 'self' source to ${policy}.`], @@ -156,6 +162,7 @@ const mapManifestServiceUrlDeprecation: ConfigDeprecation = ( if (settings.map?.manifestServiceUrl) { addDeprecation({ configPath: 'map.manifestServiceUrl', + level: 'critical', message: 'You should no longer use the map.manifestServiceUrl setting in kibana.yml to configure the location ' + 'of the Elastic Maps Service settings. These settings have moved to the "map.emsTileApiUrl" and ' + @@ -175,6 +182,7 @@ const serverHostZeroDeprecation: ConfigDeprecation = (settings, fromPath, addDep if (settings.server?.host === '0') { addDeprecation({ configPath: 'server.host', + level: 'critical', message: 'Support for setting server.host to "0" in kibana.yml is deprecated and will be removed in Kibana version 8.0.0. ' + 'Instead use "0.0.0.0" to bind to all interfaces.', @@ -206,6 +214,7 @@ const opsLoggingEventDeprecation: ConfigDeprecation = ( if (settings.logging?.events?.ops) { addDeprecation({ configPath: 'logging.events.ops', + level: 'critical', documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingevents`, title: i18n.translate('core.deprecations.loggingEventsOps.deprecationTitle', { defaultMessage: `Setting "logging.events.ops" is deprecated`, @@ -237,6 +246,7 @@ const requestLoggingEventDeprecation: ConfigDeprecation = ( if (settings.logging?.events?.request) { addDeprecation({ configPath: 'logging.events.request', + level: 'critical', documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingevents`, title: i18n.translate('core.deprecations.loggingEventsRequest.deprecationTitle', { defaultMessage: `Setting "logging.events.request" is deprecated`, @@ -268,6 +278,7 @@ const responseLoggingEventDeprecation: ConfigDeprecation = ( if (settings.logging?.events?.response) { addDeprecation({ configPath: 'logging.events.response', + level: 'critical', documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingevents`, title: i18n.translate('core.deprecations.loggingEventsResponse.deprecationTitle', { defaultMessage: `Setting "logging.events.response" is deprecated`, @@ -299,6 +310,7 @@ const timezoneLoggingDeprecation: ConfigDeprecation = ( if (settings.logging?.timezone) { addDeprecation({ configPath: 'logging.timezone', + level: 'critical', documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingtimezone`, title: i18n.translate('core.deprecations.loggingTimezone.deprecationTitle', { defaultMessage: `Setting "logging.timezone" is deprecated`, @@ -330,6 +342,7 @@ const destLoggingDeprecation: ConfigDeprecation = ( if (settings.logging?.dest) { addDeprecation({ configPath: 'logging.dest', + level: 'critical', documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingdest`, title: i18n.translate('core.deprecations.loggingDest.deprecationTitle', { defaultMessage: `Setting "logging.dest" is deprecated`, @@ -361,6 +374,7 @@ const quietLoggingDeprecation: ConfigDeprecation = ( if (settings.logging?.quiet) { addDeprecation({ configPath: 'logging.quiet', + level: 'critical', documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingquiet`, title: i18n.translate('core.deprecations.loggingQuiet.deprecationTitle', { defaultMessage: `Setting "logging.quiet" is deprecated`, @@ -391,6 +405,7 @@ const silentLoggingDeprecation: ConfigDeprecation = ( if (settings.logging?.silent) { addDeprecation({ configPath: 'logging.silent', + level: 'critical', documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingsilent`, title: i18n.translate('core.deprecations.loggingSilent.deprecationTitle', { defaultMessage: `Setting "logging.silent" is deprecated`, @@ -421,6 +436,7 @@ const verboseLoggingDeprecation: ConfigDeprecation = ( if (settings.logging?.verbose) { addDeprecation({ configPath: 'logging.verbose', + level: 'critical', documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingverbose`, title: i18n.translate('core.deprecations.loggingVerbose.deprecationTitle', { defaultMessage: `Setting "logging.verbose" is deprecated`, @@ -455,6 +471,7 @@ const jsonLoggingDeprecation: ConfigDeprecation = ( if (settings.logging?.json && settings.env !== 'development') { addDeprecation({ configPath: 'logging.json', + level: 'critical', documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx`, title: i18n.translate('core.deprecations.loggingJson.deprecationTitle', { defaultMessage: `Setting "logging.json" is deprecated`, @@ -487,6 +504,7 @@ const logRotateDeprecation: ConfigDeprecation = ( if (settings.logging?.rotate) { addDeprecation({ configPath: 'logging.rotate', + level: 'critical', documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#rolling-file-appender`, title: i18n.translate('core.deprecations.loggingRotate.deprecationTitle', { defaultMessage: `Setting "logging.rotate" is deprecated`, @@ -518,6 +536,7 @@ const logEventsLogDeprecation: ConfigDeprecation = ( if (settings.logging?.events?.log) { addDeprecation({ configPath: 'logging.events.log', + level: 'critical', documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingevents`, title: i18n.translate('core.deprecations.loggingEventsLog.deprecationTitle', { defaultMessage: `Setting "logging.events.log" is deprecated`, @@ -548,6 +567,7 @@ const logEventsErrorDeprecation: ConfigDeprecation = ( if (settings.logging?.events?.error) { addDeprecation({ configPath: 'logging.events.error', + level: 'critical', documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingevents`, title: i18n.translate('core.deprecations.loggingEventsError.deprecationTitle', { defaultMessage: `Setting "logging.events.error" is deprecated`, @@ -578,6 +598,7 @@ const logFilterDeprecation: ConfigDeprecation = ( if (settings.logging?.filter) { addDeprecation({ configPath: 'logging.filter', + level: 'critical', documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingfilter`, title: i18n.translate('core.deprecations.loggingFilter.deprecationTitle', { defaultMessage: `Setting "logging.filter" is deprecated`, @@ -596,40 +617,42 @@ export const coreDeprecationProvider: ConfigDeprecationProvider = ({ unusedFromRoot, renameFromRoot, }) => [ - unusedFromRoot('savedObjects.indexCheckTimeout'), - unusedFromRoot('server.xsrf.token'), - unusedFromRoot('maps.manifestServiceUrl'), - unusedFromRoot('optimize.lazy'), - unusedFromRoot('optimize.lazyPort'), - unusedFromRoot('optimize.lazyHost'), - unusedFromRoot('optimize.lazyPrebuild'), - unusedFromRoot('optimize.lazyProxyTimeout'), - unusedFromRoot('optimize.enabled'), - unusedFromRoot('optimize.bundleFilter'), - unusedFromRoot('optimize.bundleDir'), - unusedFromRoot('optimize.viewCaching'), - unusedFromRoot('optimize.watch'), - unusedFromRoot('optimize.watchPort'), - unusedFromRoot('optimize.watchHost'), - unusedFromRoot('optimize.watchPrebuild'), - unusedFromRoot('optimize.watchProxyTimeout'), - unusedFromRoot('optimize.useBundleCache'), - unusedFromRoot('optimize.sourceMaps'), - unusedFromRoot('optimize.workers'), - unusedFromRoot('optimize.profile'), - unusedFromRoot('optimize.validateSyntaxOfNodeModules'), - renameFromRoot('xpack.xpack_main.telemetry.config', 'telemetry.config'), - renameFromRoot('xpack.xpack_main.telemetry.url', 'telemetry.url'), - renameFromRoot('xpack.xpack_main.telemetry.enabled', 'telemetry.enabled'), - renameFromRoot('xpack.telemetry.enabled', 'telemetry.enabled'), - renameFromRoot('xpack.telemetry.config', 'telemetry.config'), - renameFromRoot('xpack.telemetry.banner', 'telemetry.banner'), - renameFromRoot('xpack.telemetry.url', 'telemetry.url'), - renameFromRoot('cpu.cgroup.path.override', 'ops.cGroupOverrides.cpuPath'), - renameFromRoot('cpuacct.cgroup.path.override', 'ops.cGroupOverrides.cpuAcctPath'), - renameFromRoot('server.xsrf.whitelist', 'server.xsrf.allowlist'), - unusedFromRoot('elasticsearch.preserveHost'), - unusedFromRoot('elasticsearch.startupTimeout'), + unusedFromRoot('savedObjects.indexCheckTimeout', { level: 'critical' }), + unusedFromRoot('server.xsrf.token', { level: 'critical' }), + unusedFromRoot('maps.manifestServiceUrl', { level: 'critical' }), + unusedFromRoot('optimize.lazy', { level: 'critical' }), + unusedFromRoot('optimize.lazyPort', { level: 'critical' }), + unusedFromRoot('optimize.lazyHost', { level: 'critical' }), + unusedFromRoot('optimize.lazyPrebuild', { level: 'critical' }), + unusedFromRoot('optimize.lazyProxyTimeout', { level: 'critical' }), + unusedFromRoot('optimize.enabled', { level: 'critical' }), + unusedFromRoot('optimize.bundleFilter', { level: 'critical' }), + unusedFromRoot('optimize.bundleDir', { level: 'critical' }), + unusedFromRoot('optimize.viewCaching', { level: 'critical' }), + unusedFromRoot('optimize.watch', { level: 'critical' }), + unusedFromRoot('optimize.watchPort', { level: 'critical' }), + unusedFromRoot('optimize.watchHost', { level: 'critical' }), + unusedFromRoot('optimize.watchPrebuild', { level: 'critical' }), + unusedFromRoot('optimize.watchProxyTimeout', { level: 'critical' }), + unusedFromRoot('optimize.useBundleCache', { level: 'critical' }), + unusedFromRoot('optimize.sourceMaps', { level: 'critical' }), + unusedFromRoot('optimize.workers', { level: 'critical' }), + unusedFromRoot('optimize.profile', { level: 'critical' }), + unusedFromRoot('optimize.validateSyntaxOfNodeModules', { level: 'critical' }), + renameFromRoot('xpack.xpack_main.telemetry.config', 'telemetry.config', { level: 'critical' }), + renameFromRoot('xpack.xpack_main.telemetry.url', 'telemetry.url', { level: 'critical' }), + renameFromRoot('xpack.xpack_main.telemetry.enabled', 'telemetry.enabled', { level: 'critical' }), + renameFromRoot('xpack.telemetry.enabled', 'telemetry.enabled', { level: 'critical' }), + renameFromRoot('xpack.telemetry.config', 'telemetry.config', { level: 'critical' }), + renameFromRoot('xpack.telemetry.banner', 'telemetry.banner', { level: 'critical' }), + renameFromRoot('xpack.telemetry.url', 'telemetry.url', { level: 'critical' }), + renameFromRoot('cpu.cgroup.path.override', 'ops.cGroupOverrides.cpuPath', { level: 'critical' }), + renameFromRoot('cpuacct.cgroup.path.override', 'ops.cGroupOverrides.cpuAcctPath', { + level: 'critical', + }), + renameFromRoot('server.xsrf.whitelist', 'server.xsrf.allowlist', { level: 'critical' }), + unusedFromRoot('elasticsearch.preserveHost', { level: 'critical' }), + unusedFromRoot('elasticsearch.startupTimeout', { level: 'critical' }), rewriteCorsSettings, configPathDeprecation, kibanaPathConf, diff --git a/src/core/server/kibana_config.ts b/src/core/server/kibana_config.ts index 859f25d7082f1..a0476a54ae744 100644 --- a/src/core/server/kibana_config.ts +++ b/src/core/server/kibana_config.ts @@ -18,6 +18,7 @@ const deprecations: ConfigDeprecationProvider = () => [ if (kibana?.index) { addDeprecation({ configPath: 'kibana.index', + level: 'critical', title: i18n.translate('core.kibana.index.deprecationTitle', { defaultMessage: `Setting "kibana.index" is deprecated`, }), diff --git a/src/plugins/home/server/index.ts b/src/plugins/home/server/index.ts index 9523766596fed..db72af9d78a39 100644 --- a/src/plugins/home/server/index.ts +++ b/src/plugins/home/server/index.ts @@ -19,7 +19,9 @@ export const config: PluginConfigDescriptor = { }, schema: configSchema, deprecations: ({ renameFromRoot }) => [ - renameFromRoot('kibana.disableWelcomeScreen', 'home.disableWelcomeScreen'), + renameFromRoot('kibana.disableWelcomeScreen', 'home.disableWelcomeScreen', { + level: 'critical', + }), ], }; diff --git a/src/plugins/newsfeed/server/index.ts b/src/plugins/newsfeed/server/index.ts index 460d48622af69..30bd27f027ccd 100644 --- a/src/plugins/newsfeed/server/index.ts +++ b/src/plugins/newsfeed/server/index.ts @@ -17,7 +17,7 @@ export const config: PluginConfigDescriptor = { mainInterval: true, fetchInterval: true, }, - deprecations: ({ unused }) => [unused('defaultLanguage')], + deprecations: ({ unused }) => [unused('defaultLanguage', { level: 'critical' })], }; export function plugin() { diff --git a/src/plugins/telemetry/server/config/deprecations.test.ts b/src/plugins/telemetry/server/config/deprecations.test.ts index 567ef69e8991c..1243ae6712057 100644 --- a/src/plugins/telemetry/server/config/deprecations.test.ts +++ b/src/plugins/telemetry/server/config/deprecations.test.ts @@ -165,6 +165,7 @@ describe('deprecateEndpointConfigs', () => { "To send usage to the staging endpoint add \\"telemetry.sendUsageTo: staging\\" to the Kibana configuration.", ], }, + "level": "critical", "message": "\\"telemetry.url\\" has been deprecated. Set \\"telemetry.sendUsageTo: staging\\" to the Kibana configurations to send usage to the staging endpoint.", "title": "Setting \\"telemetry.url\\" is deprecated", }, @@ -188,6 +189,7 @@ describe('deprecateEndpointConfigs', () => { "To send usage to the staging endpoint add \\"telemetry.sendUsageTo: staging\\" to the Kibana configuration.", ], }, + "level": "critical", "message": "\\"telemetry.optInStatusUrl\\" has been deprecated. Set \\"telemetry.sendUsageTo: staging\\" to the Kibana configurations to send usage to the staging endpoint.", "title": "Setting \\"telemetry.optInStatusUrl\\" is deprecated", }, diff --git a/src/plugins/telemetry/server/config/deprecations.ts b/src/plugins/telemetry/server/config/deprecations.ts index 38553be7d5774..fa939482a5f57 100644 --- a/src/plugins/telemetry/server/config/deprecations.ts +++ b/src/plugins/telemetry/server/config/deprecations.ts @@ -36,6 +36,7 @@ export const deprecateEndpointConfigs: ConfigDeprecation = ( addDeprecation({ configPath: fullConfigPath, + level: 'critical', title: i18n.translate('telemetry.endpointConfigs.deprecationTitle', { defaultMessage: 'Setting "{configPath}" is deprecated', values: { configPath: fullConfigPath }, diff --git a/src/plugins/usage_collection/server/config.ts b/src/plugins/usage_collection/server/config.ts index faf8ce7535e8a..0c52f4525c134 100644 --- a/src/plugins/usage_collection/server/config.ts +++ b/src/plugins/usage_collection/server/config.ts @@ -30,10 +30,16 @@ export type ConfigType = TypeOf; export const config: PluginConfigDescriptor = { schema: configSchema, deprecations: ({ renameFromRoot }) => [ - renameFromRoot('ui_metric.enabled', 'usageCollection.uiCounters.enabled'), - renameFromRoot('ui_metric.debug', 'usageCollection.uiCounters.debug'), - renameFromRoot('usageCollection.uiMetric.enabled', 'usageCollection.uiCounters.enabled'), - renameFromRoot('usageCollection.uiMetric.debug', 'usageCollection.uiCounters.debug'), + renameFromRoot('ui_metric.enabled', 'usageCollection.uiCounters.enabled', { + level: 'critical', + }), + renameFromRoot('ui_metric.debug', 'usageCollection.uiCounters.debug', { level: 'critical' }), + renameFromRoot('usageCollection.uiMetric.enabled', 'usageCollection.uiCounters.enabled', { + level: 'critical', + }), + renameFromRoot('usageCollection.uiMetric.debug', 'usageCollection.uiCounters.debug', { + level: 'critical', + }), ], exposeToBrowser: { uiCounters: true, diff --git a/x-pack/plugins/licensing/server/licensing_config.ts b/x-pack/plugins/licensing/server/licensing_config.ts index a27eaba56df50..485351ec22048 100644 --- a/x-pack/plugins/licensing/server/licensing_config.ts +++ b/x-pack/plugins/licensing/server/licensing_config.ts @@ -21,7 +21,8 @@ export const config: PluginConfigDescriptor = { deprecations: ({ renameFromRoot }) => [ renameFromRoot( 'xpack.xpack_main.xpack_api_polling_frequency_millis', - 'xpack.licensing.api_polling_frequency' + 'xpack.licensing.api_polling_frequency', + { level: 'critical' } ), ], };