secrets

package
v9.4.47+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SecretNameKey is a label on the openstorage.Volume object
	// which corresponds to the name of the secret which holds the
	// token information. Used for all secret providers
	SecretNameKey = "openstorage.io/auth-secret-name"

	// SecretNamespaceKey is a label on the openstorage.Volume object
	// which corresponds to the namespace of the secret which holds the
	// token information. Used for all secret providers
	SecretNamespaceKey = "openstorage.io/auth-secret-namespace"

	// SecretTokenKey corresponds to the key at which the auth token is stored
	// in the secret. Used when secrets endpoint is kubernetes secrets
	SecretTokenKey = "auth-token"
)

Variables

View Source
var (
	// ErrSecretsNotInitialized is returned when the auth secret provider is not initialized
	ErrSecretsNotInitialized = errors.New("auth token secret instance not initialized")
	// ErrAuthTokenNotFound is returned when the auth token was not found in the secret
	ErrAuthTokenNotFound = errors.New("auth token was not found in the configured secret")
)

Functions

func GetToken

func GetToken(tokenSecretContext *api.TokenSecretContext) (string, error)

GetToken returns the token for a given secret name and context based on the configured auth secrets provider.

Types

This section is empty.

Jump to

Keyboard shortcuts

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