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

Introduce reserved_ml_apm_user kibana privilege #59854

Merged
merged 1 commit into from
Jul 22, 2020

Conversation

legrego
Copy link
Member

@legrego legrego commented Jul 20, 2020

Adds a new Kibana "reserved" Kibana application privilege to the apm_user role, in order to grant access to a subset of ML functionality within Kibana.

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 Kibana PR: elastic/kibana#72266

@legrego legrego added :Security/Authorization Roles, Privileges, DLS/FLS, RBAC/ABAC Team:Security Meta label for security team v7.10.0 v7.9.0 v8.0.0 labels Jul 20, 2020
@legrego legrego marked this pull request as ready for review July 20, 2020 13:53
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-security (:Security/Authorization)

}, null, MetadataUtils.DEFAULT_RESERVED_METADATA))
}, new RoleDescriptor.ApplicationResourcePrivileges[] {
RoleDescriptor.ApplicationResourcePrivileges.builder()
.application("kibana-*").resources("*").privileges("reserved_ml_apm_user").build()
Copy link
Member

Choose a reason for hiding this comment

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

Clarifying question since I'm not familiar with "reserved" privileges: I couldn't find reserved_ml_apm_user in elastic/kibana#72266 but I did find ml_apm_user. Is reserved_ an implied prefix somehow?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good question. Yes, the reserved_ prefix is generated by Kibana's security plugin when it "serializes" our privilege model into Elasticsearch's Application Privilege model:

https://github.com/elastic/kibana/blob/bf04235dae35452061cc7ea3d86d96c19a58206c/x-pack/plugins/security/server/authorization/privilege_serializer.ts#L61

Copy link
Member

@sorenlouv sorenlouv left a comment

Choose a reason for hiding this comment

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

lgtm

@tvernum tvernum self-requested a review July 21, 2020 22:38
Copy link
Contributor

@tvernum tvernum left a comment

Choose a reason for hiding this comment

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

LGTM

@legrego legrego merged commit fc94423 into elastic:master Jul 22, 2020
@legrego legrego deleted the fc/reserved_ml_apm_user branch July 22, 2020 14:13
legrego added a commit to legrego/elasticsearch that referenced this pull request Jul 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Security/Authorization Roles, Privileges, DLS/FLS, RBAC/ABAC Team:Security Meta label for security team v7.9.0 v7.10.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants