vault

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VaultStore

type VaultStore struct {
	Addr                      string
	Namespace                 string
	Role                      string
	AuthMethod                string
	Path                      string
	Base64Decode              bool
	PKCS12                    bool
	PKCS12PassSecret          string      // Name of the secret containing the password
	PKCS12PassSecretKey       string      // Key in the secret containing the password
	PKCS12PassSecretNamespace string      // Namespace of the secret containing the password
	KubeToken                 string      // auto-filled
	Client                    *api.Client // auto-filled
	Token                     string      // auto-filled
}

func (*VaultStore) FromConfig added in v1.1.0

func (*VaultStore) Login

func (s *VaultStore) Login() (string, error)

Login creates a vault token with the k8s auth provider

func (*VaultStore) NewClient

func (s *VaultStore) NewClient() (*api.Client, error)

NewClients creates and returns a new vault client with a valid token or error

func (*VaultStore) NewToken

func (s *VaultStore) NewToken() (string, error)

NewToken generate a new token for session. If LOCAL env var is set and the token is as well, the login is skipped and the token is used instead.

func (*VaultStore) Sync added in v1.1.0

func (s *VaultStore) Sync(c *tlssecret.Certificate) (map[string]string, error)

func (*VaultStore) WriteSecret

func (s *VaultStore) WriteSecret(sec map[string]interface{}) (map[string]interface{}, error)

WriteSecret writes a secret to Vault VaultClient at path p with secret value s

Jump to

Keyboard shortcuts

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