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

[RFE] Add additional verbs updatepsa and manage-namespaces #1219

Closed
edwin-bruurs opened this issue Sep 5, 2023 · 5 comments
Closed

[RFE] Add additional verbs updatepsa and manage-namespaces #1219

edwin-bruurs opened this issue Sep 5, 2023 · 5 comments

Comments

@edwin-bruurs
Copy link

Is your feature request related to a problem? Please describe.

Currently it is not possible to create a custom roles giving a user the following permissions

rules {
  api_groups = ["management.cattle.io"]
  resources = ["projects"]
  verbs= ["manage-namespaces", "updatepsa"]
}

This is needed to give a user additional permissions to create a namespace in a project. See also the documentation on the Rancher webhook validation

Using the code above results in the error expected rules.0.verbs.0 to be one of [* create delete deletecollection get list patch update view watch own use bind escalate impersonate], got updateps and Error: expected rules.0.verbs.1 to be one of [* create delete deletecollection get list patch update view watch own use bind escalate impersonate], got manage-namespaces

Describe the solution you'd like

Add the verbs updatepsa and manage-namespaces to the allowed verbs list.

Describe alternatives you've considered

Using the * verb. But in many cases this will grant to much permissions over the resource (e.g. giving full permission over projects is not what you typically want).

Additional context

See also related issues on adding new verbs:

@edwin-bruurs
Copy link
Author

I don't mind creating a MR if this feature is valuable.

@matttrach
Copy link
Collaborator

@edwin-bruurs what version of Rancher are you targeting with this change?

@matttrach
Copy link
Collaborator

I got an answer to this in another channel, this is targeting Rancher v2.10 and no backports are necessary.

@alegrey91
Copy link
Contributor

updatepsa and manage-namespaces added to the list of available verbs.

@joesims22
Copy link

Validated on v2.10-head id 8b50f83 and tfp 6.0.0-rc1 successfully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants