Thanks @Donald Mok for his answer; I just want to make it as clear as possible. In the Grafana interface you can create an organization. After that you can create some dashboards for this organization. So, there is a problem that you need to specify the organization for anonymous users. And it should be a real organization (for your Grafana). And anonymous users will be able to see only dashboards from this organization.
#################################### Anonymous Auth ##########################
[auth.anonymous]
# enable anonymous access
enabled = true
# specify organization name that should be used for unauthenticated users
org_name = ORGANIZATION
First of all, in grafana.ini adjust the following values:
[auth.anonymous]
# enable anonymous access
enabled = true
# specify organization name that should be used for unauthenticated users
org_name = YOUR_ORG_NAME_HERE
# specify role for unauthenticated users
org_role = SOME_USER_NAME_HERE # e.g. Anonymous
Now, after restarting Grafana, log in and make sure there is another user than admin created. If not, create one. The values in the user creation dialogue are actually unimportant to achieve the task.
Finally, set the same organisation name under global orgs to match your grafana.ini value. Also, make sure the user you created has the role you set in grafana.ini (in my example the role would be "Anonymous").
Here is what i did for my Caddy proxy which uses client-cert auth already. Beware, this still exposes your datasource to the public! Be sure to replace your@email.com with your email and the Caddy proxy ip in grafana.ini.
[auth.anonymous]
# enable anonymous access
enabled = true
# specify organization name that should be used for unauthenticated users
org_name = ORGANIZATION
# specify role for unauthenticated users
org_role = Viewer
[auth]
# Set to true to disable (hide) the login form, useful if you use OAuth
disable_login_form = true
Then you need to make an organization on the Server Admin page on the Grafana website with the exact same name as you specified here:org_name = ORGANIZATION
If you then make a dasbhoard with some panels you can share the dashboard or a specific panel with <iframe>, you can find more info here