Documentation ¶
Index ¶
Constants ¶
const ( // KvVersionAuto detects vault kv version automatically KvVersionAuto int = iota // KvVersion1 sets the vault kv version to 1 KvVersion1 // KvVersion2 sets the vault kv version to 2 KvVersion2 )
const KVWarning = "Invalid path for a versioned K/V secrets engine."
KVWarning is the warning returned by the vault API when the K/V path is invalid (wrong version)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppRoleProvider ¶
type AppRoleProvider struct {
AppRoleName, RoleID, SecretID string
}
AppRoleProvider is a provider to connect to vault using AppRole
func NewAppRoleProvider ¶
func NewAppRoleProvider(appRoleName, roleID, secretID string) *AppRoleProvider
NewAppRoleProvider creates a pointer to a AppRoleProvider struct
type AuthProvider ¶
AuthProvider is an interface to abstract vault methods' connection
type CachedClient ¶
type CachedClient struct { SimpleClient // contains filtered or unexported fields }
CachedClient represents a vault client which caches results from vault for later use
func NewCachedClient ¶
func NewCachedClient(client *vapi.Client) *CachedClient
NewCachedClient creates a pointer to a CachedClient struct
type Client ¶
type Client interface {
Read(engine int, kvPath string, secretPath string) (map[string]interface{}, error)
}
Client is an interface to read data from vault
type KubernetesProvider ¶
type KubernetesProvider struct { // Role to use for the authentication Role string // Cluster is the path to use to call the login URL Cluster string // contains filtered or unexported fields }
KubernetesProvider is a provider to authenticate using the Vault Kubernetes Auth Method plugin https://www.vaultproject.io/docs/auth/kubernetes
func NewKubernetesProvider ¶
func NewKubernetesProvider(role, cluster, jwt string) *KubernetesProvider
NewKubernetesProvider creates a new KubernetesProvider object
func (KubernetesProvider) Login ¶
func (k KubernetesProvider) Login(c *Config) (*vapi.Client, error)
Login - godoc
func (*KubernetesProvider) SetJWT ¶
func (k *KubernetesProvider) SetJWT(jwt string)
SetJWT set the jwt token to use for authentication
type PathNotFound ¶
type PathNotFound struct {
Path string
}
PathNotFound represents an error when a path is not found in vault
type SimpleClient ¶
type SimpleClient struct {
// contains filtered or unexported fields
}
SimpleClient is a simplistic client to connect to vault
func NewSimpleClient ¶
func NewSimpleClient(client *vapi.Client) *SimpleClient
NewSimpleClient creates a pointer to a SimpleClient struct
type TokenProvider ¶
type TokenProvider struct {
Token string
}
TokenProvider connects to vaut using a bare token
func NewTokenProvider ¶
func NewTokenProvider(token string) *TokenProvider
NewTokenProvider creates a pointer to a TokenProvider
type WrongVersionError ¶
type WrongVersionError struct {
Message string
}
WrongVersionError represents an error raised when the KV version is not correct