pluginutil

package
v0.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2017 License: MPL-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// PluginUnwrapTokenEnv is the ENV name used to pass the configuration for
	// enabling mlock
	PluginMlockEnabled = "VAULT_PLUGIN_MLOCK_ENABLED"
)
View Source
var (
	// PluginUnwrapTokenEnv is the ENV name used to pass unwrap tokens to the
	// plugin.
	PluginUnwrapTokenEnv = "VAULT_UNWRAP_TOKEN"
)

Functions

func OptionallyEnableMlock

func OptionallyEnableMlock() error

OptionallyEnableMlock determines if mlock should be called, and if so enables mlock.

func VaultPluginTLSProvider

func VaultPluginTLSProvider(apiTLSConfig *api.TLSConfig) func() (*tls.Config, error)

VaultPluginTLSProvider is run inside a plugin and retrives the response wrapped TLS certificate from vault. It returns a configured TLS Config.

Types

type APIClientMeta

type APIClientMeta struct {
	// contains filtered or unexported fields
}

func (*APIClientMeta) FlagSet

func (f *APIClientMeta) FlagSet() *flag.FlagSet

func (*APIClientMeta) GetTLSConfig

func (f *APIClientMeta) GetTLSConfig() *api.TLSConfig

type LookRunnerUtil

type LookRunnerUtil interface {
	Looker
	RunnerUtil
}

LookWrapper defines the functions for both Looker and Wrapper

type Looker

type Looker interface {
	LookupPlugin(string) (*PluginRunner, error)
}

Looker defines the plugin Lookup function that looks into the plugin catalog for availible plugins and returns a PluginRunner

type PluginRunner

type PluginRunner struct {
	Name           string                      `json:"name"`
	Command        string                      `json:"command"`
	Args           []string                    `json:"args"`
	Sha256         []byte                      `json:"sha256"`
	Builtin        bool                        `json:"builtin"`
	BuiltinFactory func() (interface{}, error) `json:"-"`
}

PluginRunner defines the metadata needed to run a plugin securely with go-plugin.

func (*PluginRunner) Run

func (r *PluginRunner) Run(wrapper RunnerUtil, pluginMap map[string]plugin.Plugin, hs plugin.HandshakeConfig, env []string) (*plugin.Client, error)

Run takes a wrapper instance, and the go-plugin paramaters and executes a plugin.

type RunnerUtil

type RunnerUtil interface {
	ResponseWrapData(data map[string]interface{}, ttl time.Duration, jwt bool) (*wrapping.ResponseWrapInfo, error)
	MlockEnabled() bool
}

Wrapper interface defines the functions needed by the runner to wrap the metadata needed to run a plugin process. This includes looking up Mlock configuration and wrapping data in a respose wrapped token.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL