vaultstorage

package
v0.2023.21 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	VaultError = errors.New("error in Vault")

	UnexpectedDataError = errors.New("unexpected data")
)
View Source
var VaultUnknownAuthMethodError = errors.New("unknown Vault authentication method")

Functions

This section is empty.

Types

type VaultAuthMethod

type VaultAuthMethod string
const (
	VaultAuthMethodKubernetes VaultAuthMethod = "kubernetes"
	VaultAuthMethodApprole    VaultAuthMethod = "approle"
)

type VaultSecretStorage

type VaultSecretStorage struct {

	// Config holds the configuration of the storage. After the Initialize method is called, no changes
	// to this configuration object are reflected even if Initialize is called again.
	Config *VaultStorageConfig
	// contains filtered or unexported fields
}

func CreateTestVaultSecretStorage

func CreateTestVaultSecretStorage(t vtesting.T) (*vault.TestCluster, *VaultSecretStorage)

func CreateTestVaultSecretStorageWithAuthAndMetrics

func CreateTestVaultSecretStorageWithAuthAndMetrics(t vtesting.T, metricsRegistry *prometheus.Registry) (*vault.TestCluster, *VaultSecretStorage, string, string)

func (*VaultSecretStorage) Delete

func (*VaultSecretStorage) Get

func (*VaultSecretStorage) Initialize

func (v *VaultSecretStorage) Initialize(ctx context.Context) error

func (*VaultSecretStorage) Store

func (v *VaultSecretStorage) Store(ctx context.Context, id secretstorage.SecretID, bytes []byte) error

type VaultStorageConfig

type VaultStorageConfig struct {
	Host     string `validate:"required,https_only"`
	AuthType VaultAuthMethod
	Insecure bool

	Role                        string
	ServiceAccountTokenFilePath string

	RoleIdFilePath   string
	SecretIdFilePath string

	MetricsRegisterer prometheus.Registerer

	DataPathPrefix string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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