vault

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2022 License: Apache-2.0 Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoSuchEngineMount = errors.New("engine mount does not exist")
	ErrVaultDataNotFound = errors.New("Vault data not found")
)
View Source
var VaultInitializationManagerProviderSet = wire.NewSet(
	NewVaultInitializationManager,
)
View Source
var VaultSystemManagerProviderSet = wire.NewSet(
	NewVaultSystemManager,
)

Functions

func CheckNormalizeEngineMount added in v0.1.2

func CheckNormalizeEngineMount(client *api.Client, mount string) (string, error)

Types

type KVV2Client added in v0.1.1

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

func NewKVV2Client added in v0.1.1

func NewKVV2Client(delegate *vaultapi.Client, enginePath string) *KVV2Client

func (*KVV2Client) Delete added in v0.1.1

func (c *KVV2Client) Delete(ctx context.Context) error

func (*KVV2Client) In added in v0.1.1

func (c *KVV2Client) In(sub ...string) *KVV2Client

func (*KVV2Client) List added in v0.1.1

func (c *KVV2Client) List(ctx context.Context) ([]string, error)

func (*KVV2Client) Read added in v0.1.1

func (c *KVV2Client) Read(ctx context.Context) (interface{}, error)

func (*KVV2Client) ReadString added in v0.1.1

func (c *KVV2Client) ReadString(ctx context.Context) (string, error)

func (*KVV2Client) Write added in v0.1.1

func (c *KVV2Client) Write(ctx context.Context, payload map[string]interface{}) error

type VaultConfig

type VaultConfig struct {
	JWTAuthPath        string
	JWTMount           string
	JWTPublicKey       string
	KubernetesAuthPath string
	KubernetesMount    string
	Name               string
	Namespace          string
	ServiceAccount     string
	Token              string
	UnsealKey          string
	VaultAddr          *url.URL
}

type VaultInitializationManager added in v0.1.1

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

func NewVaultInitializationManager added in v0.1.1

func NewVaultInitializationManager(
	vaultSystemManager model.VaultSystemManager,
	vaultConfig *VaultConfig) *VaultInitializationManager

func (*VaultInitializationManager) InitializeVault added in v0.1.1

func (vim *VaultInitializationManager) InitializeVault(
	ctx context.Context, vaultInitializationData *model.VaultInitializationData) error

type VaultSystemManager

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

func NewVaultSystemManager

func NewVaultSystemManager(vaultClient *vaultapi.Client, kubeClient client.Client, vaultConfig *VaultConfig) *VaultSystemManager

func (*VaultSystemManager) ConfigureJWTAuth

func (vsm *VaultSystemManager) ConfigureJWTAuth(ctx context.Context) error

func (*VaultSystemManager) ConfigureJWTAuthRoles

func (vsm *VaultSystemManager) ConfigureJWTAuthRoles(roles []*model.VaultJWTRole) error

func (*VaultSystemManager) ConfigureKubernetesAuth

func (vsm *VaultSystemManager) ConfigureKubernetesAuth(ctx context.Context) error

func (*VaultSystemManager) ConfigureKubernetesAuthRoles

func (vsm *VaultSystemManager) ConfigureKubernetesAuthRoles(roles []*model.VaultKubernetesRole) error

func (*VaultSystemManager) CreateCredentials

func (vsm *VaultSystemManager) CreateCredentials(ctx context.Context, vaultKeys *model.VaultKeys) error

func (*VaultSystemManager) CreateTransitKey

func (vsm *VaultSystemManager) CreateTransitKey(mount, key string) error

func (*VaultSystemManager) EnableJWTAuth

func (vsm *VaultSystemManager) EnableJWTAuth() error

func (*VaultSystemManager) EnableKubernetesAuth

func (vsm *VaultSystemManager) EnableKubernetesAuth() error

func (*VaultSystemManager) EnableSecretEngines

func (vsm *VaultSystemManager) EnableSecretEngines(secretEngines []*model.VaultSecretEngine) error

func (*VaultSystemManager) GetAuthMethod

func (vsm *VaultSystemManager) GetAuthMethod(name string) (*vaultapi.AuthMount, error)

func (*VaultSystemManager) GetCredentials

func (vsm *VaultSystemManager) GetCredentials(ctx context.Context) (*model.VaultKeys, error)

func (*VaultSystemManager) GetKubernetesAuthConfig

func (vsm *VaultSystemManager) GetKubernetesAuthConfig(ctx context.Context) (*model.KubernetesCertificateData, error)

func (*VaultSystemManager) Initialize

func (vsm *VaultSystemManager) Initialize(ctx context.Context) (*model.VaultKeys, error)

func (*VaultSystemManager) IsJWTAuthEnabled

func (vsm *VaultSystemManager) IsJWTAuthEnabled() (bool, error)

func (*VaultSystemManager) IsKubernetesAuthEnabled

func (vsm *VaultSystemManager) IsKubernetesAuthEnabled() (bool, error)

func (*VaultSystemManager) PutPolicies

func (vsm *VaultSystemManager) PutPolicies(policies []*model.VaultPolicy) error

func (*VaultSystemManager) RegisterPlugins

func (vsm *VaultSystemManager) RegisterPlugins(plugins []*vaultapi.RegisterPluginInput) error

func (*VaultSystemManager) SetToken

func (vsm *VaultSystemManager) SetToken(vaultKeys *model.VaultKeys)

func (*VaultSystemManager) Unseal

func (vsm *VaultSystemManager) Unseal(vaultKeys *model.VaultKeys) error

Jump to

Keyboard shortcuts

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