config

package
v1.6.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2021 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoAuth

type AutoAuth struct {
	Method *Method `hcl:"-"`
	Sinks  []*Sink `hcl:"sinks"`

	// NOTE: This is unsupported outside of testing and may disappear at any
	// time.
	EnableReauthOnNewCredentials bool `hcl:"enable_reauth_on_new_credentials"`
}

AutoAuth is the configured authentication method and sinks

type Cache added in v1.1.0

type Cache struct {
	UseAutoAuthTokenRaw interface{} `hcl:"use_auto_auth_token"`
	UseAutoAuthToken    bool        `hcl:"-"`
	ForceAutoAuthToken  bool        `hcl:"-"`
}

Cache contains any configuration needed for Cache mode

type Config

type Config struct {
	*configutil.SharedConfig `hcl:"-"`

	AutoAuth      *AutoAuth                  `hcl:"auto_auth"`
	ExitAfterAuth bool                       `hcl:"exit_after_auth"`
	Cache         *Cache                     `hcl:"cache"`
	Vault         *Vault                     `hcl:"vault"`
	Templates     []*ctconfig.TemplateConfig `hcl:"templates"`
	TemplateRetry *TemplateRetry             `hcl:"template_retry"`
}

Config is the configuration for the vault server.

func LoadConfig

func LoadConfig(path string) (*Config, error)

LoadConfig loads the configuration at the given path, regardless if its a file or directory.

func NewConfig added in v1.6.4

func NewConfig() *Config

type Method

type Method struct {
	Type       string
	MountPath  string        `hcl:"mount_path"`
	WrapTTLRaw interface{}   `hcl:"wrap_ttl"`
	WrapTTL    time.Duration `hcl:"-"`
	Namespace  string        `hcl:"namespace"`
	Config     map[string]interface{}
}

Method represents the configuration for the authentication backend

type Sink

type Sink struct {
	Type       string
	WrapTTLRaw interface{}   `hcl:"wrap_ttl"`
	WrapTTL    time.Duration `hcl:"-"`
	DHType     string        `hcl:"dh_type"`
	DeriveKey  bool          `hcl:"derive_key"`
	DHPath     string        `hcl:"dh_path"`
	AAD        string        `hcl:"aad"`
	AADEnvVar  string        `hcl:"aad_env_var"`
	Config     map[string]interface{}
}

Sink defines a location to write the authenticated token

type TemplateRetry added in v1.6.4

type TemplateRetry struct {
	Enabled       bool          `hcl:"enabled"`
	Attempts      int           `hcl:"attempts"`
	BackoffRaw    interface{}   `hcl:"backoff"`
	Backoff       time.Duration `hcl:"-"`
	MaxBackoffRaw interface{}   `hcl:"max_backoff"`
	MaxBackoff    time.Duration `hcl:"-"`
}

type Vault added in v1.1.0

type Vault struct {
	Address          string      `hcl:"address"`
	CACert           string      `hcl:"ca_cert"`
	CAPath           string      `hcl:"ca_path"`
	TLSSkipVerify    bool        `hcl:"-"`
	TLSSkipVerifyRaw interface{} `hcl:"tls_skip_verify"`
	ClientCert       string      `hcl:"client_cert"`
	ClientKey        string      `hcl:"client_key"`
	TLSServerName    string      `hcl:"tls_server_name"`
}

Vault contains configuration for connecting to Vault servers

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL