configs

package
v0.0.0-...-c1db8db Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Frontend        frontendConfig `yaml:"frontend"`          // Configuration specific to the frontend component.
	DataPlaneLogger LoggerConfig   `yaml:"data_plane_logger"` // Configuration for logging within the data plane.
	Services        ServicesConfig `yaml:"services"`          // Configuration for various services the PEP serves.
}

Config is a central structure that encapsulates configuration settings for various components of the application. It aggregates multiple sub-configuration structures, each corresponding to a different component.

func NewConfig

func NewConfig(confFilePath string) (*Config, error)

NewConfig creates a new Config instance by loading configuration settings from a specified YAML file. It returns a pointer to the Config structure if successful, or an error if the file cannot be loaded or parsed.

Parameters:

  • confFilePath: The path to the YAML configuration file.

Returns:

  • *Config: A pointer to the successfully created Config structure.
  • error: An error message detailing any issues encountered during file loading or parsing, or nil if no issues occurred.

type LoggerConfig

type LoggerConfig struct {
	Output string `yaml:"output"` // The file descriptor the logger output is written to
}

Logger configuration used for specifying the settings for data plane as well as control plane logger

type ServiceConfig

type ServiceConfig struct {
	ServiceURL string `yaml:"service_url"` // ServiceURL is the endpoint URL where the service is accessible, e.g., "https://api.example.com/service".
}

ServiceConfig defines the configuration details for a single service managed by the PEP. It primarily contains the URL where the service can be accessed.

type ServicesConfig

type ServicesConfig struct {
	TLS         TLSConfig                `yaml:"tls"`          // TLS specifies the common Transport Layer Security settings applied to all services.
	ServicePool map[string]ServiceConfig `yaml:"service_pool"` // ServicePool maps service identifiers to their respective configurations.
}

ServicesConfig holds configurations applicable to all services managed by the Policy Enforcement Point (PEP). It includes a global TLS configuration to secure communications and a map of service-specific configurations.

type TLSConfig

type TLSConfig struct {
	// For server side Certificates stores certificates shown by the server to the client
	// For client side Certificates stores certificates shown by client to the server
	// map key indicates service's server name indication (TLS SNI RFC 3546)
	Certificates map[string]certificateConfig `yaml:"certificates"`
	ClientAuth   bool                         `yaml:"client_auth"`
	// list of CAs whos signatures are accepted when shown by clients
	CAs []string `yaml:"cas"`
	// certificate revocation list checked for client certificates provided by a client
	CRL string `yaml:"crl"`
}

Jump to

Keyboard shortcuts

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