secretprovider

package
v0.8.10 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MPL-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AWSCredentials = []string{
	awsAccessKey,
	awsSecretKey,
	awsSessionToken,
	awsRegion,
}

AWSCredentials contains the basic set of credentials that users will need to use AWS tools.

Functions

func AWSEnvName added in v0.8.5

func AWSEnvName(name string) (string, bool)

AWSEnvName converts and internal AWS secret name to the equivalent official environmental variable.

func New

func New(stores ...secrets.SecretStore) session.Attachable

New returns a new secrets provider which looks up secrets in each supplied secret store (ordered by argument ordering) and returns the first found secret

func NewCloudStore

func NewCloudStore(client *cloud.Client) secrets.SecretStore

NewCloudStore returns a new cloud secret store

func NewMapStore

func NewMapStore(m map[string][]byte) secrets.SecretStore

NewMapStore returns a new map-based secret store

func NewSecretProviderCmd

func NewSecretProviderCmd(cmd string) (secrets.SecretStore, error)

NewSecretProviderCmd returns a SecretStore that shells out to a user-supplied command

func SetURLValuesFunc added in v0.8.10

func SetURLValuesFunc(awsInfo *oidcutil.AWSOIDCInfo) func(values url.Values)

SetURLValuesFunc returs a function that takes url.Values and sets oidc values. This is used by SecretID() to be able to identify secrets from this provider

Types

type AWSCredentialProvider added in v0.8.5

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

AWSCredentialProvider can load AWS settings from the environment or oidc provider

func NewAWSCredentialProvider added in v0.8.5

func NewAWSCredentialProvider(client *cloud.Client) *AWSCredentialProvider

NewAWSCredentialProvider creates and returns a credential provider for AWS.

func (*AWSCredentialProvider) GetSecret added in v0.8.5

func (c *AWSCredentialProvider) GetSecret(ctx context.Context, name string) ([]byte, error)

GetSecret attempts to find an AWS secret from either the environment or a local config file.

type MutableMapStore added in v0.6.20

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

MutableMapStore is a secret store which can be mutated.

func NewMutableMapStore added in v0.6.20

func NewMutableMapStore(m map[string][]byte) *MutableMapStore

NewMutableMapStore returns a new map-based mutable secret store.

func (*MutableMapStore) DeleteSecret added in v0.6.20

func (m *MutableMapStore) DeleteSecret(ctx context.Context, id string) error

DeleteSecret deletes a secret from the map store.

func (*MutableMapStore) GetSecret added in v0.6.20

func (m *MutableMapStore) GetSecret(ctx context.Context, id string) ([]byte, error)

GetSecret gets a secret from the map store.

func (*MutableMapStore) SetSecret added in v0.6.20

func (m *MutableMapStore) SetSecret(ctx context.Context, id string, data []byte) error

SetSecret sets a secret in the map store.

Jump to

Keyboard shortcuts

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