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

Deprecate using elasticsearch.ssl.certificate without elasticsearch.ssl.key and vice versa #54392

Merged
merged 8 commits into from
Jan 11, 2020

Conversation

jportner
Copy link
Contributor

@jportner jportner commented Jan 9, 2020

Summary

This PR deprecates using elasticsearch.ssl.certificate without elasticsearch.ssl.key and vice versa. Either of these settings alone will have no effect, both should be used to enable TLS client authentication to Elasticsearch.

I had added a warning for this in #53810, but we decided in #53810 (comment) that we should add a deprecation for this in 7.6 and throw an error starting in 8.0.

This PR does the following:

  1. b8fd76d Migrates the existing deprecation for elasticsearch.username out of the Core config deprecations and into the Elasticsearch config
  2. a19698a Adds the new deprecations as stated above
  3. 906c100 Removes the now-unnecessary Logger parameter from ElasticsearchConfig and refactors tests accordingly

Note: it would be easier to review this PR by checking each commit.

This was used to log warnings messages. We have decided to
deprecate the config settings instead of just logging warnings. So
ElasticsearchConfig doesn't need to have a logger at all anymore.
@jportner jportner added release_note:deprecation Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! v8.0.0 v7.6.0 labels Jan 9, 2020
@elasticmachine
Copy link
Contributor

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

@jportner jportner marked this pull request as ready for review January 9, 2020 23:56
@jportner jportner requested a review from a team as a code owner January 9, 2020 23:56
@jportner jportner requested a review from kobelb January 9, 2020 23:56
Copy link
Contributor

@pgayvallet pgayvallet left a comment

Choose a reason for hiding this comment

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

LGTM for platform changes

The Elasticsearch config should error out if a PKCS12 keystore
does not contain a key *or* a certificate. This was intended to be
the functionality in PR elastic#53810, but it was overlooked. Changing it
now since this PR is changing code in the same file.
Check for key existence, not key truthiness.
@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 80b6dd8 into elastic:master Jan 11, 2020
@jportner jportner deleted the elasticsearch-config-deprecations branch January 11, 2020 20:06
jportner added a commit that referenced this pull request Jan 11, 2020
thomasneirynck pushed a commit to thomasneirynck/kibana that referenced this pull request Jan 12, 2020
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jan 13, 2020
* master: (69 commits)
  [Graph] Fix various a11y issues (elastic#54097)
  Add ApplicationService app status management (elastic#50223)
  logs in one time (elastic#54447)
  Deprecate using `elasticsearch.ssl.certificate` without `elasticsearch.ssl.key` and vice versa (elastic#54392)
  [Optimizer] Fix a stack overflow with watch_cache when it attempts to delete very large folders. (elastic#54457)
  Security - Role Mappings UI (elastic#53620)
  [SIEM] [Detection engine] Permission II (elastic#54292)
  Allow User to Cleanup Repository from UI  (elastic#53047)
  [Detection engine] Some UX for rule creation (elastic#54471)
  share specific instances of some ui packages (elastic#54079)
  [ML] APM modules configs for RUM Javascript and NodeJS (elastic#53792)
  [APM] Delay rendering invalid license notification (elastic#53924)
  [Graph] Improve error message on graph requests (elastic#54230)
  [ILM] Kibana should allow a min_age setting of 0ms in ILM policy phases (elastic#53719)
  Unit Tests for common/lib (elastic#53736)
  [Graph] Only show explorable fields (elastic#54101)
  remove linting rule exception for markdown (elastic#54232)
  [Monitoring] Fetch shard data more efficiently (elastic#54028)
  [Maps] Add hiddenLayers option to embeddable map input (elastic#54355)
  Pass termOrder and hasTermsAgg properties to serializeThresholdWatch function (elastic#54391)
  ...
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jan 13, 2020
* master: (69 commits)
  [Graph] Fix various a11y issues (elastic#54097)
  Add ApplicationService app status management (elastic#50223)
  logs in one time (elastic#54447)
  Deprecate using `elasticsearch.ssl.certificate` without `elasticsearch.ssl.key` and vice versa (elastic#54392)
  [Optimizer] Fix a stack overflow with watch_cache when it attempts to delete very large folders. (elastic#54457)
  Security - Role Mappings UI (elastic#53620)
  [SIEM] [Detection engine] Permission II (elastic#54292)
  Allow User to Cleanup Repository from UI  (elastic#53047)
  [Detection engine] Some UX for rule creation (elastic#54471)
  share specific instances of some ui packages (elastic#54079)
  [ML] APM modules configs for RUM Javascript and NodeJS (elastic#53792)
  [APM] Delay rendering invalid license notification (elastic#53924)
  [Graph] Improve error message on graph requests (elastic#54230)
  [ILM] Kibana should allow a min_age setting of 0ms in ILM policy phases (elastic#53719)
  Unit Tests for common/lib (elastic#53736)
  [Graph] Only show explorable fields (elastic#54101)
  remove linting rule exception for markdown (elastic#54232)
  [Monitoring] Fetch shard data more efficiently (elastic#54028)
  [Maps] Add hiddenLayers option to embeddable map input (elastic#54355)
  Pass termOrder and hasTermsAgg properties to serializeThresholdWatch function (elastic#54391)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported release_note:deprecation Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! v7.6.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants