Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove previously deprecated elasticsearch.* settings. #29496

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 28 additions & 7 deletions docs/migration/migrate_7_0.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,6 @@ considered unique based on its persistent UUID, which is written to the path.dat

*Impact:* The logging.useUTC flag will have to be replaced with a timezone id. If set to true the id is `UTC`.

[float]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: I thought it'd make sense to join these two notes into one, let me know if you have a better wording.

=== kibana.yml setting `elasticsearch.url` sets port based on protocol
*Details:* In prior versions of Kibana, if no port was specified in `elasticsearch.url` a default of 9200 was chosen.
The port is now protocol dependent: https ports will use 443, and http ports will use 80.

*Impact:* If your `elasticsearch.url` was dependent on an unspecified port set to 9200, `:9200` will have to be appended to the url.

[float]
=== kibana.yml setting `server.ssl.supportedProtocols` excludes TLSv1 by default
*Details:* TLSv1 support has been removed by default, it's still possible to opt-in to TLSv1 support by explicitly setting
Expand All @@ -129,3 +122,31 @@ It's now required that the user sets `server.ssl.enabled` to true for this to oc
*Details:* This deprecated setting has been removed and `i18n.locale` should be used instead.

*Impact:* Users with `i18n.defaultLocale` set should use `i18n.locale` instead

[float]
=== kibana.yml setting `elasticsearch.url` is no longer valid
*Details:* This deprecated setting has been removed and `elasticsearch.hosts` should be used instead.
In prior versions of Kibana, if no port was specified in `elasticsearch.url` a default of 9200 was chosen. The port in
`elasticsearch.hosts` is protocol dependent: https ports will use 443, and http ports will use 80.

*Impact:* Users with `elasticsearch.url` set should use `elasticsearch.hosts` instead and if `elasticsearch.url` was
dependent on an unspecified port set to 9200, `:9200` will have to be appended to the url.

[float]
=== kibana.yml setting `elasticsearch.ssl.cert` is no longer valid
*Details:* This deprecated setting has been removed and `elasticsearch.ssl.certificate` should be used instead.

*Impact:* Users with `elasticsearch.ssl.cert` set should use `elasticsearch.ssl.certificate` instead

[float]
=== kibana.yml setting `elasticsearch.ssl.ca` is no longer valid
*Details:* This deprecated setting has been removed and `elasticsearch.ssl.certificateAuthorities` should be used instead.

*Impact:* Users with `elasticsearch.ssl.ca` set should use `elasticsearch.ssl.certificateAuthorities` instead

[float]
=== kibana.yml setting `elasticsearch.ssl.verify` is no longer valid
*Details:* This deprecated setting has been removed and `elasticsearch.ssl.verificationMode` should be used instead.

*Impact:* Users with `elasticsearch.ssl.verify` set should use `elasticsearch.ssl.verificationMode` instead.
Previously set `elasticsearch.ssl.verify` is equal to `elasticsearch.ssl.verificationMode: full`.
97 changes: 0 additions & 97 deletions src/legacy/core_plugins/elasticsearch/__tests__/index.js

This file was deleted.

49 changes: 0 additions & 49 deletions src/legacy/core_plugins/elasticsearch/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
* under the License.
*/

import { compact, get, has, set } from 'lodash';
import { unset } from '../../../utils';

import healthCheck from './lib/health_check';
import { createDataCluster } from './lib/create_data_cluster';
import { createAdminCluster } from './lib/create_admin_cluster';
Expand Down Expand Up @@ -67,52 +64,6 @@ export default function (kibana) {
}).default();
},

deprecations({ rename }) {
const sslVerify = (basePath) => {
const getKey = (path) => {
return compact([basePath, path]).join('.');
};

return (settings, log) => {
const sslSettings = get(settings, getKey('ssl'));

if (!has(sslSettings, 'verify')) {
return;
}

const verificationMode = get(sslSettings, 'verify') ? 'full' : 'none';
set(sslSettings, 'verificationMode', verificationMode);
unset(sslSettings, 'verify');

log(`Config key "${getKey('ssl.verify')}" is deprecated. It has been replaced with "${getKey('ssl.verificationMode')}"`);
};
};

const url = () => {
return (settings, log) => {
const deprecatedUrl = get(settings, 'url');
const hosts = get(settings, 'hosts.length');
if (!deprecatedUrl) {
return;
}
if (hosts) {
log('Deprecated config key "elasticsearch.url" conflicts with "elasticsearch.hosts". Ignoring "elasticsearch.url"');
} else {
set(settings, 'hosts', [deprecatedUrl]);
log('Config key "elasticsearch.url" is deprecated. It has been replaced with "elasticsearch.hosts"');
}
unset(settings, 'url');
};
};

return [
rename('ssl.ca', 'ssl.certificateAuthorities'),
rename('ssl.cert', 'ssl.certificate'),
url(),
sslVerify(),
];
},

uiExports: {
injectDefaultVars(server, options) {
return {
Expand Down