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

Subresources support for generated rules #71

Open
scorsair opened this issue Jan 30, 2023 · 7 comments
Open

Subresources support for generated rules #71

scorsair opened this issue Jan 30, 2023 · 7 comments
Labels
enhancement New feature or request

Comments

@scorsair
Copy link

What would you like to be added:
It would be nice to add subresources support to RBAC generation fuctional.

Why is this needed:
It can make generation rules useful =)
Now I have to rewrite them manually after generation.

@gadinaor-r7
Copy link
Contributor

Thanks @scorsair - can you provide examples of what you are trying to achieve ?
Also - take a look at #48 .

@scorsair
Copy link
Author

Thanks for the reference, I haven't seen that proposition before. My point is the generated rules should contains all possible apiGroups included subResources like pod/exec, pod/log & etc. Especially if we use [""]. Current rules that we generate with [""] not full and don't cover all cluster permissions because of lack of subresources.

@scorsair
Copy link
Author

scorsair commented Feb 1, 2023

It would be nice to support namespaced resources:
--namespaced=true|false|none # true - only namespaced, false - all resources, none - only non namespaced resources

@gadinaor-r7
Copy link
Contributor

It would be nice to support namespaced resources: --namespaced=true|false|none # true - only namespaced, false - all resources, none - only non namespaced resources

@scorsair which command you are referring to?

@scorsair
Copy link
Author

scorsair commented Feb 1, 2023

It would be nice to support namespaced resources: --namespaced=true|false|none # true - only namespaced, false - all resources, none - only non namespaced resources

@scorsair which command you are referring to?

All my proposals about rbac-tool gen
Example for namespaced resources is: kubectl api-resources --namespaced=true

@gadinaor-r7
Copy link
Contributor

@scorsair - can you please provide some use cases - how specifically would you use namespaced flag?
What policies are you trying to generate?

@scorsair
Copy link
Author

scorsair commented Feb 1, 2023

The main purpose is make a pipeline for generating roles for customers per namespace + clusterwide. Roles should be specific and contains only allowed items. Currently we cannot use tool cause lack of subresources in generated roles when we use asterisk.
The namespaced resources are nice to have feature to reduce rules for better visibility and support.

@gadinaor gadinaor added the enhancement New feature or request label Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants