-
Notifications
You must be signed in to change notification settings - Fork 31
fix: update project-scoped permissions to include missing harvester r… #503
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -21,6 +21,20 @@ rules: | |||||||||
| - get | ||||||||||
| - list | ||||||||||
| - watch | ||||||||||
| - apiGroups: | ||||||||||
| - harvesterhci.io | ||||||||||
| resources: | ||||||||||
| - "*" | ||||||||||
| verbs: | ||||||||||
| - get | ||||||||||
| - list | ||||||||||
| - watch | ||||||||||
| - apiGroups: | ||||||||||
| - harvesterhci.io | ||||||||||
| resources: | ||||||||||
| - supportbundles | ||||||||||
| verbs: | ||||||||||
| - "*" | ||||||||||
|
||||||||||
| - "*" | |
| - get | |
| - list | |
| - watch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This allows read-only project user to generate support bundle. However, project users will require permissions into the harvester-system namespace for the support bundle workload to run, which isn't granted by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean: by default, the project-view can't successfully generate supportbundle even with this rbac?
As support-bundle includes too many system related infromation, maybe we could remove this from chart default value; if user wants to, we have a document guide about how to edit the chart Values.yaml below parts to grant this. User takes the risk.
{{- with .Values.projectRole.virtProjectView.additionalRules }}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean: by default, the project-view can't successfully generate supportbundle even with this rbac?
Correct. This change only grants permission to the supportbundles.harvesterhci.io API resource; nothing more. It is something that all cluster/project users need. We will follow this up with a backend issue to discuss how to approach this. The controller needs to identify the namespaces where the user has permissions to run the support bundle generators. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
User takes the risk.
{{- with .Values.projectRole.virtProjectView.additionalRules }}
My thinking is that, until we have a backend enhancement, if admin wants to give project users ability to generate support bundle, they can grant these users additional permissions via other custom roles on an individual basis. Using {{- with .Values.projectRole.virtProjectView.additionalRules }} means all project users end up with these extra permissions, not just those who are approved. By including the supportbundles.harvesterhci.io rule in the built-in role, admin won't have to keep repeating them in their own custom roles.
Uh oh!
There was an error while loading. Please reload this page.