config

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2026 License: Apache-2.0 Imports: 9 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 {
	Server     ServerConfig     `yaml:"server"`
	Storage    StorageConfig    `yaml:"storage"`
	Identity   IdentityConfig   `yaml:"identity"`
	Protection ProtectionConfig `yaml:"protection"`
	Telemetry  TelemetryConfig  `yaml:"telemetry"`
	Scrambler  ScramblerConfig  `yaml:"scrambler"`
	Nano       NanoConfig       `yaml:"nano"`
}

func Default

func Default() Config

func Load

func Load(path string) (Config, error)

func (Config) DemoInsecurePrivateHTTP

func (config Config) DemoInsecurePrivateHTTP() bool

DemoInsecurePrivateHTTP reports the deliberately narrow developer-lab exception to production TLS and node mTLS. The exception exists only when both explicit environment flags are true and the server is bound to one approved private IP with a matching HTTP public URL and no TLS files.

func (Config) Validate

func (config Config) Validate() error

type IdentityConfig

type IdentityConfig struct {
	StateDirectory     string        `yaml:"stateDirectory"`
	EnrollmentTokenTTL time.Duration `yaml:"enrollmentTokenTTL"`
}

type NanoConfig

type NanoConfig struct {
	AutomaticRunInterval   time.Duration `yaml:"automaticRunInterval"`
	AutomaticRunProgramIDs []string      `yaml:"automaticRunProgramIds"`
}

NanoConfig enables an explicit, proposal-only Core scheduler for particular already-admitted watchdog program IDs. It is disabled unless both fields are deliberately set by an operator.

func (NanoConfig) Validate

func (config NanoConfig) Validate() error

type ProtectedActionPolicyConfig

type ProtectedActionPolicyConfig struct {
	NodeIDs             []string `yaml:"nodeIds"`
	ApplicationIDs      []string `yaml:"applicationIds"`
	ActionTypes         []string `yaml:"actionTypes"`
	DataClasses         []string `yaml:"dataClasses"`
	Sensitivities       []string `yaml:"sensitivities"`
	AllowedDestinations []string `yaml:"allowedDestinations"`
	ConsentRequired     bool     `yaml:"consentRequired"`
}

ProtectedActionPolicyConfig is the fail-closed action scope installed at Core startup. Every dimension is explicit; "*" is the only wildcard and must be the sole value for that dimension.

type ProtectionConfig

type ProtectionConfig struct {
	TelemetryStaleAfter    time.Duration                 `yaml:"telemetryStaleAfter"`
	RequireMeshOnUntrusted bool                          `yaml:"requireMeshOnUntrustedNetworks"`
	FailMode               string                        `yaml:"failMode"`
	AllowOneTimeBypass     bool                          `yaml:"allowOneTimeBypass"`
	OneTimeBypassTTL       time.Duration                 `yaml:"oneTimeBypassTTL"`
	ProtectedActions       []ProtectedActionPolicyConfig `yaml:"protectedActions"`
}

type ScramblerConfig

type ScramblerConfig struct {
	ExecutionEnabled  bool `yaml:"executionEnabled"`
	SimulationEnabled bool `yaml:"simulationEnabled"`
}

type ServerConfig

type ServerConfig struct {
	Listen            string   `yaml:"listen"`
	PublicBaseURL     string   `yaml:"publicBaseURL"`
	TrustedProxies    []string `yaml:"trustedProxies"`
	ApprovedBindCIDRs []string `yaml:"approvedBindCIDRs"`
	TLSCertFile       string   `yaml:"tlsCertFile"`
	TLSKeyFile        string   `yaml:"tlsKeyFile"`
}

type StorageConfig

type StorageConfig struct {
	Path           string        `yaml:"path"`
	EventRetention time.Duration `yaml:"eventRetention"`
	AuditRetention time.Duration `yaml:"auditRetention"`
}

type TelemetryConfig

type TelemetryConfig struct {
	CollectFlowMetadata bool `yaml:"collectFlowMetadata"`
	CollectPayloads     bool `yaml:"collectPayloads"`
}

Jump to

Keyboard shortcuts

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