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

Support K8s API RBAC for user/group permissions #9095

Open
wmgroot opened this issue Apr 13, 2022 · 3 comments
Open

Support K8s API RBAC for user/group permissions #9095

wmgroot opened this issue Apr 13, 2022 · 3 comments
Labels
enhancement New feature or request security Security related

Comments

@wmgroot
Copy link
Contributor

wmgroot commented Apr 13, 2022

Summary

Rather than needing to configure RBAC explicitly to allow users and groups to perform actions such as deleting a Pod through the ArgoCD UI, it would be extremely helpful to enable ArgoCD to respect the RBAC permissions already configured for the user for certain actions (resource deletion, pod exec).

Motivation

A feature like this would allow us to use ArgoCD as more than a readonly dashboard, and enable users to perform restarts of their workloads through the ArgoCD UI in addition to using kubectl, without the need to configure additional duplicated RBAC in ArgoCD.

Some users find a UI (like ArgoCD) much more intuitive to work with when learning K8s, and right now we cannot easily grant them write permissions to their resources in the ArgoCD UI.

Proposal

Skooner is an alternative Kubernetes Dashboard that proxies requests through to the K8s API, allowing users to perform actions such as pod deletion or pod exec without any extra RBAC configuration necessary.
https://github.com/skooner-k8s/skooner#oidc

I understand that ArgoCD will still have its own need for it's own authorization scheme for resources that it controls, but we may be able to include a second OIDC integration to support proxying certain actions against the K8s API, with the RBAC configured on the cluster, rather than the RBAC configured in ArgoCD.

@wmgroot wmgroot added the enhancement New feature or request label Apr 13, 2022
@scalen
Copy link
Contributor

scalen commented Jul 11, 2022

Alternative Proposal

Originally discussed in #3593: We could use k8s impersonation to allow ArgoCD to perform k8s-native actions on app-owned resources as if they are the logged in user, assuming that the ArgoCD username and the k8s username match for a given user.

Alternatively, for less volatile configuration, we could map ArgoCD groups to k8s groups, configure your k8s RBAC at the group level, and use --as-group when performing k8s-native actions on app-owned resources.

Supporting the second should be trivial once the first is implemented, so ArgoCD could support both mechanisms. If there is only the developer resource for one, I would personally prefer the group-level implementation 😛

@crenshaw-dev crenshaw-dev added the security Security related label Jul 11, 2022
@wmgroot
Copy link
Contributor Author

wmgroot commented Mar 16, 2023

I 100% agree with what's being suggested in the issue you linked as well as #7689.
User impersonation (so that we see the correct user instead of the ArgoCD SA in the audit log) is an ideal way to handle this.

@otherguy
Copy link

otherguy commented Mar 4, 2024

Now that our rollout of ArgoCD is expanding across many different applications on multiple clusters, this would be an essential feature for us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request security Security related
Projects
None yet
Development

No branches or pull requests

4 participants