Plugins: Use grafana-com sso_api_token (#97096)

This commit is contained in:
Hugo Kiyodi Oshiro
2024-12-02 16:04:05 +01:00
committed by GitHub
parent 60f9ff0a07
commit 5e91984f31
5 changed files with 2 additions and 8 deletions
-2
View File
@@ -1757,8 +1757,6 @@ public_key_retrieval_disabled = false
public_key_retrieval_on_startup = false
# Enter a comma-separated list of plugin identifiers to avoid loading (including core plugins). These plugins will be hidden in the catalog.
disable_plugins =
# Auth token for plugin installations and removal in managed instances
install_token =
# Comma separated list of plugin ids for which angular deprecation UI should be disabled
hide_angular_deprecation =
# Comma separated list of plugin ids for which environment variables should be forwarded. Used only when feature flag pluginsSkipHostEnvVars is enabled.
+1 -1
View File
@@ -51,7 +51,7 @@ func ReverseProxyGnetReq(logger log.Logger, proxyPath, version, grafanaComAPIUrl
func (hs *HTTPServer) ProxyGnetRequest(c *contextmodel.ReqContext) {
proxyPath := web.Params(c.Req)["*"]
proxy := ReverseProxyGnetReq(c.Logger, proxyPath, hs.Cfg.BuildVersion, hs.Cfg.GrafanaComAPIURL, hs.Cfg.PluginInstallToken)
proxy := ReverseProxyGnetReq(c.Logger, proxyPath, hs.Cfg.BuildVersion, hs.Cfg.GrafanaComAPIURL, hs.Cfg.GrafanaComSSOAPIToken)
proxy.Transport = grafanaComProxyTransport
proxy.ServeHTTP(c.Resp, c.Req)
}
@@ -39,7 +39,7 @@ func ProvidePluginManagementConfig(cfg *setting.Cfg, settingProvider setting.Pro
cfg.DisablePlugins,
cfg.HideAngularDeprecation,
cfg.ForwardHostEnvVars,
cfg.PluginInstallToken,
cfg.GrafanaComSSOAPIToken,
), nil
}
-1
View File
@@ -196,7 +196,6 @@ type Cfg struct {
PluginSkipPublicKeyDownload bool
DisablePlugins []string
HideAngularDeprecation []string
PluginInstallToken string
ForwardHostEnvVars []string
PreinstallPlugins []InstallPlugin
PreinstallPluginsAsync bool
-3
View File
@@ -91,8 +91,5 @@ func (cfg *Cfg) readPluginSettings(iniFile *ini.File) error {
cfg.PluginsCDNURLTemplate = strings.TrimRight(pluginsSection.Key("cdn_base_url").MustString(""), "/")
cfg.PluginLogBackendRequests = pluginsSection.Key("log_backend_requests").MustBool(false)
// Installation token for managed plugins
cfg.PluginInstallToken = pluginsSection.Key("install_token").MustString("")
return nil
}