Grafana Multi-Tenant Discussion

I try to achieve multi tenancy in grafana, something like user-a which only able to get the metric which fall under user-a role, if user-a try to get metric which not under its role, user-a will be forbidden to query the metric.

Does this possible to achieve in grafana, or we have to workaround on its datasources like we need to have multiple prometheus and restrict team or organization to access to that datasource.

It seems that there are several questions to solve:

  1. How to obtain some kind of session API key. Maybe auth via oauth central access?
  2. How to forward this API key to datasource
  3. Prepare datasource so that it will limit all requests to this tenant
  4. Do you want to allow to edit dashboards?
  5. If yes, then how to update them?

Grafana cloud has that.

You will define multiple datasources for the single Promethues with different LBAC

Then you will use RBAC to define teams/roles for those datasources:

Keep in mind: LBAC/RBAC are enterprise (paid) features.