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

Aggregated cluster roles for view access to SecretProviderClassPodStatus #1281

Closed
erikgb opened this issue Jun 15, 2023 · 1 comment · Fixed by #1283
Closed

Aggregated cluster roles for view access to SecretProviderClassPodStatus #1281

erikgb opened this issue Jun 15, 2023 · 1 comment · Fixed by #1283
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@erikgb
Copy link
Contributor

erikgb commented Jun 15, 2023

Describe the solution you'd like
[A clear and concise description of what you want to happen.]

Use case: As a regular namespace user I would like to track the binding between a pod and SecretProviderClass (SecretProviderClassPodStatus). Access to the status resource currently requires cluster-admin role or custom RBAC. I think secrets-store-csi-driver should by default allow view access to aggregates cluster roles: view, edit, admin and cluster-reader.

Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]

Aggregated cluster roles for SecretProviderClass were added in #836, but I don't understand why this wasn't fixed for SecretProviderClassPodStatus at the same time....

Environment:

  • Secrets Store CSI Driver version: (use the image tag): N/A
  • Kubernetes version: (use kubectl version): N/A
@erikgb erikgb added the kind/feature Categorizes issue or PR as related to a new feature. label Jun 15, 2023
@erikgb
Copy link
Contributor Author

erikgb commented Jun 15, 2023

This is what I think should be provisioned by default:

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  labels:
    rbac.authorization.k8s.io/aggregate-to-view: "true"
    rbac.authorization.k8s.io/aggregate-to-edit: "true"
    rbac.authorization.k8s.io/aggregate-to-admin: "true"
    rbac.authorization.k8s.io/aggregate-to-cluster-reader: "true"
  name: secretproviderclasspodstatuses-viewer
rules:
  - apiGroups:
      - secrets-store.csi.x-k8s.io
    resources:
      - secretproviderclasspodstatuses
    verbs:
      - get
      - list
      - watch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant