I’m trying to achieve integrating Grafana to a SSO system which makes It possible to login more than one apps from a panel/web page. To achieve that, I need to send a POST request with a JSON body which includes necessary details like username, password etc. and It returns JWT to user in a JSON body. User will be able to login using JWT.
To summarize: User will login to a web page which includes buttons representing diffrent apps, user will click to a button which represents Grafana, then It will send a post request with necessary deatails to obtain JWT, after getting JWT, It will redirect to Grafana with JWT to login as already logged user to SSO panel/web page.
Also for test purposes I want to be able to send post request with curl to get JWT and login via URL.
Here is my question:
- How should I configure Grafana to make It possbile? Honestly, I looked at the official Grafana documentation but I think it is not detailed enough for JWT authenticaton or I did not understand It very well. I didn’nt find any examples/tutorials about It also on the web unfortunately. Also, I think I couldn’t understand the JWT configuration and options well enough. I made some tries with pem file by creating keys with RSA256 and succeeded but we are going to use HS256 and I couldn’t find any examples or tutorials about it.
I would really appreciate it if someone who understands how to log in with JWT, has experience with it or has done what I want to do before can clear my confusion.
Thank you very much in advance.