Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attributes ¶
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]string
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"`
}
Config is the definition for a config file
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 *UserCredentials `yaml:"userpass" json:"userpass" hcl:"userpass"`
// 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 UserCredentials ¶
type UserCredentials 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
func (UserCredentials) IsValid ¶
func (r UserCredentials) IsValid() error
IsValid validates the user credential is ok
Click to show internal directories.
Click to hide internal directories.