-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Let's introduce an RBAC HTTP REST API to manage RBAC-Config #16638
Comments
I'm uneasy about introducing a feature which may encourage people to not use gitops to manage such an important config file. |
The idea behind the API Service is to enable external operators, e.g. provider-argocd, to update and modify the RBAC Settings. |
Some discussion on Slack as well here: https://cloud-native.slack.com/archives/C01TSERG0KZ/p1705335678987749 |
An external operator can also do this via the existing mechanism, so I also don't see the value. |
This makes perfect sense. In the long-term users should exclusively be able to operate on a gitops fashioned workflow, which the current solution allows. Probably there are possible solutions that do meet the requirement of gitops and comes not with the inconveniences the current solution has (unstructured, not validated).
Yet, the external operator would not really be able to perform structured changes with validation in place, which in the end basically results in just some better templating and rendering of the ConfigMap, essentially re-rendering the entire argocd-rbac-cm data. As mentioned in the slack discussion, I see a potential for more complex use-casaes, such as:
A k8s CRD based API (perhaps quite similar to the k8s RBAC API) would in addition tackle the potentially limiting size limit of k8s configmaps by spreading the individual RBAC snippets across many CRs. (this in fact would be breaking, as we would need to get rid of the argocd-rbac-cm entirely) Ultimately, multi-tenant setups (except for project level permissions, as we have an API that is authorized by k8s RBAC) can not be performed by Argo CD standalone. |
This may be a different story, but why doesn't ArgoCD use Kubernetes' RBAC and SelfSubjectAccessReview like Argo Workflow or other SSO tools? It appears that authority control can be unified by declaring ArgoCd Object in advance in Kubernetes Role and RoleBinding and controlling it through Group in IdP. |
We're currently working on a design for a CRD-based API for RBAC config, similar to the k8s RBAC Service, since the REST API would discourage the use of GitOps for managing the config :) |
New idea to introduce a CRD-based API for RBAC-Config (#18058), so closing this issue. |
Summary
The RBAC-Config currently can only be updated using the Kubernetes ConfigMap API.
This makes it very difficult to authorize permissions changes to the individual Casbin-based policies within the file.
Administrators usually receive permission to edit the entire argocd-rbac-cm object, where fine granular edits can not be distinguished by the Kubernetes ConfigMap API.
ArgoCD should provide interfaces for managing its RBAC settings, including write and read functionality.
Motivation
Considering other interfaces that Argo CD provides, an extension of the HTTP-based API (documented at /swagger-ui) for managing RBAC-related settings seems reasonable.
Especially when considering current operation patterns for managing access control: "editing in-line strig CSV via the k8s ConfigMap API" does come with a few limitations:
Especially when using configuration automation tools such as Terraform, Ansible, Pulumi, cdk8s, and Crossplane the current Configmap Interface seems to be a blind spot.
Existing tools that rely on a real API can not be leveraged to administer the Casbin-based CSV for ArgoCD, often resulting in the necessity of manual operations.
Therefore the REST API will address the lack of structured configuration management and introduce interface stability.
An RBAC HTTP REST API would be great, as tools like https://github.com/crossplane-contrib/provider-argocd can directly interact with an API and abstract the persistent data (CSV).
Furthermore, this extension would provide a basis for delegated administration, so that management of a subset of permissions could be delegated to respective subjects.
Proposal
The following changes are proposed:
As the Project API also defines roles, it will remain untouched. Only the global policies defined in the argocd-rbac-cm ConfigMap are subject to this change.
The REST API won't replace the ConfigMap solution and will be compatible with existing ConfigMaps, making it a non-breaking change.
Related issue: #16050
The text was updated successfully, but these errors were encountered: