[RHOAIENG-15773] Fix MR permissions management error (give dashboard ServiceAccount permission to get endpoints) #3546
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves critical bug RHOAIENG-15773.
Description
Due to a change in the Model Registry operator (PR here, issue here), the
registry-user-${registryname}
role that is generated for each model registry now has an additional permission: get endpoints.The service account used by the dashboard to create rolebindings for managing model registry permissions does not have permission to get endpoints today. Because of this change, the Manage Permissions page's requests to create new rolebindings using this role are failing in the dashboard. This is due to a cluster API restriction that a user may not grant other users permissions that they don't have themselves.
We would like to discuss a longer-term solution to the constraint we've found here. It should not be possible to cause dashboard permission regressions by changing roles in another component (ideally, any user with rhoai admin permissions should have the same permissions any model registry user have). But for now, the short term fix is to add this new
get endpoints
permission to our ServiceAccount's ClusterRole.How Has This Been Tested?
Observe that with these manifests changed (via a devFlag on the cluster), the
odh-dashboard
ClusterRole has the changes from this PR's diff. Go to Model Registry Settings, click Manage Permissions on a registry, try to add a user, group or project, and make sure it succeeds.Test Impact
N/A, end to end tests would be nice for this case though once we are ready for that.
Request review criteria:
Self checklist (all need to be checked):
If you have UI changes:
After the PR is posted & before it merges:
main