auth

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInferRoleClaims is returns when the authenticator fails to infer a role name
	ErrInferRoleClaims = errors.New("could not parse service-account name / role name from claims")
)

Functions

func EnsureAuthenticated

func EnsureAuthenticated(client *api.Client, config cfg.Config) bool

EnsureAuthenticated verifies we have a valid token, or attempts to fetch a new one. Returns false if it is unable to become authenticated.

func InferK8SConfig

func InferK8SConfig(config *cfg.Config)

InferK8SConfig attempts to replace default configuration parameters on K8S with ones inferred from the k8s environment

func RenewService

func RenewService(client *api.Client, config cfg.Config)

RenewService is responsible for renewing a vault token as it ttl approaches a threshold

Types

type AWSService

type AWSService struct{}

AWSService is an external service that vault can authenticate requests against

func (*AWSService) Auth

func (a *AWSService) Auth(client *api.Client, config cfg.Config) (string, error)

Auth is used to authenticate to an external service

type Authenticator

type Authenticator interface {
	// Auth is used to authenticate to an external service
	Auth(*api.Client, cfg.Config) (string, error)
}

Authenticator is an interface to represent an external source that should be authenticated against.

type AzureService added in v1.2.0

type AzureService struct{}

AzureService is an external service that vault can authenticate request against

func (*AzureService) Auth added in v1.2.0

func (a *AzureService) Auth(client *api.Client, config cfg.Config) (string, error)

Auth is used to authenticate to the service

type GCPService

type GCPService struct{}

GCPService is an external service that vault can authenticate requests against

func (*GCPService) Auth

func (g *GCPService) Auth(client *api.Client, config cfg.Config) (string, error)

Auth is used to authenticate to the service

type K8SService

type K8SService struct{}

K8SService is an external service that vault can authenticate requests against

func (*K8SService) Auth

func (k *K8SService) Auth(client *api.Client, config cfg.Config) (string, error)

Auth is used to authenticate to an external service

Jump to

Keyboard shortcuts

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