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

DYNAMIC RBAC User added to a cluster with "manage-cluster-members" is not able to modify users of the cluster. #11116

Closed
sangeethah opened this issue Jan 24, 2018 · 4 comments
Labels
area/rbac kind/bug Issues that are defects reported by users or that we know have reached a real release

Comments

@sangeethah
Copy link
Contributor

sangeethah commented Jan 24, 2018

Rancher versions: v2.0 built on jan23

Steps to reproduce the problem:
Create a cluster c1.
Create a project P1.
Add "user1" with "manage-cluster-member" option.

Log in as user1.
Try to edit cluster c1 and add a new user to the cluster.

This fails with

clusters.management.cattle.io "cluster-xr7k6" is forbidden: User "user-c85lg" cannot update clusters.management.cattle.io at the cluster scope

The request made by UI is edit cluster for which the user does not have access to fails:

Request URL:https://***/v3/clusters/cluster-xr7k6
Request Method:PUT
Status Code:403 Forbidden
Remote Address:*:443

We should be able to decouple the edit cluster action and add/edit member to cluster action.

@sangeethah sangeethah added kind/bug Issues that are defects reported by users or that we know have reached a real release area/ui labels Jan 24, 2018
@westlywright westlywright self-assigned this Jan 29, 2018
@westlywright
Copy link
Contributor

@sangeethah i think this should be an API issue. If we want to change the way a role functions I don't think that should be happening on the front end and this seems to be a permission error coming from the API not the UI.

cc @deniseschannon

@westlywright westlywright removed their assignment Jan 29, 2018
@deniseschannon deniseschannon added this to the v2.0 - MS2 milestone Jan 29, 2018
@vincent99 vincent99 removed the area/ui label Feb 6, 2018
@deniseschannon deniseschannon modified the milestones: v2.0 - MS3, v2.0 - GA Feb 28, 2018
@cjellick
Copy link

cjellick commented Mar 5, 2018

@westlywright to be clear, the role does exactly what it states: gives the permission to CRUD members of the cluster (POST/PUT/DELETE CRTBs). But the UI throws in a PUT to the cluster to update the name/description which has nothing to do with managing members and that is failing. Looks like this will be addressed as part of dynamic RBAC, wherein the API will remove the update link from the cluster and the UI will key off of its presence/absence to do the PUT.

More details here:
#11105

Will keep the discussion thread in that issue

@deniseschannon
Copy link

If you update the members from the members tab of a cluster, you will be able to manage cluster membership. The reason why it doesn't work in "Edit Cluster" is because you are trying to also edit the cluster, which you don't have permissions.

@deniseschannon
Copy link

When confirming that this use case is working, we should also test CLI to ensure that this use case in this issue is also fixed: #12892

@cjellick cjellick changed the title User added to a cluster with "manage-cluster-members" is not able to modify users of the cluster. DYNAMIC RBAC User added to a cluster with "manage-cluster-members" is not able to modify users of the cluster. Jul 9, 2018
@deniseschannon deniseschannon modified the milestones: v2.1, v2.2 Aug 21, 2018
@cjellick cjellick modified the milestones: v2.2, Backlog Sep 18, 2018
@deniseschannon deniseschannon removed this from the Unscheduled milestone Jul 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/rbac kind/bug Issues that are defects reported by users or that we know have reached a real release
Projects
None yet
Development

No branches or pull requests

6 participants