-
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
[Controls] Use Internal User to Get Value of allow_expensive_queries
#155430
[Controls] Use Internal User to Get Value of allow_expensive_queries
#155430
Conversation
Pinging @elastic/kibana-presentation (Team:Presentation) |
src/plugins/controls/server/options_list/options_list_cluster_settings_route.ts
Show resolved
Hide resolved
💚 Build Succeeded
Metrics [docs]Page load bundle
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
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.
Looks good from our perspective.
Would it make sense to add an integration test to ensure kibana user has continued permission access? I could see kibana user roles getting changed and this breaking but no one noticing. |
Good question! I think we will be okay without functional tests specifically designed to catch changes in permissions on the Kibana Internal User. One reason for this is that we're now using the internal user for all scenarios, not just for some cases - or certain roles etc.
Another reason is because we are far from the only application to require the internal Kibana user to have this permission - from @legrego on slack:
|
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.
LGTM
code review only
elastic#155430) changes the way we access `allow_expensive_queries` to use the internal user. (cherry picked from commit 81b003d)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…ueries` (#155430) (#155548) # Backport This will backport the following commits from `main` to `8.7`: - [[Controls] Use Internal User to Get Value of `allow_expensive_queries` (#155430)](#155430) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Devon Thomson","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-04-21T18:19:53Z","message":"[Controls] Use Internal User to Get Value of `allow_expensive_queries` (#155430)\n\nchanges the way we access `allow_expensive_queries` to use the internal user.","sha":"81b003d431bbd0d5d0bc3fdf507a99e50133a386","branchLabelMapping":{"^v8.8.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Feature:Input Control","Team:Presentation","loe:hours","impact:critical","backport:prev-minor","v8.8.0"],"number":155430,"url":"https://github.com/elastic/kibana/pull/155430","mergeCommit":{"message":"[Controls] Use Internal User to Get Value of `allow_expensive_queries` (#155430)\n\nchanges the way we access `allow_expensive_queries` to use the internal user.","sha":"81b003d431bbd0d5d0bc3fdf507a99e50133a386"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.8.0","labelRegex":"^v8.8.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/155430","number":155430,"mergeCommit":{"message":"[Controls] Use Internal User to Get Value of `allow_expensive_queries` (#155430)\n\nchanges the way we access `allow_expensive_queries` to use the internal user.","sha":"81b003d431bbd0d5d0bc3fdf507a99e50133a386"}}]}] BACKPORT--> Co-authored-by: Devon Thomson <[email protected]>
Summary
This PR changes the way we access
allow_expensive_queries
to use the internal user. The internal user will havemonitor
permissions in almost every case, so this PR also removes the fallback added in #155082.Additionally, because we're now using the internal user, this PR renames
getClusterSettings
endpoint for Controls into agetExpensiveQueriesSetting
endpoint to be more specific.I tested this PR by:
monitor
privilege and assigning a user to that role