config

package
v0.0.0-...-c742a63 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2024 License: Apache-2.0 Imports: 8 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 {
	OIDC     OIDCConfig   `mapstructure:"oidc"`
	LogLevel string       `mapstructure:"loglevel"`
	HTTP     HTTPConfig   `mapstructure:"http"`
	Fabric   FabricConfig `mapstructure:"fabric"`
}

Config represents the configuration for fabric-oidc-proxy

func LoadConfig

func LoadConfig(cmd *cobra.Command) (*Config, *zap.Logger, error)

LoadConfig loads the configuration from, in order of priority: 1. Command-line flags 2. Environment variables 3. Configuration file (config.yaml) 4. Default values

type FabricCAConfig

type FabricCAConfig struct {
	URL             string `mapstructure:"url"`
	ClientHome      string `mapstructure:"client_home"`
	ClientMSPDir    string `mapstructure:"client_mspdir"`
	TLSCert         string `mapstructure:"tls_cert"`
	TLSKey          string `mapstructure:"tls_key"`
	TLSTrustedCerts string `mapstructure:"tls_trusted_certs"`
	Admin           string `mapstructure:"admin"`
	AdminSecret     string `mapstructure:"admin_secret"`
	OIDCClaimKey    string `mapstructure:"oidc_claim_key"`
}

FabricConfig represents the configuration for the Fabric CA client

type FabricConfig

type FabricConfig struct {
	CA FabricCAConfig `mapstructure:"ca"`
	GW FabricGWConfig `mapstructure:"gw"`
}

FabricConfig represents the configuration for the Fabric client

type FabricGWConfig

type FabricGWConfig struct {
	MSPID                  string `mapstructure:"msp_id"`
	TLSCert                string `mapstructure:"tls_cert"`
	TLSKey                 string `mapstructure:"tls_key"`
	TLSTrustedCerts        string `mapstructure:"tls_trusted_certs"`
	PeerEndpoint           string `mapstructure:"peer_endpoint"`
	PeerServerNameOverride string `mapstructure:"peer_server_name_override"`
	MSPCert                string `mapstructure:"msp_cert"`
	MSPKey                 string `mapstructure:"msp_key"`
}

FabricGWConfig represents the configuration for the Fabric Gateway client

type HTTPConfig

type HTTPConfig struct {
	Port int `mapstructure:"port"`
	TLS  struct {
		Cert string `mapstructure:"cert"`
		Key  string `mapstructure:"key"`
	} `mapstructure:"tls"`
}

HTTPConfig represents the configuration for the HTTP server

type OIDCConfig

type OIDCConfig struct {
	Issuer       string `mapstructure:"issuer"`
	ClientID     string `mapstructure:"client_id"`
	ClientSecret string `mapstructure:"client_secret"`
}

OIDCConfig represents the configuration for OIDC

Jump to

Keyboard shortcuts

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