vault

package
v0.0.0-...-0adad2b Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateWrappedAppRoleToken

func CreateWrappedAppRoleToken(vaultClient *api.Client, appRole string) (string, error)

CreateWrappedAppRoleToken creates a wrapped logged in token for the provided appRole.

func NewVaultLowlevelClient

func NewVaultLowlevelClient(token, vaultAddr string, logBase *logrus.Entry) (*api.Client, error)

func TemplateFuncs

func TemplateFuncs(client *vault.Client) template.FuncMap

Types

type GetOrUpdateVaultSecretAction

type GetOrUpdateVaultSecretAction struct {
	Path         string
	Key          string
	DefaultValue string
	Replace      bool
	Client       *vault.Client
}

func (GetOrUpdateVaultSecretAction) Execute

func (g GetOrUpdateVaultSecretAction) Execute() (string, error)

type VaultInitializer

type VaultInitializer struct {
	Client         *api.Client
	VaultNamespace string
}

func (VaultInitializer) Init

func (v VaultInitializer) Init(forceGenerateTokenRoot bool) error

func (VaultInitializer) InstallJose

func (v VaultInitializer) InstallJose() error

func (VaultInitializer) Unseal

func (v VaultInitializer) Unseal() error

type VaultLayout

type VaultLayout struct {
	Auth      map[string]map[string]interface{}
	Mounts    map[string]map[string]interface{}
	Resources map[string]map[string]interface{}
	Policies  map[string]interface{}
}

func LoadVaultLayoutFromBytes

func LoadVaultLayoutFromBytes(label string, data []byte, templateArgs templating.TemplateValues, client *api.Client) (*VaultLayout, error)

func LoadVaultLayoutFromFiles

func LoadVaultLayoutFromFiles(globs []string, templateArgs templating.TemplateValues, client *api.Client) (*VaultLayout, error)

func (VaultLayout) Apply

func (v VaultLayout) Apply(hashKey string, force bool, client *api.Client, logBase *logrus.Entry) error

Apply applies the vault layout to vault, first checking if it has changed since the last time it was applied based on the hashKey. If hashKey is empty, or force is true, the change detection step is skipped.

func (VaultLayout) MarshalJSON

func (v VaultLayout) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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