config

package
v0.6.16 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfigurationFileContents

func GetConfigurationFileContents() (string, error)

func GetDebugLogLevel added in v0.6.0

func GetDebugLogLevel() bool

func GetDefaultConfdir added in v0.6.3

func GetDefaultConfdir() string

func GetDefaultCountry

func GetDefaultCountry() string

func GetDefaultLocality

func GetDefaultLocality() string

func GetDefaultOrganization

func GetDefaultOrganization() string

func GetDefaultOrganizationalUnit

func GetDefaultOrganizationalUnit() string

func GetDefaultProvince

func GetDefaultProvince() string

func GetDefaultTLSHost

func GetDefaultTLSHost() string

func GetGRPCDisabledMTLS added in v0.6.14

func GetGRPCDisabledMTLS() bool

func GetGraphQLPort added in v0.6.0

func GetGraphQLPort() int

func GetHSMConfiguration added in v0.6.8

func GetHSMConfiguration() (path, tokenLabel, pin string, enabled bool)

func GetPolicyFile added in v0.6.0

func GetPolicyFile() string

func GetServerModeString added in v0.6.3

func GetServerModeString() (string, error)

func GetServerTLSHost added in v0.6.0

func GetServerTLSHost() string

func GetServerTLSPort added in v0.6.0

func GetServerTLSPort() int

func GetSoftHSMConfigFile added in v0.6.8

func GetSoftHSMConfigFile() string

func GetTLSCertDir added in v0.6.0

func GetTLSCertDir() string

func GetTPPCredentials added in v0.6.0

func GetTPPCredentials() (tppToken, tppURL, tppZone string)

func GetUseSDS added in v0.6.0

func GetUseSDS() bool

func GetUserProvidedCACert added in v0.6.0

func GetUserProvidedCACert() (string, string)

func InitCLIConfiguration

func InitCLIConfiguration(configDir string)

func IsHSMEnaabled added in v0.6.8

func IsHSMEnaabled() bool

func SetCSRConfiguration

func SetCSRConfiguration(o string, ou string, c string, p string, l string)

func SetDebugLogLevel added in v0.6.0

func SetDebugLogLevel(configDebugLogging bool)

func SetDisableMTLS added in v0.6.14

func SetDisableMTLS(v bool)

func SetGraphQLPort added in v0.6.0

func SetGraphQLPort(port int)

func SetHSMConfiguration added in v0.6.8

func SetHSMConfiguration(path, tokenLabel, pin string, enabled bool)

func SetPolicyFile added in v0.6.0

func SetPolicyFile(configPolicy string)

func SetServerMode added in v0.6.3

func SetServerMode(mode string)

func SetServerTLSHost added in v0.6.0

func SetServerTLSHost(v string)

func SetServerTLSPort added in v0.6.0

func SetServerTLSPort(v int)

func SetTPPCredentials added in v0.6.0

func SetTPPCredentials(tppToken, tppURL, tppZone string)

func SetUseSDS added in v0.6.0

func SetUseSDS(v bool)

func SetUserProvidedCACert added in v0.6.0

func SetUserProvidedCACert(configCACert, configCAKey string)

func UsingIssuingCertMode added in v0.6.3

func UsingIssuingCertMode() bool

func UsingSelfSignedMode added in v0.6.3

func UsingSelfSignedMode() bool

func UsingTPPPassthroughMode added in v0.6.3

func UsingTPPPassthroughMode() bool

func UsingUserCertMode added in v0.6.3

func UsingUserCertMode() bool

func WriteConfigFile added in v0.6.0

func WriteConfigFile() error

Types

type Config

type Config struct {
	ServerProtocols struct {
		SDSEnabled      bool   `yaml:"sds-enabled"`
		GraphQLPort     int    `yaml:"graphql-port"`
		GRPCPort        int    `yaml:"grpc-port"`
		GRPCHost        string `yaml:"grpc-host"`
		GPRCDisableMTLS bool   `yaml:"grpc-mtls-disabled"`
	} `yaml:"server-protocols"`

	ServerMode struct {
		SelfSigned     bool `yaml:"self-signed"`
		UserCert       bool `yaml:"user-provided"`
		IssuingCert    bool `yaml:"issuing-certificate"`
		TPPPassthrough bool `yaml:"tpp-passthrough"`
	} `yaml:"server-mode"`

	Policy struct {
		Filename           string `yaml:"opa-policy-file"`
		Organization       string `yaml:"default-organization"`
		OrganizationalUnit string `yaml:"default-organizationalUnit"`
		Country            string `yaml:"default-country"`
		Province           string `yaml:"default-province"`
		Locality           string `yaml:"default-locality"`
	} `yaml:"policy"`
	TPP struct {
		Token string `yaml:"token"`
		URL   string `yaml:"url"`
		Zone  string `yaml:"zone"`
	} `yaml:"tpp"`

	UserProvided struct {
		Certificate string `yaml:"certificate"`
		PrivateKey  string `yaml:"private-key"`
	} `yaml:"user-provided"`

	Logging struct {
		Debug bool `yaml:"debug"`
	} `yaml:"logging"`
	HSM struct {
		Path          string `yaml:"path"`
		TokenLabel    string `yaml:"token-label"`
		Pin           string `yaml:"pin"`
		SoftHSMConfig string `yaml:"soft-hsm-config"`
		Enabled       bool   `yaml:"enabled"`
	} `yaml:"hsm"`
}

Jump to

Keyboard shortcuts

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