We are trying to integrate grafana in our UX. We have credentials to login in into our UX. Grafana is shown inside an iframe. The behavior we want to achieve is if someone logins with 'admin’role, it should map to ‘admin’ role of grafana, when he clicks on the grafana tab on our UX. Similary, if the role is ‘guest’, it should map to ‘viewer-only’ role in grafana. Was thinking of using JWT Bearer token based Oauth to fix this. The flow will be:
- User logins and get the jwt token as cookie from our backend, which has the grafana-role also embedded inside it.
- User clicks on the grafana tab within our UX, the above cookie hits the grafana server.
- Grafana server interprets the cookie and maps to appropriate role in grafana. For e.g., admin gets the admin view, guest gets the viewer-only view, etc.
Is there an already available plugin for this?
Can someone point me to some documentation as to how to write a plugin??
Appreciate your help.