-
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
[Reporting] use new application privileges model for reporting’s security perms #19914
Comments
I think the solution here is to base reporting’s security perms off of the new application privileges model rather than continuing to rely on this role config. Then you’d get UI/API based control over this for free. |
Pinging @elastic/kibana-reporting-services (Team:Reporting Services) |
This discussion has been trying to get off the ground. I'd say this is the issue to follow on that front, yes? #21689 |
@tsullivan that seems like an appropriate place to me, though in theory you might be able to do this with feature controls alone, which wouldn't require reports to be saved objects. @elastic/kibana-security might be able to clarify that. I think reports being saved objects in the long run makes a lot of sense though. |
This is entirely possible, and is likely the path we'd want to take if we want this in the immediate future. Changing Reporting to use saved-objects will get us a majority of the way where we want to go; however, it won't provide the ability to make reports user-specific, which Reporting currently implements. Alerting will be taking a similar approach (but using saved-object internally) by creating an "Alerting Client" which will enforce the appropriate authorization rules, similar to what is automatically done by the |
We should support both privilege models, and allow the user which model to choose (or both) using a config setting in kibana.yml. The default model will be the current one, where the
This should be resolved from my previous comment. The admin will have to opt-in to the new privilege model in 7.x, or be forced to use it when upgrading to 8.0. That makes it a safe and non-breaking choice of which model to use for the admin. For the plugin code, it makes the choice of privilege model explicit.
We can make it so that the user doesn't need the
Sub-feature.
The Reporting management page could have a 3rd checkpoint, in addition to the checks in the app UIs, and the check in the Generate Export API route handler. |
Pinging @elastic/kibana-app-arch (Team:AppArch) |
The progress on this issue so far has been to create an example plugin for Reporting. Step 2 of the example plugin will be to instrument the privileges model around the example integration. That will help with App Developers to understand how to instrument privileges model in the various places where Reporting is integrated (Discover, Visualize, Dashboard, Canvas) |
Issue to track this as a breaking change, and use the Upgrade Assistant to surface user accounts that need migration: #92485 |
I've started work on this, and found a bit of groundwork that will need to happen: #94995 |
WIP PR #94966 |
What we have
Reporting currently utilizes a "higher-order handler" function to determine if the user (who initiated the request) has access to reporting. This is both a check on their licensing level, security setup, and if a configured (or not)
reporting_user
role is in their roles definition. This system works for what we have today but is lacking in a few areas:Why do this?
For reporting to function as it is today, we don't actually need to do this. Scheduled reports, however, does require longer lived credentials which our current model doesn't support. In reporting today, we memorize certain headers from the initial job-creation request, and when our headless browser starts we "inject" these same headers on all network requests in order to mimic being the actual user. This is a doable workflow for ad-hoc reports since the user's authorization tokens last long enough to ensure the reports work. However, since scheduled reports will likely outlive authorization tokens, reporting will need a more flexible permissions model in order to run reports on a users behalf. This new permissions model should get us this "for free" as far as my understanding goes.
High-level work needing to be done
Potential Downsides and caveats
Given the larger change our users will face with this, there might arise some issues we should be aware of.
Open Questions
reporting_user
role, do we want to try and use both systems to mitigate a breaking change?Original Issue:
Similar to the dashboard only mode configuration via the advanced settings view, users would like to configure roles that have access to reporting through the UI.
The text was updated successfully, but these errors were encountered: