Question: what's the best way to add a GitHub Organization without specifying a team? #5420
Replies: 4 comments 1 reply
-
|
It depends on your dex configuration, but users are also members of |
Beta Was this translation helpful? Give feedback.
-
|
@jessesuen so you should be able to omit team? |
Beta Was this translation helpful? Give feedback.
-
|
Yes, you configure RBAC as: |
Beta Was this translation helpful? Give feedback.
-
|
Adding a GitHub Organization as an AppProject source requires configuring the GitHub SSO connector and setting up RBAC. Here's the approach: 1. GitHub OAuth App Setup (for Org-level access): # argocd-cm ConfigMap
data:
url: https://argocd.example.com
dex.config: |
connectors:
- type: github
id: github
name: GitHub
config:
clientID: $GITHUB_CLIENT_ID
clientSecret: $GITHUB_CLIENT_SECRET
orgs:
- name: your-github-org
# Optional: restrict to specific teams
teams:
- your-github-org:platform-team2. RBAC config to grant org members access: # argocd-rbac-cm ConfigMap
data:
policy.csv: |
# Grant org members viewer access to all apps
g, your-github-org, role:readonly
# Grant platform team admin access
g, your-github-org:platform-team, role:admin
# Project-scoped permissions
p, role:dev-team, applications, *, dev-project/*, allow
g, your-github-org:dev-team, role:dev-team
policy.default: role:readonly
scopes: '[groups]'3. Verify the groups claim is populated: argocd account get-user-info
# Should show: groups: ["your-github-org", "your-github-org:platform-team"]Common gotcha: GitHub only includes org membership in the OAuth token if the OAuth App has been granted org access (the org owner may need to approve it). Check Settings → Applications → OAuth Apps in the org. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey guys! Thanks for your awesome product. I am wondering how to use the
argocd-rbac-cmto bind a role to a GitHub organization. Was wondering if the following would work?your-github-org:*Thanks!
Beta Was this translation helpful? Give feedback.
All reactions