docs/sources/setup-grafana/configure-security/_index.md
If you run non-Grafana web services on your Grafana server or within its local network, then they might be vulnerable to exploitation through the Grafana data source proxy or other methods.
To prevent this type of exploitation from happening, we recommend that you apply one or more of the precautions listed below.
You can configure Grafana to only allow certain IP addresses or hostnames to be used as data source URLs and proxied through the Grafana data source proxy. Refer to data_source_proxy_whitelist for usage instructions.
The request security configuration option allows users to limit requests from the Grafana server. It targets requests that are generated by users. For more information, refer to Request security.
{{< admonition type="note" >}} Request security is available in Grafana Enterprise v7.4 and later versions. {{< /admonition >}}
Configure a firewall to restrict Grafana from making network requests to sensitive internal web services.
There are many firewall tools available. Refer to the documentation for your specific security tool. For example, Linux users can use iptables.
You can require all network requests made by Grafana to go through a proxy server.
Self-hosted reverse proxy options include but are not limited to:
If you want to enable CORS for your Grafana instance, run Grafana behind a reverse proxy and configure the CORS headers in the reverse proxy.
For more information, refer to Run Grafana behind a reverse proxy.
{{< admonition type="note" >}}
Grafana doesn't recommend using wildcard values (*) as header values and recommends using a URL instead.
{{< /admonition >}}
Users with the Viewer role can enter any possible query in any of the data sources available in the organization, not just the queries that are defined on the dashboards for which the user has Viewer permissions.
For example, in a Grafana instance with one data source, one dashboard, and one panel that has one query defined, you might assume that a Viewer can only see the result of the query defined in that panel. Actually, the Viewer has access to send any query to the data source. With a command-line tool like curl (there are many tools for this), the Viewer can make their own query to the data source and potentially access sensitive data.
To address this vulnerability, you can restrict data source query access in the following ways:
When you enable anonymous access in Grafana, any visitor or user can use Grafana as a Viewer without signing in. This section lists the security implications of enabling Anonymous access.
view calls to the API and list all folders, dashboards, and data sources.