Skip to content

Commit 64fd822

Browse files
Move PluginLicenseUtil to CE so it can be used via vault/sdk module (hashicorp#9371) (hashicorp#9381)
1 parent 528434a commit 64fd822

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

sdk/logical/system_view.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,3 +319,14 @@ func (d StaticSystemView) DeregisterRotationJob(_ context.Context, _ *rotation.R
319319
func (d StaticSystemView) DownloadExtractVerifyPlugin(_ context.Context, _ *pluginutil.PluginRunner) error {
320320
return errors.New("DownloadExtractVerifyPlugin is not implemented in StaticSystemView")
321321
}
322+
323+
// PluginLicenseUtil defines the functions needed to request License and PluginEnv
324+
// by the plugin licensing under github.com/hashicorp/vault-licensing
325+
// This only should be used by the plugin to get the license and plugin environment
326+
type PluginLicenseUtil interface {
327+
// License returns the raw license of the running Vault instance
328+
License() (string, error)
329+
330+
// PluginEnv returns Vault environment information used by plugins
331+
PluginEnv(context.Context) (*PluginEnvironment, error)
332+
}

0 commit comments

Comments
 (0)