-
Notifications
You must be signed in to change notification settings - Fork 45
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
Admin user (in Dex) is not admin on Grafana #2653
Comments
It seems like the Dex static user does not support
This means that we cannot use the role-mapping feature from Grafana since the user info endpoint has no entries for Alternatively, we could fix this by using the below hack. We should, however, remove the below settings when we implement role-mapping with non-static users
|
Oh no we can't deploy Grafana with this "hack". Instead, we could use role-mapping to map this special username (no need to rely on groups) to the Admin role. |
Reading the Grafana role mapping docs, here is a fix proposal
|
Instead of simply hard-coding this value like proposed above, we could indeed obtain the value from a read service configuration. Why? Now if we read from an SC, then the above issue is solved is partly solved, since users will only need to restart the grafana deployments. Given how we render charts per namespace, simply re-rendering the Prometheus-operator charts with
We ideally should end with something like this in the Prometheus-operator charts
With value looking like:
|
This chart is rendered using: ``` ./charts/render.py prometheus-operator --namespace metalk8s-monitoring \ charts/prometheus-operator.yaml charts/prometheus-operator/ \ --service-config grafana metalk8s-grafana-config metalk8s/addons/prometheus-operator/config/grafana.yaml metalk8s-monitoring \ --service-config prometheus metalk8s-prometheus-config metalk8s/addons/prometheus-operator/config/prometheus.yaml metalk8s-monitoring \ --service-config alertmanager metalk8s-alertmanager-config metalk8s/addons/prometheus-operator/config/alertmanager.yaml metalk8s-monitoring \ --service-config dex metalk8s-dex-config metalk8s/addons/dex/config/dex.yaml metalk8s-auth \ > salt/metalk8s/addons/prometheus-operator/deployed/chart.sls ``` Closes: #2653
This chart is rendered using: ``` ./charts/render.py prometheus-operator --namespace metalk8s-monitoring \ charts/prometheus-operator.yaml charts/prometheus-operator/ \ --service-config grafana metalk8s-grafana-config metalk8s/addons/prometheus-operator/config/grafana.yaml metalk8s-monitoring \ --service-config prometheus metalk8s-prometheus-config metalk8s/addons/prometheus-operator/config/prometheus.yaml metalk8s-monitoring \ --service-config alertmanager metalk8s-alertmanager-config metalk8s/addons/prometheus-operator/config/alertmanager.yaml metalk8s-monitoring \ --service-config dex metalk8s-dex-config metalk8s/addons/dex/config/dex.yaml metalk8s-auth \ > salt/metalk8s/addons/prometheus-operator/deployed/chart.sls ``` Closes: #2653
Component: grafana
What happened:
When logging into Grafana, with the default
[email protected]
static user in Dex, we get read-only access.What was expected:
This user should have super-admin access.
Steps to reproduce: (affects all 2.5+ versions)
Resolution proposal (optional):
Not clear: see https://grafana.com/docs/grafana/latest/auth/generic-oauth/#role-mapping
The text was updated successfully, but these errors were encountered: