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

Update Monitoring plugin's Elasticsearch configuration #55119

Conversation

jportner
Copy link
Contributor

@jportner jportner commented Jan 16, 2020

The Monitoring plugin uses an Elasticsearch client to read monitoring data. This can be customized to read from a separate monitoring cluster using the xpack.monitoring.elasticsearch.* settings.

However, the Elasticsearch client was updated in #53810 to expect SSL certificates/keys to be read in before initializing the client, and the Monitoring plugin was not changed accordingly. This caused a crash when attempting to set Monitoring-specific Elasticsearch SSL settings (such as certificate or key).

This PR fixes that problem, and also adds missing deprecations for Elasticsearch config settings (#48247, #54392) that will no longer be supported in 8.0.

Resolves #55073.

Plugin now allows "keystore" and "truststore" values in its
config schema as the documentation currently states.
Plugin also now reads PEM and PKCS12 files off of the filesystem
before attempting to create an Elasticsearch client.
Several Elasticsearch config deprecations were overlooked for
monitoring-specific Elasticsearch settings.
@jportner jportner added Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! v8.0.0 v7.7.0 v7.6.0 labels Jan 16, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-security (Team:Security)

@jportner jportner added release_note:skip Skip the PR/issue when compiling release notes Team:Monitoring Stack Monitoring team labels Jan 16, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/stack-monitoring (Team:Monitoring)

@chrisronline chrisronline self-requested a review January 16, 2020 21:44
@jportner
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Contributor

@igoristic igoristic left a comment

Choose a reason for hiding this comment

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

@jportner This is great stuff 👍 Thank you for identifying and contributing the fix so quickly 🏆

Left some comments (mostly nitpicking), but looks good overall

Copy link
Contributor

@chrisronline chrisronline left a comment

Choose a reason for hiding this comment

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

LGTM! Nice work and thanks for the quick fix!

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@jportner jportner merged commit 5aa85dc into elastic:master Jan 21, 2020
jportner added a commit to jportner/kibana that referenced this pull request Jan 21, 2020
* Fix Monitoring plugin Elasticsearch SSL config

Plugin now allows "keystore" and "truststore" values in its
config schema as the documentation currently states.
Plugin also now reads PEM and PKCS12 files off of the filesystem
before attempting to create an Elasticsearch client.

* Add missing Elasticsearch config deprecations

Several Elasticsearch config deprecations were overlooked for
monitoring-specific Elasticsearch settings.
@jportner jportner deleted the issue-55073-update-monitoring-plugin-es-config branch January 21, 2020 17:36
jportner added a commit that referenced this pull request Jan 21, 2020
* Fix Monitoring plugin Elasticsearch SSL config

Plugin now allows "keystore" and "truststore" values in its
config schema as the documentation currently states.
Plugin also now reads PEM and PKCS12 files off of the filesystem
before attempting to create an Elasticsearch client.

* Add missing Elasticsearch config deprecations

Several Elasticsearch config deprecations were overlooked for
monitoring-specific Elasticsearch settings.
jportner added a commit that referenced this pull request Jan 21, 2020
* Fix Monitoring plugin Elasticsearch SSL config

Plugin now allows "keystore" and "truststore" values in its
config schema as the documentation currently states.
Plugin also now reads PEM and PKCS12 files off of the filesystem
before attempting to create an Elasticsearch client.

* Add missing Elasticsearch config deprecations

Several Elasticsearch config deprecations were overlooked for
monitoring-specific Elasticsearch settings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported release_note:skip Skip the PR/issue when compiling release notes Team:Monitoring Stack Monitoring team Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! v7.6.0 v7.7.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stack Monitoring can't use SSL certificates/keys
5 participants