Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadTokenConfig ¶
func LoadTokenConfig(fileOpener fileioperformer.FileIoPerformer, path string, tokenConf *TokenConfFile) error
Types ¶
type Bootstrap ¶
type Bootstrap struct {
// contains filtered or unexported fields
}
func NewBootstrap ¶
func NewBootstrap() *Bootstrap
type FilePermissions ¶
type ServiceKey ¶
type ServiceKey struct { UseDefaults bool `json:"edgex_use_defaults"` CustomPolicy map[string]interface{} `json:"custom_policy"` // JSON serialization of HCL CustomTokenParameters map[string]interface{} `json:"custom_token_parameters"` FilePermissions *FilePermissions `json:"file_permissions,omitempty"` }
type TokenConfFile ¶
type TokenConfFile map[string]ServiceKey
func GetTokenConfigFromEnv ¶
func GetTokenConfigFromEnv() (TokenConfFile, error)
GetTokenConfigFromEnv function gets a list of token service keys from environment variable and populates the default configuration with default token parameters and policies the function returns a TokenConfFile map instance and error if any if the environment variable is not present or the value of that is empty then it will return empty map if the value for the list is not well-formed, not comma-separated then it will return an error
type TokenFileProviderInfo ¶
type TokenFileProviderInfo struct { // Path to Vault authorization token to be used by the service PrivilegedTokenPath string // Configuration file used to control token creation ConfigFile string // Base directory for token file output OutputDir string // File name for token file OutputFilename string }
type TokenProvider ¶
type TokenProvider interface { // Set configuration SetConfiguration(secretConfig secretstoreclient.SecretServiceInfo, tokenConfig config.TokenFileProviderInfo) // Generate tokens Run() error }
TokenProvider is the interface that the main program expects for implemeneting token generation
func NewTokenProvider ¶
func NewTokenProvider(logger logger.LoggingClient, fileOpener fileioperformer.FileIoPerformer, tokenProvider authtokenloader.AuthTokenLoader, vaultClient secretstoreclient.SecretStoreClient) TokenProvider
NewTokenProvider creates a new TokenProvider
Source Files ¶
Click to show internal directories.
Click to hide internal directories.