provide license token directly via plugin environment (#25987)

* provide license token directly via plugin environment

(cherry picked from commit b5ca2381bc)
This commit is contained in:
Dan Cech
2020-07-02 13:07:33 +03:00
committed by Sofia Papagiannaki
parent 74ca7121eb
commit 4a68ba7b23
4 changed files with 19 additions and 3 deletions
+5 -1
View File
@@ -100,7 +100,11 @@ func (m *manager) Register(pluginID string, factory PluginFactoryFunc) error {
}
if m.License.HasLicense() {
hostEnv = append(hostEnv, fmt.Sprintf("GF_ENTERPRISE_LICENSE_PATH=%s", m.Cfg.EnterpriseLicensePath))
hostEnv = append(
hostEnv,
fmt.Sprintf("GF_ENTERPRISE_LICENSE_PATH=%s", m.Cfg.EnterpriseLicensePath),
fmt.Sprintf("GF_ENTERPRISE_LICENSE_TEXT=%s", m.License.TokenRaw()),
)
}
env := pluginSettings.ToEnv("GF_PLUGIN", hostEnv)