vault

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppRoleAuth

type AppRoleAuth struct {
	RoleID   string
	SecretID string
}

AppRoleAuth is a struct for working with Vault that uses AppRole

func NewAppRoleAuth

func NewAppRoleAuth(roleID, secretID string) *AppRoleAuth

NewAppRoleAuth initalizes a new AppRolAuth with role id and secret id

func (*AppRoleAuth) Authenticate

func (a *AppRoleAuth) Authenticate(vaultClient *api.Client) error

Authenticate authenticates with Vault using App Role and returns a token

type GithubAuth

type GithubAuth struct {
	AccessToken string
}

GithubAuth is a struct for working with Vault that uses the Github Auth method

func NewGithubAuth

func NewGithubAuth(token string) *GithubAuth

NewGithubAuth initializes a new GithubAuth with token

func (*GithubAuth) Authenticate

func (g *GithubAuth) Authenticate(vaultClient *api.Client) error

Authenticate authenticates with Vault and returns a token

type K8sAuth added in v0.5.0

type K8sAuth struct {
	// Optional, will use default path of auth/kubernetes if left blank
	MountPath string

	// Optional, will use default service account if left blank
	TokenPath string

	Role string
}

K8sAuth TODO

func NewK8sAuth added in v0.5.0

func NewK8sAuth(role, mountPath, tokenPath string) *K8sAuth

NewK8sAuth initializes and returns a K8sAuth Struct

func (*K8sAuth) Authenticate added in v0.5.0

func (k *K8sAuth) Authenticate(vaultClient *api.Client) error

Authenticate authenticates with Vault via K8s and returns a token

type TokenAuth added in v1.4.0

type TokenAuth struct{}

Just a plain vault token

func (*TokenAuth) Authenticate added in v1.4.0

func (t *TokenAuth) Authenticate(vaultClient *api.Client) error

The vault client auto-detect if the VAULT_TOKEN is set, so just leave everything to the vault client

Jump to

Keyboard shortcuts

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