-
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
Introduce reserved ml privilege for the apm_user role #72266
Conversation
Pinging @elastic/ml-ui (:ml) |
Pinging @elastic/kibana-security (Team:Security) |
Pinging @elastic/apm-ui (Team:apm) |
@@ -14,11 +14,11 @@ export const METRICS_FEATURE = { | |||
order: 700, | |||
icon: 'metricsApp', | |||
navLinkId: 'metrics', | |||
app: ['infra', 'kibana'], | |||
app: ['infra', 'metrics', 'kibana'], | |||
catalogue: ['infraops'], |
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.
Maybe a silly question: why is this PR updating the infra app and not the apm app?
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.
APM is already "compliant" with the new requirement that your navLinkId
value must be included in your app
array. Infra was one of the few that weren't already configured this way:
kibana/x-pack/plugins/apm/server/feature.ts
Lines 16 to 17 in 2642d65
navLinkId: 'apm', | |
app: ['apm', 'kibana'], |
@elasticmachine merge upstream |
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.
Code changes LGTM 👍
x-pack/test/functional/apps/infra/feature_controls/infrastructure_spaces.ts
Show resolved
Hide resolved
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.
ML changes LGTM
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.
The integration between infra
and ml
seems to continue to work 👍
@elasticmachine merge upstream |
💚 Build SucceededBuild metricspage load bundle size
History
To update your PR or re-run it, just comment with: |
Thanks all for your reviews and testing, I appreciate it! |
Co-authored-by: Elastic Machine <[email protected]>
Co-authored-by: Elastic Machine <[email protected]>
…73431) Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
…73432) Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
Adds a new Kibana "reserved" privilege to the Machine Learning feature, in order to grant access to a subset of ML functionality within Kibana. This new privilege will be granted to the builtin
apm_user
role via elastic/elasticsearch#59854.Previously, the
apm_user
role was authorized to retrieve ML jobs by virtue of its privileges against the.ml-anomalies*
set of indices. This access is no longer sufficient, now that the ML feature is taking advantage of the Kibana privilege model.In order to maintain BWC for existing users of the
apm_user
role, it's necessary to create a reserved privilege which mimics the previous access that this role used to have. Eventually, the Kibana privilege model will be updated to support access to ML jobs in a more holistic manner, but that is a longer term initiative.Corresponding Elasticsearch PR: elastic/elasticsearch#59854
If you were pinged for CODEOWNERS review, and you're not on the Security or ML teams:
This new reserved privilege is the first of its kind which needs to grant access to a feature's underlying functionality, without granting access to the UI application itself. As a result, this PR also takes additional steps to transition away from the
navLinkId
property of the feature, in favor of theapp
property (see #66217).In short, this means that every feature which declares a
navLinkId
must also include that id as one of theirapp
entries in the feature.To fully test this end-to-end, you must run Elasticsearch from my branch: https://github.com/legrego/elasticsearch/tree/fc/reserved_ml_apm_user
Resolves: #72260