Move PluginLicenseUtil to CE so it can be used via vault/sdk module (#9371) (#9381)

This commit is contained in:
Vault Automation 2025-09-16 16:22:17 -04:00 committed by GitHub
parent 528434ab83
commit 64fd8225bc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -319,3 +319,14 @@ func (d StaticSystemView) DeregisterRotationJob(_ context.Context, _ *rotation.R
func (d StaticSystemView) DownloadExtractVerifyPlugin(_ context.Context, _ *pluginutil.PluginRunner) error {
return errors.New("DownloadExtractVerifyPlugin is not implemented in StaticSystemView")
}
// PluginLicenseUtil defines the functions needed to request License and PluginEnv
// by the plugin licensing under github.com/hashicorp/vault-licensing
// This only should be used by the plugin to get the license and plugin environment
type PluginLicenseUtil interface {
// License returns the raw license of the running Vault instance
License() (string, error)
// PluginEnv returns Vault environment information used by plugins
PluginEnv(context.Context) (*PluginEnvironment, error)
}