Hello Grafana User,
I am using the docker compose file and hosting the Grafana in server. But when I am trying to embed the panels, it was asking for login.
So, to overcome that, i have used “- GF_AUTH_ANONYMOUS_ENABLED=true” as an environmental variable and allowed the embedding.
Everything is working fine but the issue is now that URL is accessible to everyone in the world without any login form… if I am removing the “- GF_AUTH_ANONYMOUS_ENABLED=true” the login form is coming, and I am able to login so that no one else (without id and password) can login inside Grafana but then the embedding is creating a problem as it is showing the login form and not able to embed panels.
I need something so that :
there must be a login form once we hit the url but after embedding the panels it should not ask for login inside them.
Please let me know if any more clarity is needed.
Thanks & Regards
Pawan Yadav
you can use the GF_AUTH_ANONYMOUS_ORG_ROLE
setting in your Grafana configuration. This setting allows you to specify a role (e.g. Viewer) that anonymous users will be granted when they access Grafana.
For example, you can set GF_AUTH_ANONYMOUS_ORG_ROLE
to Viewer
in your .env
file like this:
GF_AUTH_ANONYMOUS_ORG_ROLE=Viewer
not sure if you are asking this
Hi usamaaltaf420,
I think there is a problem with my explanation…so what is happening currently is i have deployed Grafana inside the server and i wanted to embed each and every panel into a website. the issue is after embedding it into website, the login screen is coming so to overcome that i have done the setting as
- GF_AUTH_ANONYMOUS_ENABLED=true
and everything working fine.
But,
the issue is now that server_name:3000 is open to the world so anyone can see data without login…which is a problem as the dashboard contains all the information about my product…so i needed something like if someone hits the url “server_name:3000” login screen should come but if someone is trying to access the website where the panels are embeded the login screen should not come.’
I hope you got some idea…please let me know if any more clarity is required.
Also, the website is not open to anyone…there is id and password which is needed to be given by users so that website is not open to all…so if we embed it, only people having the permission to login into a website will be able to see the embedded dashboard.
I have got to know that there is something to be done with JWT token and passing the credentials but i m not sure how that will be done.
Thanks
Hi,
did you find an answer to this?
Regards