-
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
Additional validation for elasticsearch username #48247
Additional validation for elasticsearch username #48247
Conversation
Pinging @elastic/kibana-security (Team:Security) |
@@ -160,7 +177,7 @@ export class ElasticsearchConfig { | |||
*/ | |||
public readonly customHeaders: ElasticsearchConfigType['customHeaders']; | |||
|
|||
constructor(rawConfig: ElasticsearchConfigType) { | |||
constructor(rawConfig: ElasticsearchConfigType, log?: Logger) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since passing the logger to this constructor is temporary (shouldn't be needed when #40255 is resolved), I left the param as optional -- to avoid TypeScript errors in test files and to avoid changing those files.
Note: as discussed with @legrego, this change also affects OSS users -- even though OSS has no concept of the "superuser" (paraphrasing here). We couldn't think of any way to add this validation without any impact to OSS users though. |
💔 Build Failed
|
💔 Build Failed
|
💔 Build Failed
|
💔 Build Failed
|
💔 Build Failed
|
Spoke to @azasypkin and @jkakavas about this-- |
@elasticmachine merge upstream |
💔 Build Failed
|
fa84842
to
947ac8b
Compare
💔 Build Failed
|
947ac8b
to
9dc0949
Compare
💔 Build Failed
|
9dc0949
to
58d3358
Compare
💚 Build Succeeded
|
This is awesome, nicework! Just one nit, and a question/suggestion. |
58d3358
to
1664a13
Compare
💚 Build Succeeded
|
If "elastic" user is set in config: * In dev mode, throws an error * In prod mode, logs a deprecation warning
Revert "Fix user for functional tests" and "Fix user for plugin functional tests in Jenkinsfile"
Now uses "kibana" user instead of "elastic" user
1664a13
to
c6daad1
Compare
💚 Build Succeeded |
* Additional validation for elasticsearch username If "elastic" user is set in config: * In dev mode, throws an error * In prod mode, logs a deprecation warning * Fix user for functional tests * Revert last two commits Revert "Fix user for functional tests" and "Fix user for plugin functional tests in Jenkinsfile" * Change elasticsearch creds for test server Now uses "kibana" user instead of "elastic" user * Fix plugin API functional tests * Fix PKI API integration test * Change log messages, now conditional on `dist: false` not `dev: true`
* Additional validation for elasticsearch username If "elastic" user is set in config: * In dev mode, throws an error * In prod mode, logs a deprecation warning * Fix user for functional tests * Revert last two commits Revert "Fix user for functional tests" and "Fix user for plugin functional tests in Jenkinsfile" * Change elasticsearch creds for test server Now uses "kibana" user instead of "elastic" user * Fix plugin API functional tests * Fix PKI API integration test * Change log messages, now conditional on `dist: false` not `dev: true`
…-fallback * 'master' of github.com:elastic/kibana: (116 commits) [Maps] move apply global filter settting from layer to source (elastic#50523) [SIEM] Fix: Empty `Source` / `Destination` shown when only ports are populated (elastic#50843) [Maps] Delay vector tile layer syncing until spritesheet is loaded (elastic#48955) [Maps] prevent users from overflowing URL when filtering by shape (elastic#50747) [DOCS] Mark Beats central management as discontinued (elastic#49423) [page_objects/common_page] convert to ts (elastic#50771) [NP Kibana Migrations ] kibana plugin home (elastic#50444) [DOCS] Shareables naming convention (elastic#50497) [ML] DF Analytics - auto-populate model_memory_limit (elastic#50714) Increase alerting test stability and reduce flakiness (elastic#50246) [ML] Remaning new_job_new folder (elastic#50917) [Telemetry] Show opt-in changes for OSS users (elastic#50831) [ML] Fix lat_long anomalies table links menu and value formatting (elastic#50916) [Dev] Fix serialising a really big string (elastic#50915) Better explanation about the Prettier recommendation (extension vs. NPM module) (elastic#50629) [Monitoring] Use a basic monitoring user for tests (elastic#47865) [Monitoring] Gracefully handle issue with filebeat indices (elastic#48929) [Monitoring] Improve permissions required around setup mode (elastic#50421) Additional validation for elasticsearch username (elastic#48247) Revert changes to use_kibana_ui_setting (elastic#50877) ... # Conflicts: # src/legacy/core_plugins/console/server/request.test.ts
Summary
If "elastic" user is set in config:
Resolves: #45973
"Release Note: Deprecated the use of the 'elastic' superuser for Kibana."
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.[ ] This was checked for cross-browser compatibility, including a check against IE11[ ] Documentation was added for features that require explanation or tutorials[ ] This was checked for keyboard-only and screenreader accessibilityFor maintainers