config

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2025 License: Apache-2.0 Imports: 4 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 {
	Inherit   bool             `yaml:"inherit"` // Whether to inherit system environment variables (default: true)
	Providers []ProviderConfig `yaml:"providers"`
	SSO       *SSOConfig       `yaml:"sso,omitempty"` // SSO configuration
}

Config represents the main configuration structure

func Load

func Load(path string) (*Config, error)

Load reads and parses the configuration file

func (*Config) GetProvider

func (c *Config) GetProvider(id string) (*ProviderConfig, error)

GetProvider returns a provider configuration by id

type EnvVars

type EnvVars map[string]string

EnvVars represents environment variable overrides

type OIDCConfig added in v0.0.6

type OIDCConfig struct {
	ClientID     string   `yaml:"clientId"`               // OIDC client ID (required)
	ClientSecret string   `yaml:"-"`                      // OIDC client secret (only from env var SSTART_SSO_SECRET, never from YAML)
	Issuer       string   `yaml:"issuer"`                 // OIDC issuer URL (required)
	Scopes       []string `yaml:"scopes"`                 // OIDC scopes (required)
	RedirectURI  string   `yaml:"redirectUri,omitempty"`  // OIDC redirect URI (optional, can be auto-generated)
	PKCE         *bool    `yaml:"pkce,omitempty"`         // Enable PKCE flow (optional, auto-enabled if clientSecret is empty)
	ResponseMode string   `yaml:"responseMode,omitempty"` // OIDC response mode (optional)
}

OIDCConfig represents OIDC configuration

func (*OIDCConfig) UnmarshalYAML added in v0.0.6

func (o *OIDCConfig) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements custom YAML unmarshaling to handle scopes as either array or space-separated string

type ProviderConfig

type ProviderConfig struct {
	Kind   string                 `yaml:"kind"`
	ID     string                 `yaml:"id,omitempty"`   // Optional: defaults to 'kind'. Required if multiple providers share the same kind
	Config map[string]interface{} `yaml:"-"`              // Provider-specific configuration (e.g., path, region, endpoint, etc.)
	Keys   map[string]string      `yaml:"keys,omitempty"` // Optional key mappings (source_key: target_key, or "==" to keep same name)
	Env    EnvVars                `yaml:"env,omitempty"`
	Uses   []string               `yaml:"uses,omitempty"` // Optional list of provider IDs to depend on
}

ProviderConfig represents a single provider configuration Each provider loads from a single source. To load multiple secrets from the same provider type, configure multiple provider instances with the same 'kind' but different 'id' values.

func (*ProviderConfig) UnmarshalYAML

func (p *ProviderConfig) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements custom YAML unmarshaling to capture provider-specific fields

type SSOConfig added in v0.0.6

type SSOConfig struct {
	OIDC *OIDCConfig `yaml:"oidc,omitempty"` // OIDC configuration
}

SSOConfig represents SSO configuration

Jump to

Keyboard shortcuts

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