vault

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLoginAuthTTY added in v1.1.1

func GetLoginAuthTTY() (*types.VaultAuth, error)

func TryAuth added in v1.1.1

func TryAuth(host string, vaultAuth *types.VaultAuth) error

Types

type FetchedVaultSecret

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

FetchedVaultSecret is an implementation of types.FetchedSecret specifically for a secret fetched from Vault

func (*FetchedVaultSecret) Format

func (fetched *FetchedVaultSecret) Format() int

Format returns the configured format for this secret

func (*FetchedVaultSecret) IsMissingData

func (fetched *FetchedVaultSecret) IsMissingData() bool

IsMissingData returns true if the remote secret existed but was incomplete

func (*FetchedVaultSecret) UploadNew

func (fetched *FetchedVaultSecret) UploadNew(value interface{}) (interface{}, error)

UploadNew modifies the remote secret and replaces the value or sub-value with a new given value, and returns the new secret version

func (*FetchedVaultSecret) Value

func (fetched *FetchedVaultSecret) Value() interface{}

Value returns the fetched secret value or sub-value

func (*FetchedVaultSecret) Version

func (fetched *FetchedVaultSecret) Version() interface{}

Version returns the fetched secret's version

type FromDataMapping added in v1.1.1

type FromDataMapping struct {
	Format string         `yaml:"format"`
	Path   *[]interface{} `yaml:"path,omitempty"`
}

FromDataMapping contains the settings for mapping a subset of the data of a Vault key/value secret document to file contents

type FromTextMapping added in v1.1.1

type FromTextMapping struct {
	Path []interface{} `yaml:"path"`
}

FromTextMapping contains the settings for mapping a string value in the data of a Vault key/value secret document to file contents

type Mapping

type Mapping struct {
	FromData *FromDataMapping `yaml:"fromData,omitempty"`
	FromText *FromTextMapping `yaml:"fromText,omitempty"`
}

Mapping represents a data or text mapping of a Vault key/value secret document to file contents

type SecretConfig

type SecretConfig struct {
	URL     string  `yaml:"url"`
	Mapping Mapping `yaml:"mapping"`
}

SecretConfig contains the Vault-specific configuration parameters for a secret in secrets.yaml

func (*SecretConfig) Fetch

func (secretConfig *SecretConfig) Fetch() (types.FetchedSecret, error)

Fetch downloads this secret and returns an instance of FetchedVaultSecret

func (*SecretConfig) Prepare

func (secretConfig *SecretConfig) Prepare() error

Prepare ensures that the Vault engine has all the required authentication parameters to fetch this secret

Jump to

Keyboard shortcuts

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