Documentation ¶
Index ¶
- func ConvertMapStringInterface(data interface{}) map[string]interface{}
- func EnableAndConfigure(a AuthType, c *VCClient) error
- func Path(a AuthType) string
- func SecretsEncrypted(c Config) (sf bool)
- type Auth
- type AuthType
- type Config
- type Github
- func (g Github) AConfig() map[string]interface{}
- func (g Github) Configure(c *VCClient) error
- func (g Github) Describe() string
- func (g Github) GetType() string
- func (g Github) TuneMount(c *VCClient, path string) error
- func (g Github) WriteGroups(c *VCClient) error
- func (g Github) WriteUsers(c *VCClient) error
- type Ldap
- type Mount
- type Policy
- type Secret
- type TokenRole
- type VCClient
- func (c *VCClient) AuthConfigure(a AuthType) error
- func (c *VCClient) AuthEnable(a AuthType) error
- func (c *VCClient) AuthExist(name string) bool
- func (c *VCClient) Mount(path string, config map[string]interface{}) error
- func (c *VCClient) MountExist(name string) bool
- func (c *VCClient) PolicyAdd(p Policy) error
- func (c *VCClient) PolicyExist(name string) bool
- func (c *VCClient) TuneMount(path string, config map[string]interface{}) error
- func (c *VCClient) WalkVault(path string) (output []string, err error)
- func (c *VCClient) WriteSecret(s Secret) error
- func (c *VCClient) WriteTokenRole(tr TokenRole) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertMapStringInterface ¶
func ConvertMapStringInterface(data interface{}) map[string]interface{}
func EnableAndConfigure ¶
func SecretsEncrypted ¶ added in v0.4.0
SecretsEncrypted will search a slice of secrets for encryption strings and return true if found
Types ¶
type AuthType ¶
type AuthType interface { Describe() string GetType() string //AConfig() map[string]interface{} Configure(c *VCClient) error TuneMount(c *VCClient, path string) error WriteUsers(c *VCClient) error WriteGroups(c *VCClient) error // contains filtered or unexported methods }
AuthType defines an interface for dealing with Auth backends
type Config ¶
type Config struct { Mounts []Mount `hcl:"mount"` Policies []Policy `hcl:"policy"` TokenRoles []TokenRole `hcl:"token_role"` Auth Auth `hcl:"auth"` Secrets []Secret `hcl:"secret"` }
Config contains the Vault configuration that will be applied to the server
func (*Config) DecryptSecrets ¶ added in v0.4.0
type Github ¶
type Github struct { Description string `hcl:"description"` Users []struct { Name string `hcl:",key"` Options map[string]interface{} `hcl:"options"` } `hcl:"users,ommitempty"` Groups []struct { Name string `hcl:"name"` Options map[string]interface{} `hcl:"options"` } `hcl:"teams,ommitempty"` MountConfig struct { DefaultLeaseTTL string `hcl:"default_lease_ttl"` MaxLeaseTTL string `hcl:"max_lease_ttl"` } `hcl:"mountconfig"` AuthConfig map[string]interface{} `hcl:"authconfig"` }
func (Github) WriteGroups ¶
func (Github) WriteUsers ¶
type Ldap ¶
type Ldap struct { Description string `hcl:"description"` AuthConfig map[string]interface{} `hcl:"authconfig"` Users []struct { Name string `hcl:",key"` Options map[string]interface{} `hcl:"options"` } `hcl:"User"` Groups []struct { Name string `hcl:",key"` Options map[string]interface{} `hcl:"options"` } `hcl:"group"` MountConfig struct { DefaultLeaseTTL string `hcl:"default_lease_ttl" mapstructure:"default_lease_ttl"` MaxLeaseTTL string `hcl:"max_lease_ttl" mapstructure:"max_lease_ttl"` } `hcl:"mountconfig"` }
func (Ldap) WriteGroups ¶
func (Ldap) WriteUsers ¶
type Mount ¶
type Mount struct { Name string `hcl:",key"` Path string `hcl:"path"` Config struct { PathType string `hcl:"type" mapstructure:"type"` Description string `hcl:"description" mapstructure:"description"` MountConfig struct { DefaultLeaseTTL string `hcl:"default_lease_ttl" mapstructure:"default_lease_ttl"` MaxLeaseTTL string `hcl:"max_lease_ttl" mapstructure:"max_lease_ttl"` } `hcl:"mountconfig"` } `hcl:"config"` }
type VCClient ¶
VCClient is a wrapper around the Vault api.Client
func (*VCClient) AuthConfigure ¶
AuthConfigure sets the configuration for an auth backend
func (*VCClient) AuthEnable ¶
AuthEnable enables an auth backend
func (*VCClient) MountExist ¶
MountExist checks for the existence of specified mount
func (*VCClient) PolicyExist ¶
PolicyExists checks for the existence of a policy
func (*VCClient) WalkVault ¶ added in v0.4.0
WalkVault will go through a specific path and return the path of all secrets
func (*VCClient) WriteSecret ¶ added in v0.2.1
func (*VCClient) WriteTokenRole ¶
Click to show internal directories.
Click to hide internal directories.