vault

package
v0.35.1 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Copyright (C) 2021-2023, Kubefirst This program is licensed under MIT. See the LICENSE file for more details.

This program is licensed under MIT. See the LICENSE file for more details.

This program is licensed under MIT. See the LICENSE file for more details.

This program is licensed under MIT. See the LICENSE file for more details.

This program is licensed under MIT. See the LICENSE file for more details.

This program is licensed under MIT. See the LICENSE file for more details.

Index

Constants

View Source
const (
	// Default address when leveraging port-forward
	VaultDefaultAddress = "http://127.0.0.1:8200"
	// Name for the Secret that gets created that contains root auth data
	VaultSecretName string = "vault-unseal-secret"
	// Namespace that Vault runs in
	VaultNamespace string = "vault"
	// number of recovery shares for Vault unseal
	RecoveryShares int = 5
	// number of recovery keys for Vault
	RecoveryThreshold int = 3
	// number of secret shares for Vault unseal
	SecretShares = 5
	// number of secret threshold Vault unseal
	SecretThreshold = 3
)

Variables

This section is empty.

Functions

func NewVault

func NewVault() vaultapi.Config

Types

type VaultConfiguration

type VaultConfiguration struct {
	Config vaultapi.Config
}

func (*VaultConfiguration) AutoUnseal

func (conf *VaultConfiguration) AutoUnseal() (*vaultapi.InitResponse, error)

func (*VaultConfiguration) GetUserPassword

func (conf *VaultConfiguration) GetUserPassword(endpoint string, token string, username string, key string) (string, error)

GetUserPassword retrieves the password for a Vault user at the users mount path

func (*VaultConfiguration) IterSecrets

func (conf *VaultConfiguration) IterSecrets(
	endpoint string,
	token string,
	fileName string,
) error

IterSecrets returns the contents of Vault secret data using the key/value contents of chosen paths in the key value store in the form of export statements that can be leveraged in a bash shell to set environment variables

If the argument at fileName is an existing file, it will be removed

Jump to

Keyboard shortcuts

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