config

package
v0.7.8 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const Mode1UseSelfSigned = 1
View Source
const Mode2UseBYOCert = 2
View Source
const Mode3UseTPP = 3
View Source
const Mode4TPPPassthrough = 4

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 GetEdgeAuthDetails added in v0.7.6

func GetEdgeAuthDetails() (string, string)

func GetEdgeHSMDetails added in v0.7.8

func GetEdgeHSMDetails() (string, string)

func GetGRPCDisabledMTLS added in v0.6.14

func GetGRPCDisabledMTLS() bool

func GetGraphQLPort added in v0.6.0

func GetGraphQLPort() int

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 GetStateDescription added in v0.7.2

func GetStateDescription() (result 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 GetVAASCredentials added in v0.7.2

func GetVAASCredentials() (token 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 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 SetTPPState added in v0.7.2

func SetTPPState(pt bool, m int)

func SetUseSDS added in v0.6.0

func SetUseSDS(v bool)

func SetUserProvidedCACert added in v0.6.0

func SetUserProvidedCACert(configCACert, configCAKey string)

func UsingEdgeAuth added in v0.7.8

func UsingEdgeAuth() bool

func UsingIssuingCertMode added in v0.6.3

func UsingIssuingCertMode() bool

func UsingPassthrough added in v0.7.2

func UsingPassthrough() 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"`
	VAAS struct {
		Token string `yaml:"token"`
	} `yaml:"vaas"`
	UserProvided struct {
		Certificate string `yaml:"certificate"`
		PrivateKey  string `yaml:"private-key"`
	} `yaml:"user-provided"`

	Logging struct {
		Debug bool `yaml:"debug"`
	} `yaml:"logging"`
	HSM struct {
		EdgeHSMHost string `yaml:"host"`
		EdgeHSMPort string `yaml:"port"`
	} `yaml:"edgehsm"`
	Authentication struct {
		EdgeAuthHost string `yaml:"host"`
		EdgeAuthPort string `yaml:"port"`
	} `yaml:"edgeauth"`
}

Jump to

Keyboard shortcuts

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