Plugins: Disable passing host environment variables to plugin processes by default #113412
+188
−212
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
NOTE: This PR is aimed for 12.4 and will/should not be merged until then
Release notice breaking change
Starting in Grafana v12.4, plugin processes no longer receive all host environment variables by default. This change improves security by limiting plugin access to environment variables from the Grafana host process.
Previously, all environment variables from the Grafana process were automatically forwarded to plugin processes. Now, plugins only receive:
GF_VERSION,GF_EDITION,GF_APP_URL)HTTP_PROXY,http_proxy,HTTPS_PROXY,https_proxy,NO_PROXY,no_proxy)Migration
If your plugins require access to additional host environment variables, you can configure Grafana to forward all host environment variables to specific plugins using the
forward_host_env_varsconfiguration option.Add the following to your
grafana.inifile under the[plugins]section:Only add plugins to
forward_host_env_varsif they require access to host environment variables. Forwarding all environment variables reduces the security isolation between Grafana and plugin processes.