Documentation ¶
Overview ¶
Package hashicorp allows to fetch secrets from Hashicorp vault service
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewVaultConfigFromBackendConfig ¶
func NewVaultConfigFromBackendConfig(sessionConfig VaultSessionBackendConfig) (api.AuthMethod, error)
NewVaultConfigFromBackendConfig returns a AuthMethod for Hashicorp vault based on the configuration
Types ¶
type VaultBackend ¶
type VaultBackend struct { BackendID string Config VaultBackendConfig Secret map[string]string }
VaultBackend is a backend to fetch secrets from Hashicorp vault
func NewVaultBackend ¶
func NewVaultBackend(backendID string, bc map[string]interface{}) (*VaultBackend, error)
NewVaultBackend returns a new backend for Hashicorp vault
func (*VaultBackend) GetSecretOutput ¶
func (b *VaultBackend) GetSecretOutput(secretKey string) secret.Output
GetSecretOutput returns a the value for a specific secret
type VaultBackendConfig ¶
type VaultBackendConfig struct { VaultSession VaultSessionBackendConfig `mapstructure:"vault_session"` BackendType string `mapstructure:"backend_type"` VaultAddress string `mapstructure:"vault_address"` SecretPath string `mapstructure:"secret_path"` Secrets []string `mapstructure:"secrets"` VaultTLS *VaultTLSConfig `mapstructure:"vault_tls_config"` }
VaultBackendConfig contains the configuration to connect to Hashicorp vault backend
type VaultSessionBackendConfig ¶
type VaultSessionBackendConfig struct { VaultRoleID string `mapstructure:"vault_role_id"` VaultSecretID string `mapstructure:"vault_secret_id"` VaultUserName string `mapstructure:"vault_username"` VaultPassword string `mapstructure:"vault_password"` VaultLDAPUserName string `mapstructure:"vault_ldap_username"` VaultLDAPPassword string `mapstructure:"vault_ldap_password"` }
VaultSessionBackendConfig is the configuration for a Hashicorp vault backend
type VaultTLSConfig ¶
type VaultTLSConfig struct { CACert string `mapstructure:"ca_cert"` CAPath string `mapstructure:"ca_path"` ClientCert string `mapstructure:"client_cert"` ClientKey string `mapstructure:"client_key"` TLSServer string `mapstructure:"tls_server"` Insecure bool `mapstructure:"insecure"` }
VaultTLSConfig contains the TLS and certificate configuration
Click to show internal directories.
Click to hide internal directories.