[Feature/Bug] Allow grafana request datasource with grafana server ip
naughtyGitCat opened this issue · 3 comments
Currently, my datasource service logs the JSON plugin request with X-FORWARD-FOR=[BROWSER_IP, PROXY_IPs....].
my datasource service has an IP whitelist for Grafana server IP, not the various BROWSER_IP.
now I use the plugin custom header feature(X-FORWARD-FOR=GRAFANA_SERVER_IP) to bypass this circumstance to auth with datasource service.
can we have a button or option to set the plugin request datasource service with GRAFANA_SERVER_IP instead of BROWSER_IP?
Do you use Access Server?
BTW we use Grafana's component for http settings so your change would otherwise have to be done there https://github.com/simPod/GrafanaJsonDatasource/blob/de262991b3abb3086eea48e08b69a18edfa74dbe/src/Component/ConfigEditor.tsx
yes, via the server access, some kind of weird behavior, the grafana server giving the browser IP to JSON datasource service instead of the grafana server IP
since it can not be properly set in the plugin, I will close this issue
BTW: access flow is
BROWSER -> NGINX1 -> GRAFANA-> PROXY -> NGINX2 -> DATASOURCE_SERVICE.
In end, the DATASOURCE_SERVICE got the X-FORWARD-FOR is [BROWSER_IP, NGINX2_IP, NGINX2_IP], got the direct remote IP is NGINX2_IP.
The DATASOURCE_SERVICE has an IP whitelist that contains GRAFANA_IP.
related to grafana/grafana#16633