-
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
[Upgrade Assistant] Provide ways to surface deprecation warnings for multiple spaces #127341
Comments
cc @elastic/kibana-core for visibility and to discuss our options for supporting this from the deprecations-service. |
Pinging @elastic/platform-deployment-management (Team:Deployment Management) |
Thanks @TinaHeiligers for starting this discussion! The Upgrade Assistant currently only requires that the user has the
I think we should consider restricting access to UA. I imagine only admins would be responsible for the upgrade process, and it seems like we potentially put a user with insufficient privileges in a bad situation by letting them think they are ready to upgrade, when in reality they are not.
Would we be able to surface a warning though, if a user doesn't have sufficient privileges? Per @jportner:
|
Agreed.
Basically what we want to do is to check if the user has the global However, you can't check if a user has a base privilege (that's basically a set of individual privileges), you have to check if they have access to a specific privilege - what we call a "privilege action". You could check to see if the user is allowed to manage Spaces, which they are only allowed to do if they are a global admin. kibana/x-pack/plugins/security/server/authorization/privileges/privileges.ts Lines 103 to 116 in 6eae6b8
Here's an example where we prevent the Space Management page from loading if the user doesn't have the kibana/x-pack/plugins/spaces/public/management/edit_space/manage_space_page.tsx Lines 89 to 92 in 9d662b7
There are other privilege actions registered (management.kibana.spaces, catalogue.spaces) to hide the links to the Space Management page too. |
Do we have examples of deprecations that are, or should be, space-specific?
The deprecation service is just the global registry of each registered deprecations. The actual deprecations logic is managed by the owning plugin that registered the associated deprecation provider. I don't think we can do anything ourselves within this service. The best we can do is properly restrict the deprecation endpoint's access to administrators (NOTE: we can do that exclusively via the But the logic to resolve (and, eventually, fix) deprecations for 'all spaces' will still have to be manually implemented in the individual deprecation providers.
Following my previous point, we could add an optional |
Copying my response in an internal repo:
We can restrict the endpoint access, yes, but I think it's more important to restrict the UI in a meaningful way so that users know they need an admin account to properly use the Upgrade Assistant.
Agreed.
I like this idea 😄 I'm curious to see if any other consumers are impacted by this though. |
Sorry for being unclear. Restricting the UI is the priority of course. Limiting the endpoint's access to the same roles/permission for consistency would be great. |
Thanks @jportner and @pgayvallet! It sounds like there are 3 potential action items here:
Does that sound right to everyone? I can open up separate issues to track this work if we're all in agreement. |
Yeah I think that makes sense edit: whoops I hit the wrong comment button! |
I've opened the following issues based on the discussion above: |
Access to the Upgrade Assistant UI isn't restricted to administrators, meaning that a user visiting the UA may not be authorized to read/write objects across all spaces.
If a user only has access to a subset of items and spaces, then any deprecations they handle from within that space won't be applied to all spaces for all users.
This can be misguiding because the user wouldn't know that the deprecation still applies in other spaces.
Ideally, we should provide a way to resolve a deprecation across all spaces but that would mean having to restrict access to the UA to admins only, or roles that have read/write privileges across all spaces and saved objects.
As a first step, we should investigate ways of surfacing a warning when a deprecation applies to more than one space.
The text was updated successfully, but these errors were encountered: