Skip to content

Commit

Permalink
Add grafana role attribute path setting
Browse files Browse the repository at this point in the history
This maps github teams to roles on grafana, now that manually updating roles for users from external auth providers isn't possible
  • Loading branch information
ChrisLovering committed Dec 6, 2023
1 parent d939766 commit 0c03a87
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kubernetes/namespaces/default/grafana/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ data:
GF_AUTH_GITHUB_ENABLED: "true"
GF_AUTH_GITHUB_SCOPES: "user:email,read:org"
# IDs can be retrieved via `gh api orgs/python-discord/teams`.
GF_AUTH_GITHUB_TEAM_IDS: "2638565,3854739,3114246"
GF_AUTH_GITHUB_TEAM_IDS: "2638565,3854739,3114246,7361120,9120709"
GF_AUTH_GITHUB_ROLE_ATTRIBUTE_PATH: "contains(groups[*], ['@python-discord/directors', '@python-discord/sudo-devops']) && 'Admin' || contains(groups[*], '@python-discord/admins') && 'Editor' || 'Viewer'"
GF_AUTH_GITHUB_AUTH_URL: "https://github.com/login/oauth/authorize"
GF_AUTH_GITHUB_TOKEN_URL: "https://github.com/login/oauth/access_token"
GF_AUTH_GITHUB_API_URL: "https://api.github.com/user"
Expand Down

0 comments on commit 0c03a87

Please sign in to comment.