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

Cannot assign the read-only role to a member on the cluster creation page #23061

Closed
cjellick opened this issue Sep 24, 2019 · 3 comments
Closed
Assignees
Labels
internal kind/bug Issues that are defects reported by users or that we know have reached a real release
Milestone

Comments

@cjellick
Copy link

cjellick commented Sep 24, 2019

Steps to reproduce:

  1. Go to cluster creation page
  2. In the members section, attempt to assign a user the Read-only role

Actual result:
you'll get an error message that says

Validation failed in API: Cannot edit context [project] from [cluster] context

Note that the cluster will actually get created, just that member won't get assigned.

Expected result:
Should be able to successfully create the cluster

More notes:
This is because the role that is being used for read-only is actually a project scoped role (it shows up on the Projects tab of the roles page and if you view it in the api, you can see that scope = "project"). In a recent release, we added validation to prevent using a project scoped role for cluster memberships (and vice versa).

So, the UI should not be presenting this role on this page (it is not presented on the stand-alone cluster members page).

But we might also want to consider adding a new "Cluster read-only" role. The question is what should a cluster read-only role actually do?
Should you be able to see every workload in every namespace with it? If so, it would actually have MORE viewing permissions than a normal Cluster member. Should it just be able to see a few things like members, projects, and nodes? I am not sure one-size is going to fit all here and we might want to leave this to the user to define by creating their own custom cluster role.

Version:
v2.2.8

gzrancher/rancher#6196

@cjellick cjellick added the kind/bug Issues that are defects reported by users or that we know have reached a real release label Sep 24, 2019
@cjellick
Copy link
Author

Update: already addressed in v2.3.0 by removing read-only from the dropdown

@maggieliu
Copy link

@sangeethah can we confirm if this is fixed in 2.4?

@jiaqiluo
Copy link
Member

jiaqiluo commented Oct 7, 2020

the bug fix is validated in v2.4-3786-head

It confirmes that no project-level role in the dropdown list when creating the cluster.

Screen Shot 2020-10-07 at 11 29 32 AM

And we can assign a user with a custom role when creating the cluster, and the cluster is created successfully.

@jiaqiluo jiaqiluo closed this as completed Oct 7, 2020
@zube zube bot removed the [zube]: Done label Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal 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

4 participants