vault

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrLeaseNotFound = errors.New("lease not found or is not renewable")
View Source
var ErrPermissionDenied = errors.New("permission denied")

Functions

This section is empty.

Types

type AuthClient added in v0.13.0

type AuthClient struct {
	Client *api.Client
	// contains filtered or unexported fields
}

func (*AuthClient) Save added in v0.13.0

func (a *AuthClient) Save(path string) error

type ClientFactory

type ClientFactory interface {
	Create() (*AuthClient, error)
}

func NewFileAuthClientFactory added in v0.13.0

func NewFileAuthClientFactory(vault *VaultConfig, path string) ClientFactory

func NewKubernetesAuthClientFactory

func NewKubernetesAuthClientFactory(vault *VaultConfig, kube *KubernetesAuthConfig) ClientFactory

type Credentials

type Credentials struct {
	Username string
	Password string
	Secret   *api.Secret
}

func (*Credentials) Save added in v0.13.0

func (c *Credentials) Save(path string) error

type CredentialsProvider

type CredentialsProvider interface {
	Fetch() (*Credentials, error)
}

func NewFileCredentialsProvider added in v0.13.0

func NewFileCredentialsProvider(path string) CredentialsProvider

func NewVaultCredentialsProvider added in v0.13.0

func NewVaultCredentialsProvider(client *api.Client, secretPath string) CredentialsProvider

type CredentialsRenewer

type CredentialsRenewer interface {
	Renew(ctx context.Context) error
	RevokeSelf(ctx context.Context)
	Run(ctx context.Context, c chan int)
}

func NewLeaseManager

func NewLeaseManager(client *api.Client, secret *api.Secret, lease time.Duration, renew time.Duration) CredentialsRenewer

type DefaultLeaseManager

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

func (*DefaultLeaseManager) Renew added in v0.13.0

func (m *DefaultLeaseManager) Renew(ctx context.Context) error

func (*DefaultLeaseManager) RevokeSelf

func (m *DefaultLeaseManager) RevokeSelf(ctx context.Context)

RevokeSelf this will attempt to revoke its own token

func (DefaultLeaseManager) Run added in v0.13.0

func (m DefaultLeaseManager) Run(ctx context.Context, c chan int)

type FileCredentialsProvider added in v0.13.0

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

func (*FileCredentialsProvider) Fetch added in v0.13.0

func (c *FileCredentialsProvider) Fetch() (*Credentials, error)

type FileVaultClientFactory added in v0.13.0

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

func (*FileVaultClientFactory) Create added in v0.13.0

func (f *FileVaultClientFactory) Create() (*AuthClient, error)

type KubernetesAuthConfig

type KubernetesAuthConfig struct {
	TokenFile string
	LoginPath string
	Role      string
}

type KubernetesVaultClientFactory added in v0.13.0

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

KubernetesVaultClientFactory creates a Vault client authenticated against a kubernetes service account token

func (*KubernetesVaultClientFactory) Create added in v0.13.0

Create returns a Vault client that has been authenticated with the service account token. It can be used to make other Vault requests

type TLSConfig

type TLSConfig struct {
	CACert string
	CAPath string
}

type VaultConfig

type VaultConfig struct {
	VaultAddr string
	TLS       *TLSConfig
}

type VaultCredentialsProvider added in v0.13.0

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

func (*VaultCredentialsProvider) Fetch added in v0.13.0

Jump to

Keyboard shortcuts

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