config

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LeafReissTime is the default value for CSConf.LeafReissTime. It is set to
	// the default path segment TTL to provide optimal coverage.
	LeafReissTime = 6 * time.Hour
	// IssuerReissTime is the default value for CSConf.IssuerReissTime. It is larger
	// than the leaf certificate validity period in order to provide optimal coverage.
	IssuerReissTime = 1*time.Hour + cert.DefaultLeafCertValidity*time.Second
	// ReissReqRate is the default interval between two consecutive reissue requests.
	ReissReqRate = 10 * time.Second
	// ReissueReqTimeout is the default timeout of a reissue request.
	ReissueReqTimeout = 5 * time.Second
)
View Source
const (
	ErrKeyConf   common.ErrMsg = "Unable to load KeyConf"
	ErrCustomers common.ErrMsg = "Unable to load Customers"
)

Error values

Variables

This section is empty.

Functions

This section is empty.

Types

type CSConfig

type CSConfig struct {
	// LeafReissueLeadTime indicates how long in advance of leaf cert expiration
	// the reissuance process starts.
	LeafReissueLeadTime util.DurWrap
	// IssuerReissueLeadTime indicates how long in advance core cert expiration
	// the self reissuance process starts.
	IssuerReissueLeadTime util.DurWrap
	// ReissueRate is the interval between two consecutive reissue requests.
	ReissueRate util.DurWrap
	// ReissueTimeout is the timeout for resissue request.
	ReissueTimeout util.DurWrap
	// AutomaticRenewal whether automatic reissuing is enabled.
	AutomaticRenewal bool
	// DisableCorePush disables the core pusher task.
	DisableCorePush bool
}

func (*CSConfig) ConfigName

func (cfg *CSConfig) ConfigName() string

func (*CSConfig) InitDefaults

func (cfg *CSConfig) InitDefaults()

func (*CSConfig) Sample

func (cfg *CSConfig) Sample(dst io.Writer, path config.Path, _ config.CtxMap)

func (*CSConfig) Validate

func (cfg *CSConfig) Validate() error

type Config

type Config struct {
	General   env.General
	Features  env.Features
	Logging   env.Logging
	Metrics   env.Metrics
	Tracing   env.Tracing
	QUIC      env.QUIC         `toml:"quic"`
	Sciond    env.SciondClient `toml:"sd_client"`
	TrustDB   truststorage.TrustDBConf
	Discovery idiscovery.Config
	CS        CSConfig
}

func (*Config) ConfigName

func (cfg *Config) ConfigName() string

func (*Config) InitDefaults

func (cfg *Config) InitDefaults()

func (*Config) Sample

func (cfg *Config) Sample(dst io.Writer, path config.Path, _ config.CtxMap)

func (*Config) Validate

func (cfg *Config) Validate() error

type State

type State struct {
	// Store is the trust store.
	Store *trust.Store
	// TrustDB is the trust DB.
	TrustDB trustdb.TrustDB
	// contains filtered or unexported fields
}

func LoadState

func LoadState(confDir string, isCore bool, trustDB trustdb.TrustDB,
	trustStore *trust.Store) (*State, error)

func (*State) GetDecryptKey

func (s *State) GetDecryptKey() common.RawBytes

GetDecryptKey returns the decryption key of the current key configuration.

func (*State) GetIssSigningKey

func (s *State) GetIssSigningKey() common.RawBytes

GetIssSigningKey returns the issuer signing key of the current key configuration.

func (*State) GetOnRootKey

func (s *State) GetOnRootKey() common.RawBytes

GetOnRootKey returns the online root key of the current key configuration.

func (*State) GetSigner

func (s *State) GetSigner() infra.Signer

GetSigner returns the signer of the current configuration.

func (*State) GetSigningKey

func (s *State) GetSigningKey() common.RawBytes

GetSigningKey returns the signing key of the current key configuration.

func (*State) GetVerifier

func (s *State) GetVerifier() infra.Verifier

GetVerifier returns the verifier of the current configuration.

func (*State) SetSigner

func (s *State) SetSigner(signer infra.Signer)

SetSigner sets the signer of the current configuration.

func (*State) SetVerifier

func (s *State) SetVerifier(verifier infra.Verifier)

SetVerifier sets the verifier of the current configuration.

Jump to

Keyboard shortcuts

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