-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Kibana should crash immediately when misconfigured #49378
Comments
Pinging @elastic/kibana-platform (Team:Platform) |
To be clear, this applies to all configuration, not just plugin configuration. Kibana should not be attempting to use any config even from within core without config validation running. One important part of config validation is preventing startup when unknown configurations exist, which helps to prevent situations where a typo in config can result in unexpected things happening in Kibana. So, for example, if a person puts |
Isn't this already fixed by #35453 ? We seems to currently be validating configuration upfront. kibana/src/core/server/plugins/plugins_service.ts Lines 133 to 144 in e6ea2bf
kibana/src/core/server/config/config_service.ts Lines 54 to 65 in 85c8232
(and same thing for core services) |
Nevermind, missread the |
So currently
To do all configuration checks upfront, we need to move the code that is currently in kibana/src/legacy/server/config/complete.js Lines 78 to 89 in 8c0f8c1
We need to have access, before the actual plugins setup, to the following:
1/ One of the issue is that the LP plugins There is an open PR that solves this, by splitting LP plugins 2/ Another issue is that the NP services config registration is done in |
If a plugin's config is invalid, it will not crash Kibana until after Kibana connects to Elasticsearch. This doesn't necessarily cause any problems, but it is poor UX for sysadmins.
Currently, Kibana starts up in this order:
This causes the issue above where a config may be invalid, but Kibana will not crash with an error until after Elasticsearch has connected.
We can move plugin config validation to execute during initial plugin discovery here: https://github.com/elastic/kibana/blob/master/src/core/server/server.ts#L79
The text was updated successfully, but these errors were encountered: