vaultauth

package
v0.0.0-...-ac42508 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnableToLookupToken = errors.New("unable to lookup token information")
)

Functions

This section is empty.

Types

type KubernetesAuth

type KubernetesAuth struct {
	// contains filtered or unexported fields
}

KubernetesAuth gets the vault auth token from the kubernetes secrets file.

func NewKubernetesAuth

func NewKubernetesAuth(role, path string) *KubernetesAuth

NewKubernetesAuth creates a new k8s secret auth token location.

func (*KubernetesAuth) GetToken

func (k *KubernetesAuth) GetToken(ctx context.Context, client *vault.Client) (string, error)

GetToken implements the TokenLocation interface.

type TokenAuth

type TokenAuth struct {
	// contains filtered or unexported fields
}

TokenAuth is a pass-through authentication mechanism to set vault tokens directly for use by the Vault store. NOTE: Token renewal should be handled outside of this library.

func NewTokenAuth

func NewTokenAuth(token string) *TokenAuth

NewTokenAuth creates a new Vault token auth location.

func (*TokenAuth) GetToken

func (t *TokenAuth) GetToken(ctx context.Context, client *vault.Client) (string, error)

GetToken implements the TokenLocation interface.

Jump to

Keyboard shortcuts

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