Documentation ¶
Index ¶
- Variables
- type KeyvaultSecretProvider
- func NewClientSecretKeyvaultSecretProvider(aadEndpoint, tenantID, clientID string, ...) (KeyvaultSecretProvider, error)
- func NewKeyvaultSecretProviderFromTokenProvider(resource string, provider tokenprovider.TokenProvider) (KeyvaultSecretProvider, error)
- func NewMsiKeyvaultSecretProvider(resource string) (KeyvaultSecretProvider, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidSecretURI indicates the secretURI does not match keyvault secret pattern ErrInvalidSecretURI = errors.New("invalid secret URI") // ErrInvalidCertificateURI indicates the certificateURI does not match keyvault certificate pattern ErrInvalidCertificateURI = errors.New("invalid certificate URI") // ErrEmptyResource indicates resourceID is empty ErrEmptyResource = errors.New("resource should not be empty") // ErrEmptyValue indicates the value to set is empty ErrEmptyValue = errors.New("value to set should not be empty") )
Functions ¶
This section is empty.
Types ¶
type KeyvaultSecretProvider ¶
type KeyvaultSecretProvider interface { Get(logger *log.Logger, secretURI string) (keyvault.SecretBundle, error) // Set set the value into the keyvault Set(logger *log.Logger, secretURI string, secretSetParameter keyvault.SecretSetParameters) (keyvault.SecretBundle, error) }
KeyvaultSecretProvider is an interface to retrieve a Keyvault secret
func NewClientSecretKeyvaultSecretProvider ¶
func NewClientSecretKeyvaultSecretProvider( aadEndpoint, tenantID, clientID string, clientSecret datastructs.RedactedString, resource string) (KeyvaultSecretProvider, error)
NewClientSecretKeyvaultSecretProvider returns an instance of keyvaultSecretProvider using client secret auth
func NewKeyvaultSecretProviderFromTokenProvider ¶
func NewKeyvaultSecretProviderFromTokenProvider(resource string, provider tokenprovider.TokenProvider) (KeyvaultSecretProvider, error)
NewKeyvaultSecretProviderFromTokenProvider returns an instance of keyvaultSecretProvider using a token provider
func NewMsiKeyvaultSecretProvider ¶
func NewMsiKeyvaultSecretProvider(resource string) (KeyvaultSecretProvider, error)
NewMsiKeyvaultSecretProvider returns an instance of keyvaultSecretProvider using MSI auth
Directories ¶
Path | Synopsis |
---|---|
Package mock_secret is a generated GoMock package.
|
Package mock_secret is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.