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

Consider adding a File Upload or Add Data reserved role #107731

Closed
jgowdyelastic opened this issue Aug 5, 2021 · 4 comments
Closed

Consider adding a File Upload or Add Data reserved role #107731

jgowdyelastic opened this issue Aug 5, 2021 · 4 comments
Labels
enhancement New value added to drive a business result Feature:File Upload impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort security Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! triage_needed

Comments

@jgowdyelastic
Copy link
Member

It would be useful if we shipped a reserved role which granted all of the privileges a user needs to use the File Upload feature.

Currently a non admin user who does not have any ML privileges will need to be using specifically crafted permissions to be able to use the File Upload feature.

The user can be assigned the ingest_admin role, but this only covers some of the required permissions.

They also need create, create_index, manage and read permissions for the index they have yet to create.
If creating a new role I will normally assign these privileges to * index or a partial index name with a wildcard. The latter restricts the user to only creating indices with that pattern.

They must also have a kibana privilege All for Discover to allow the user to analyse the selected file.
Originally ML granted users the 'fileUpload:analyzeFile' capability which provides the ability to analyse the file using the Find Structure API
It was decided that a "next best" Kibana feature should grant this capability rather than ML, Discover was chosen and so now a user with All Discover kibana privileges is granted 'fileUpload:analyzeFile' and is able to analyse files.

In summary, ideally the new "Add Data" or "File Upload" role would have these privileges:

  • manage_ingest_pipelines cluster privilege.
  • create, create_index, manage and read index privilege for * indices
  • All Discover kibana privilege

This single role would allow a user to use the File Upload feature in its entirety.

@jgowdyelastic jgowdyelastic added enhancement New value added to drive a business result Feature:File Upload security labels Aug 5, 2021
@botelastic botelastic bot added the needs-team Issues missing a team label label Aug 5, 2021
@kertal kertal added the Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! label Aug 9, 2021
@elasticmachine
Copy link
Contributor

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

@botelastic botelastic bot removed the needs-team Issues missing a team label label Aug 9, 2021
@legrego
Copy link
Member

legrego commented Aug 9, 2021

We generally try not to introduce reserved roles for specific Kibana features -- the apm_user role is a notable exception, but I think in hindsight we would have made a different decision.

This feature is particularly tricky since it needs access to user indices, and having a reserved role grant that access is something that probably won't be useful to a large number of folks: either we grant access to *, which is probably too permissive, or we grant access to some-subset-of-indices-*, in which case we are likely to choose a subset that won't work for most.

They must also have a kibana privilege All for Discover to allow the user to analyse the selected file.
Originally ML granted users the 'fileUpload:analyzeFile' capability which provides the ability to analyse the file using the Find Structure API
It was decided that a "next best" Kibana feature should grant this capability rather than ML, Discover was chosen and so now a user with All Discover kibana privileges is granted 'fileUpload:analyzeFile' and is able to analyse files.

I think another solution to the Kibana part of the problem is to grant this privilege to more features. Which features should grant this privilege is a broader discussion, but I could see this making sense for a good number of them.

Rather than introduce a reserved role to satisfy this need, I think a better approach would be to invest in a role management experience that caters to solutions, which can in turn assist with enabling features such as file upload (such as #80634). I could envision file upload becoming a feature that solutions embed into their UX, in which case they might have unique requirements about the specific privileges they need.

@jgowdyelastic
Copy link
Member Author

the fileUpload:analyzeFile capability just enables the initial analysis of the user's file, I think the real problem is the required elasticsearch privileges for uploading the file to a new index.

We generally try not to introduce reserved roles for specific Kibana features

Yes, I was expecting this, and it does make sense.

@exalate-issue-sync exalate-issue-sync bot added impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort labels Aug 9, 2021
@legrego
Copy link
Member

legrego commented Aug 19, 2021

the fileUpload:analyzeFile capability just enables the initial analysis of the user's file, I think the real problem is the required elasticsearch privileges for uploading the file to a new index.

Makes sense, thanks. In that case, I am going to close this in favor of #80634, which will address this specific problem in a more holistic manner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:File Upload impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort security Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! triage_needed
Projects
None yet
Development

No branches or pull requests

4 participants