Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attributes ¶
type Attributes map[string]interface{}
Attributes is a map of configuration
func (*Attributes) GetPath ¶
func (r *Attributes) GetPath(ns string) string
GetPath returns the uri of the config
func (*Attributes) IsOneshot ¶
func (r *Attributes) IsOneshot() bool
IsOneshot checks if the attribute is a oneshot attribute
func (*Attributes) String ¶
func (r *Attributes) String() string
func (*Attributes) Values ¶
func (r *Attributes) Values() map[string]interface{}
Values retrieves the values from the attributes
type Auth ¶
type Auth struct {
// Path is the path of the authentication backend
Path string `yaml:"path" json:"path" hcl:"path"`
// Type is the authentication type
Type string `yaml:"type" json:"type" hcl:"type"`
// Description is the a description for the backend
Description string `yaml:"description" json:"description" hcl:"description"`
// Attributes is a map of configurations for the backend
Attrs []*Attributes `yaml:"attributes" json:"attributes" hcl:"attributes"`
}
Auth defined a authentication backend
type Backend ¶
type Backend struct {
// Path is the mountpoint for the mount
Path string `yaml:"path" json:"path" hcl:"path"`
// Description is the a description for the backend
Description string `yaml:"description" json:"description" hcl:"description"`
// Type is the type of backend
Type string `yaml:"type" json:"type" hcl:"type"`
// DefaultLeaseTTL is the default lease of the backend
DefaultLeaseTTL time.Duration `yaml:"default-lease-ttl" json:"default-lease-ttl" hcl:"default-lease-ttl"`
// MaxLeaseTTL is the max ttl
MaxLeaseTTL time.Duration `yaml:"max-lease-ttl" json:"max-lease-ttl" hcl:"max-lease-ttl"`
// Attrs is the configuration of the mount point
Attrs []*Attributes `yaml:"attributes" json:"attributes" hcl:"attributes"`
}
Backend defined the type and configuration for a backend in vault
func (Backend) GetDefaultTTL ¶
GetDefaultTTL returns the default ttl
type Config ¶
type Config struct {
// Users is a series of users
Users []*User `yaml:"users" json:"users" hcl:"users"`
// Backends is a series of backend's
Backends []*Backend `yaml:"backends" json:"backends" hcl:"backends"`
// Secrets is a series of secrets
Secrets []*Secret `yaml:"secrets" json:"secrets" hcl:"secrets"`
// Auths is a series of authentication backend's
Auths []*Auth `yaml:"auths" json:"auths" hcl:"auths"`
// Policies is a series of policies
Policies []*Policy `yaml:"policies" json:"policies" hcl:"policies"`
}
Config is the definition for a config file
type Policy ¶ added in v0.0.6
type Policy struct {
// Name is the name of the policy
Name string `yaml:"name" json:"name" hcl:"name"`
// Policy is the policy itsefl
Policy string `yaml:"policy" json:"policy" hcl:"policy"`
}
Policy defines a vault policy
type Secret ¶
type Secret struct {
// Path is key for this secret
Path string `yaml:"path" json:"path" hcl:"path"`
// Values is a series of values associated to the secret
Values map[string]interface{} `yaml:"values" json:"values" hcl:"values"`
}
Secret defines a secret
type User ¶
type User struct {
// Path is the authentication path for the user
Path string `yaml:"path" json:"path" hcl:"path"`
// UserPass is the credentials for a userpass auth backend
UserPass *UserPass `yaml:"userpass" json:"userpass" hcl:"userpass"`
// UserToken is a token struct for this user
UserToken *UserToken `yaml:"usertoken" json:"usertoken" hcl:"usertoken"`
// Policies is a list of policies the user has access to
Policies []string `yaml:"policies" json:"policies" hcl:"policies"`
// Namespace is optional and used when adding to kubernetes
Namespace string `yaml:"namespace" json:"namespace" hcl:"namespace"`
}
User is the definition for a user
func (User) GetPolicies ¶
GetPolicies returns the policies associated to a user
type UserPass ¶ added in v0.0.4
type UserPass struct {
// Username is the id of the user
Username string `yaml:"username" json:"username" hcl:"username"`
// Password is the password of the user
Password string `yaml:"password" json:"password" hcl:"password"`
}
UserCredentials are the userpass credentials
type UserToken ¶ added in v0.0.4
type UserToken struct {
// ID is the actual token itselg
ID string `yaml:"id" json:"id" hcl:"id"`
// TTL is the time duration of the token
TTL time.Duration `yaml:"ttl" json:"ttp" hcl:"ttl"`
// DisplayName is a generic name for the token
DisplayName string `yaml:"display-name" json:"display-name" hcl:"display-name"`
// MaxUses is the max number of times the token can be used
MaxUses int `yaml:"max-uses" json:"max-uses" hcl:"max-uses"`
}
UserToken is the token
Click to show internal directories.
Click to hide internal directories.