Skip to content

Commit

Permalink
Add role attribute to Grafana generic auth settings
Browse files Browse the repository at this point in the history
To map the OIDC default admin user `[email protected]` to
a Grafana admin role, we need to make use of Grafana role attributes.

This commit attaches an OIDC admin user using role_attribute_path for generic oauth
to a Grafana admin role.
  • Loading branch information
Ebaneck committed Aug 17, 2020
1 parent 8af781e commit ac1fc80
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions charts/prometheus-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ grafana:
auth_url: '__escape__(https://{{ grains.metalk8s.control_plane_ip }}:8443/oidc/auth)'
token_url: '__escape__(https://{{ grains.metalk8s.control_plane_ip }}:8443/oidc/token)'
api_url: '__escape__(https://{{ grains.metalk8s.control_plane_ip }}:8443/oidc/userinfo)'
role_attribute_path: contains(email, '{% endraw -%}{{ dex.spec.localuserstore.userlist[0]['email'] }}{%- raw %}') && 'Admin'

testFramework:
enabled: false
Expand Down

0 comments on commit ac1fc80

Please sign in to comment.