Skip to content

Commit

Permalink
docs: Added information about scopes (#2782) (#14354)
Browse files Browse the repository at this point in the history
* Added information about scopes in the docs

Signed-off-by: Christian Hernandez <christian@chernand.io>

* Apply suggestions from code review

Co-authored-by: Dan Garfield <dan@codefresh.io>
Signed-off-by: Christian Hernandez <christianh814@users.noreply.github.com>

---------

Signed-off-by: Christian Hernandez <christian@chernand.io>
Signed-off-by: Christian Hernandez <christianh814@users.noreply.github.com>
Co-authored-by: Dan Garfield <dan@codefresh.io>
  • Loading branch information
christianh814 and todaywasawesome authored Jul 6, 2023
1 parent ef8dae8 commit 47015cd
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions docs/operator-manual/rbac.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,33 @@ g, db-admins, role:staging-db-admins

This example defines a *role* called `staging-db-admins` with *nine permissions* that allow that role to perform the *actions* (`create`/`delete`/`get`/`override`/`sync`/`update` applications, `get` logs, `create` exec and `get` appprojects) against `*` (all) objects in the `staging-db-admins` Argo CD AppProject.

!!! note
The `scopes` field controls which OIDC scopes to examine during rbac
enforcement (in addition to `sub` scope). If omitted, defaults to:
`'[groups]'`. The scope value can be a string, or a list of strings.

Following example shows targeting `email` as well as `groups` from your OIDC provider.

```yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-rbac-cm
namespace: argocd
labels:
app.kubernetes.io/name: argocd-rbac-cm
app.kubernetes.io/part-of: argocd
data:
policy.csv: |
p, my-org:team-alpha, applications, sync, my-project/*, allow
g, my-org:team-beta, role:admin
g, user@example.org, role:admin
policy.default: role:readonly
scopes: '[groups, email]'
```

For more information on `scopes` please review the [User Management Documentation](user-management/index.md).

## Policy CSV Composition

It is possible to provide additional entries in the `argocd-rbac-cm`
Expand Down

0 comments on commit 47015cd

Please sign in to comment.