Documentation ¶
Index ¶
Constants ¶
View Source
const ( // LDAPAuthMethod is used for creating a client capable of LDAP authentication. LDAPAuthMethod = "ldap" // TokenAuthMethod is used for creating a client capable of token authentication. TokenAuthMethod = "token" )
Variables ¶
View Source
var ( // ErrInvalidAuthMethod defines the error type when the // AuthMethod provided to the client is unsupported. ErrInvalidAuthMethod = errors.New("invalid auth method provided") // LDAPUserPath defines the path the user information gets // written to after success LDAP authentication. LDAPUserPath = "/auth/ldap/login/%s" )
View Source
var Flags = []cli.Flag{ &cli.StringFlag{ Name: "log.level", Usage: "set log level - options: (trace|debug|info|warn|error|fatal|panic)", Value: "info", EnvVars: []string{"PARAMETER_LOG_LEVEL", "VAULT_LOG_LEVEL", "VELA_LOG_LEVEL", "LOG_LEVEL"}, }, &cli.StringFlag{ Name: "config.addr", Usage: "address to the instance", EnvVars: []string{"PARAMETER_ADDR", "SECRET_VAULT_ADDR", "VELA_VAULT_ADDR", "VAULT_ADDR"}, }, &cli.StringFlag{ Name: "config.auth-method", Usage: "authentication method for interfacing instance - options: (token|ldap)", EnvVars: []string{"PARAMETER_AUTH_METHOD", "SECRET_AUTH_METHOD", "VAULT_AUTH_METHOD"}, }, &cli.StringFlag{ Name: "config.password", Usage: "password for server authentication with LDAP", EnvVars: []string{"PARAMETER_PASSWORD", "SECRET_VAULT_PASSWORD", "VELA_VAULT_PASSWORD", "VAULT_PASSWORD"}, }, &cli.StringFlag{ Name: "config.token", Usage: "token for server authentication", EnvVars: []string{"PARAMETER_TOKEN", "SECRET_VAULT_TOKEN", "VELA_VAULT_TOKEN", "VAULT_TOKEN"}, }, &cli.StringFlag{ Name: "config.username", Usage: "username for server authentication with LDAP", EnvVars: []string{"PARAMETER_USERNAME", "SECRET_VAULT_USERNAME", "VELA_VAULT_USERNAME", "VAULT_USERNAME"}, }, }
Flags represents all supported command line interface (CLI) flags for the runtime.
Functions ¶
This section is empty.
Types ¶
type Client ¶
client represents an internal struct for managing calls to a Vault instance
Vault client docs: https://pkg.go.dev/github.com/hashicorp/vault/api?tab=doc
func NewMock ¶
NewMock returns a test unsealed Vault to integrate with a Vault secret provider.
This function is intended for running tests only.
Docs: https://pkg.go.dev/github.com/hashicorp/vault/vault?tab=doc
type Setup ¶
type Setup struct { // specifies the address of the vault instances Addr string // specifies the authentication method to use AuthMethod string // specifies the password for authentication with LDAP auth method Password string // specifies the token for the vault instances Token string // specifies the username for authentication with LDAP auth method Username string }
Setup represents the configuration necessary for creating a Vault client capable of integrating with a Vault instance.
Click to show internal directories.
Click to hide internal directories.