vaults

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VaultKey crypto.KeyType = 'V'
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Vault

type Vault struct {
	Version string            `json:"version,omitempty" yaml:"version,omitempty"`
	Secrets map[string]string `json:"slvSecrets" yaml:"slvSecrets"`
	Config  vaultConfig       `json:"slvConfig" yaml:"slvConfig"`
	// contains filtered or unexported fields
}

func Get

func Get(filePath string) (vlt *Vault, err error)

Returns the vault instance from a given yaml. The vault file name must end with .slv.yml or .slv.yaml.

func New

func New(filePath, k8sName string, k8SecretContent []byte, hashLength uint8, quantumSafe bool, rootPublicKey *crypto.PublicKey, publicKeys ...*crypto.PublicKey) (vlt *Vault, err error)

Returns new vault instance and the vault contents set into the specified field. The vault file name must end with .slv.yml or .slv.yaml.

func (*Vault) DeRefSecrets

func (vlt *Vault) DeRefSecrets(path string) error

func (*Vault) DeepCopy

func (v *Vault) DeepCopy() *Vault

func (*Vault) DeepCopyInto

func (v *Vault) DeepCopyInto(out *Vault)

func (*Vault) Delete

func (vlt *Vault) Delete() error

func (*Vault) DeleteSecret

func (vlt *Vault) DeleteSecret(secretName string) error

func (*Vault) DeleteSecrets

func (vlt *Vault) DeleteSecrets(secretNames []string) error

func (*Vault) GetAllSecrets

func (vlt *Vault) GetAllSecrets() (secretsMap map[string][]byte, err error)

func (*Vault) GetSecret

func (vlt *Vault) GetSecret(secretName string) (decryptedSecret []byte, err error)

func (*Vault) Id

func (vlt *Vault) Id() string

func (*Vault) ImportSecrets

func (vlt *Vault) ImportSecrets(importData []byte, force bool) (err error)

func (*Vault) IsLocked

func (vlt *Vault) IsLocked() bool

func (*Vault) ListAccessors

func (vlt *Vault) ListAccessors() ([]crypto.PublicKey, error)

func (*Vault) ListSealedSecrets

func (vlt *Vault) ListSealedSecrets() (map[string]crypto.SealedSecret, error)

func (*Vault) Lock

func (vlt *Vault) Lock()

func (*Vault) PutSecret

func (vlt *Vault) PutSecret(secretName string, secretValue []byte) (err error)

func (*Vault) RefSecrets

func (vlt *Vault) RefSecrets(refType, file, name string, forceUpdate, dryRun bool) (result string, conflicting bool, err error)

func (*Vault) Revoke

func (vlt *Vault) Revoke(publicKeys []*crypto.PublicKey, quantumSafe bool) error

func (*Vault) SecretExists

func (vlt *Vault) SecretExists(secretName string) (exists bool)

func (*Vault) Share

func (vlt *Vault) Share(publicKey *crypto.PublicKey) (bool, error)

func (*Vault) ToK8s

func (vlt *Vault) ToK8s(k8sName string, k8SecretContent []byte) (err error)

func (*Vault) Unlock

func (vlt *Vault) Unlock(secretKey crypto.SecretKey) error

Jump to

Keyboard shortcuts

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