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

EXPLORE: Argo RBAC #40

Open
gsampaio-rh opened this issue Mar 23, 2020 · 9 comments
Open

EXPLORE: Argo RBAC #40

gsampaio-rh opened this issue Mar 23, 2020 · 9 comments
Labels
Milestone

Comments

@gsampaio-rh
Copy link
Contributor

Explore how to support OCP and / OR Kube esp for Argo RBAC

@tylerauerbeck tylerauerbeck changed the title EXPLORE: Support OCP and / OR Kube esp for Argo RBAC EXPLORE: Argo RBAC Mar 24, 2020
@tylerauerbeck
Copy link
Contributor

How do we want to configure roles/permissions inside of Argo? How do we want to utilize Argo projects?

@springdo
Copy link
Contributor

springdo commented Apr 9, 2020

Should we be following some of @sabre1041's OpenShift Blog about integrating to the RBAC provided by OCP?

https://www.openshift.com/blog/openshift-authentication-integration-with-argocd

@springdo
Copy link
Contributor

springdo commented Apr 9, 2020

@oybed - FYI

@eformat
Copy link
Member

eformat commented Apr 19, 2020

FYI .. for now it is too open (intentionally ! so we can figure out the right model)

in the argo CR we set:

  rbac:
    defaultPolicy: role:admin

See: https://argoproj.github.io/argo-cd/operator-manual/rbac/

and the service account is bound to this cluster admin role argocd-application-controller

now, there are multiple problems to solve here:

  • CRD's which may be needed (not only for argocd install), but user apps - requires cluster admin
  • multiple namespaces managed by argocd
  • RBAC, user's groups etc using argocd + openshift rbac model (should hopefully be as simple as mapping openshift groups to argocd, exposing in the bootstrap helm chart/argcd operator)

also linked to - #56

@oybed
Copy link

oybed commented Apr 20, 2020

There's really 2 aspects of RBAC that needs to be considered:

  1. RBAC to Argo itself (covered by @sabre1041 's blog and custom images)
  2. RBAC for what Argo can deploy/manage based on the requester's permission levels.

I'd argue that #1 is a nice to have for dev env., but less important the closer to production you get (yes, some level of read-only access is nice to have). As an example - for OMP we have chosen to do everything through Argo for all environments beyond dev and hence only grant read-only for users - even to the OpenShift clusters.
Item #2 is the feature that Argo currently lacks (from what I know) and hence needs to run with cluster-admin rights to be able to handle everything for the users. This means the content Argo handles needs to be sanitized externally and a good process needs to be in place for how to accept/sanitize/test/track changes.

@eformat
Copy link
Member

eformat commented Apr 20, 2020

hi @oybed, just to add to add to this discussion, for (2)

https://github.com/argoproj/argo-cd/blob/master/docs/operator-manual/rbac.md

so, you can create and map arbitrary roles/users/groups/system users - in the argocd configmap to openshift

argocd service accounts only need cluster read at minimum, not write (in this UJ repo we explicitly set this role as too open, but it needs refining or a mechanism to refine in bootstrap for different environments)

We could also consider adding this to the _templated() argo project function, to restrict what argocd projects can do:

@springdo springdo added the 🔎 enhancement 📈 New feature or request label Apr 20, 2020
@oybed
Copy link

oybed commented Apr 21, 2020

@eformat thx for sharing and certainly some good stuff to dig in on. Thanks for the links - I'll take a closer look as time allows.

However, at first glance it looks to be quite a bit of plumbing and structure needed to avoid for it to go sideways - a.k.a.: not as simple as for example the openshift-applier whereas it runs with the permissions you as a user have, or said differently running as oc --as=<user>.

Anyway - good stuff to explore and see what can be iterated on.

@eformat
Copy link
Member

eformat commented Apr 21, 2020 via email

@pcarney8 pcarney8 added this to the v1.0.0 milestone Apr 24, 2020
@eformat
Copy link
Member

eformat commented Apr 29, 2020

also see master -> child argocd addition now

using argocd project in the master argocd .. means we can control what namespaces and cluster resources are whitelisted for that instance as a whole

we could/should also consider arocd projects in the child argocd - eventhough that is controlled by a product team .. probably good practice for namespace control ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants