菜单
Grafana Cloud Enterprise

配置请求安全性

请求安全性允许您通过针对用户生成的请求(例如数据源指标查询和告警通知)来限制来自 Grafana 服务器的请求。

这可用于限制对 Grafana 服务器可以访问但 Grafana 用户不应访问的内部系统的访问。此功能不影响来自 Grafana 用户浏览器的流量。

注意

尽管请求安全性与后端插件一起工作,但您可以创建一个绕过此安全性的后端插件。

IP 和主机名阻止

您可以根据主机名、IP 地址或两者来限制请求。

拒绝列表

Grafana 阻止对拒绝列表中的主机名或 IP 地址的任何请求。

允许列表

如果列表上至少有一个条目,则拒绝任何不在列表上的主机名或 IP 地址的请求。

例如

toml
[security.egress]
# A list of hostnames or IP addresses separated by spaces for which requests are blocked.
host_deny_list = supersecret.internal 192.168.1.10
# a list of hostnames or IP addresses separated by spaces for which requests will be allowed, all other requests will be blocked
host_allow_list = prometheus.internal

丢弃标头和 Cookie

您可以设置一个列表,包含要从传出请求中丢弃的 Cookie 或标头。

示例

toml
[security.egress]
# a list of headers that will be stripped from outgoing datasource and alerting requests
header_drop_list = user
# a list of cookies that will be stripped from outgoing datasource requests (case sensitive)
cookie_drop_list = session_id