vault

package
v0.0.0-...-109c033 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VaultEnabled                 = "VAULT_ENABLED"
	VaultServer                  = "VAULT_SERVER"
	VaultAuthToken               = "VAULT_AUTH_TOKEN"
	VaultAuthKubernetesRole      = "VAULT_AUTH_KUBERNETES_ROLE"
	VaultAuthKubernetesTokenPath = "VAULT_AUTH_KUBERNETES_TOKEN_PATH"
	VaultAuthKubernetesBackend   = "VAULT_AUTH_KUBERNETES_BACKEND"
	VaultSecretsConfig           = "VAULT_SECRETS_CONFIG"
)

Variables

This section is empty.

Functions

func ConfigItems

func ConfigItems() []auconfigapi.ConfigItem

Types

type Impl

type Impl struct {
	VaultEnabled                 bool
	VaultProtocol                string
	VaultServer                  string
	VaultAuthToken               string
	VaultAuthKubernetesRole      string
	VaultAuthKubernetesTokenPath string
	VaultAuthKubernetesBackend   string
	VaultSecretsConfig           vaultSecretsDef

	VaultClient aurestclientapi.Client
}

func (*Impl) Authenticate

func (v *Impl) Authenticate(ctx context.Context) error

func (*Impl) ObtainSecrets

func (v *Impl) ObtainSecrets(ctx context.Context) error

func (*Impl) Setup

func (v *Impl) Setup(ctx context.Context) error

type K8sAuth

type K8sAuth struct {
	ClientToken string `json:"client_token"`
}

type K8sAuthRequest

type K8sAuthRequest struct {
	Jwt  string `json:"jwt"`
	Role string `json:"role"`
}

type K8sAuthResponse

type K8sAuthResponse struct {
	Auth   *K8sAuth `json:"auth"`
	Errors []string `json:"errors"`
}

type SecretsResponse

type SecretsResponse struct {
	Data   *SecretsResponseData `json:"data"`
	Errors []string             `json:"errors"`
}

type SecretsResponseData

type SecretsResponseData struct {
	Data map[string]string `json:"data"`
}

type Vault

type Vault interface {
	Setup(ctx context.Context) error
	Authenticate(ctx context.Context) error
	ObtainSecrets(ctx context.Context) error
}

func New

func New() Vault

Jump to

Keyboard shortcuts

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