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/auth-secret-name" // SecretNamespaceKey is a label on the openstorage.Volume object // which corresponds to the namespeace of the secret which holds the // token information. Used for all secret providers SecretNamespaceKey = "openstorage/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 ¶
This section is empty.
Types ¶
type Auth ¶
type Auth interface { // GetToken returns the auth token obtained from the secret with // secretName with the provided secretContext from the configured secretContext GetToken(secretName string, secretContext string) (string, error) // Type returns the type of AuthTokenProvider Type() AuthTokenProviders }
Auth interface provides helper routines to fetch authorization tokens from a secrets store
type AuthTokenProviders ¶
type AuthTokenProviders int
AuthTokenProviders is an enum indicating the type of secret store that is storing the auth token
const ( TypeNone AuthTokenProviders = iota TypeK8s TypeDCOS )
Click to show internal directories.
Click to hide internal directories.