config

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2025 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset

type Asset struct {
	Path               string `` /* 146-byte string literal not displayed */
	LoginBackgroundUrl string `` /* 166-byte string literal not displayed */
}

Asset defines the available asset configuration.

type Client

type Client struct {
	ID              string   `yaml:"id"`
	Name            string   `yaml:"name"`
	Trusted         bool     `yaml:"trusted"`
	Secret          string   `yaml:"secret"`
	RedirectURIs    []string `yaml:"redirect_uris"`
	Origins         []string `yaml:"origins"`
	ApplicationType string   `yaml:"application_type"`
}

type Config

type Config struct {
	Commons *shared.Commons `yaml:"-"` // don't use this directly as configuration for a service

	Service Service `yaml:"-"`

	Tracing *Tracing `yaml:"tracing"`
	Log     *Log     `yaml:"log"`
	Debug   Debug    `yaml:"debug"`

	HTTP HTTP `yaml:"http"`

	Reva *shared.Reva `yaml:"reva"`

	MachineAuthAPIKey string `` /* 232-byte string literal not displayed */

	Asset   Asset    `yaml:"asset"`
	IDP     Settings `yaml:"idp"`
	Clients []Client `yaml:"clients"`
	Ldap    Ldap     `yaml:"ldap"`

	Context context.Context `yaml:"-"`
}

Config combines all available configuration parts.

type Debug

type Debug struct {
	Addr   string `` /* 168-byte string literal not displayed */
	Token  string `yaml:"token" env:"IDP_DEBUG_TOKEN" desc:"Token to secure the metrics endpoint." introductionVersion:"1.0.0"`
	Pprof  bool   `yaml:"pprof" env:"IDP_DEBUG_PPROF" desc:"Enables pprof, which can be used for profiling." introductionVersion:"1.0.0"`
	Zpages bool   `` /* 150-byte string literal not displayed */
}

Debug defines the available debug configuration.

type HTTP

type HTTP struct {
	Addr      string `yaml:"addr" env:"IDP_HTTP_ADDR" desc:"The bind address of the HTTP service." introductionVersion:"1.0.0"`
	Root      string `` /* 126-byte string literal not displayed */
	Namespace string `yaml:"-"`
	TLSCert   string `` /* 233-byte string literal not displayed */
	TLSKey    string `` /* 263-byte string literal not displayed */
	TLS       bool   `` /* 228-byte string literal not displayed */
}

HTTP defines the available http configuration.

type Ldap

type Ldap struct {
	URI       string `yaml:"uri" env:"OC_LDAP_URI;IDP_LDAP_URI" desc:"Url of the LDAP service to use as IDP." introductionVersion:"1.0.0"`
	TLSCACert string `` /* 282-byte string literal not displayed */

	BindDN       string `` /* 163-byte string literal not displayed */
	BindPassword string `` /* 156-byte string literal not displayed */

	BaseDN string `` /* 135-byte string literal not displayed */
	Scope  string `` /* 181-byte string literal not displayed */

	LoginAttribute    string `` /* 137-byte string literal not displayed */
	EmailAttribute    string `` /* 152-byte string literal not displayed */
	NameAttribute     string `` /* 160-byte string literal not displayed */
	UUIDAttribute     string `` /* 146-byte string literal not displayed */
	UUIDAttributeType string `` /* 139-byte string literal not displayed */

	UserEnabledAttribute string `` /* 204-byte string literal not displayed */
	Filter               string `` /* 184-byte string literal not displayed */
	ObjectClass          string `` /* 149-byte string literal not displayed */
}

Ldap defines the available LDAP configuration.

type Log

type Log struct {
	Level  string `` /* 174-byte string literal not displayed */
	Pretty bool   `yaml:"pretty" env:"OC_LOG_PRETTY;IDP_LOG_PRETTY" desc:"Activates pretty log output." introductionVersion:"1.0.0"`
	Color  bool   `yaml:"color" env:"OC_LOG_COLOR;IDP_LOG_COLOR" desc:"Activates colorized log output." introductionVersion:"1.0.0"`
	File   string `` /* 142-byte string literal not displayed */
}

Log defines the available log configuration.

type Service

type Service struct {
	Name             string `yaml:"-"`
	PasswordResetURI string `` /* 136-byte string literal not displayed */
}

Service defines the available service configuration.

type Settings

type Settings struct {
	Iss string `yaml:"iss" env:"OC_URL;OC_OIDC_ISSUER;IDP_ISS" desc:"The OIDC issuer URL to use." introductionVersion:"1.0.0"`

	IdentityManager string `` /* 202-byte string literal not displayed */

	URIBasePath string `yaml:"uri_base_path" env:"IDP_URI_BASE_PATH" desc:"IDP uri base path (defaults to '')." introductionVersion:"1.0.0"`

	SignInURI    string `yaml:"sign_in_uri" env:"IDP_SIGN_IN_URI" desc:"IDP sign-in url." introductionVersion:"1.0.0"`
	SignedOutURI string `yaml:"signed_out_uri" env:"IDP_SIGN_OUT_URI" desc:"IDP sign-out url." introductionVersion:"1.0.0"`

	AuthorizationEndpointURI string `yaml:"authorization_endpoint_uri" env:"IDP_ENDPOINT_URI" desc:"URL of the IDP endpoint." introductionVersion:"1.0.0"`
	EndsessionEndpointURI    string `yaml:"-"` // unused, not supported by lico-idp

	Insecure bool `` /* 196-byte string literal not displayed */

	TrustedProxy []string `yaml:"trusted_proxy"` //TODO: how to configure this via env?

	AllowScope                     []string `yaml:"allow_scope"` // TODO: is this even needed?
	AllowClientGuests              bool     ``                   /* 132-byte string literal not displayed */
	AllowDynamicClientRegistration bool     ``                   /* 154-byte string literal not displayed */

	EncryptionSecretFile string `` /* 312-byte string literal not displayed */

	Listen string

	IdentifierClientDisabled          bool   `yaml:"-"` // unused
	IdentifierClientPath              string `yaml:"-"`
	IdentifierRegistrationConf        string `yaml:"-"`
	IdentifierScopesConf              string `yaml:"-"` // unused
	IdentifierDefaultSignInPageText   string `yaml:"default_sign_in_page_text" env:"IDP_DEFAULT_SIGNIN_PAGE_TEXT" desc:"" introductionVersion:"2.0.0"`
	IdentifierDefaultUsernameHintText string
	IdentifierUILocales               []string

	SigningKid             string   `` /* 185-byte string literal not displayed */
	SigningMethod          string   `yaml:"signing_method" env:"IDP_SIGNING_METHOD" desc:"Signing method of IDP requests like 'PS256'" introductionVersion:"1.0.0"`
	SigningPrivateKeyFiles []string `` /* 294-byte string literal not displayed */
	ValidationKeysPath     string   `` /* 135-byte string literal not displayed */

	CookieBackendURI string
	CookieNames      []string
	CookieSameSite   http.SameSite

	AccessTokenDurationSeconds         uint64 `` /* 182-byte string literal not displayed */
	IDTokenDurationSeconds             uint64 `` /* 164-byte string literal not displayed */
	RefreshTokenDurationSeconds        uint64 `` /* 242-byte string literal not displayed */
	DynamicClientSecretDurationSeconds uint64 `` /* 182-byte string literal not displayed */
}

type Tracing

type Tracing struct {
	Enabled   bool   `yaml:"enabled" env:"OC_TRACING_ENABLED;IDP_TRACING_ENABLED" desc:"Activates tracing." introductionVersion:"1.0.0"`
	Type      string `` /* 206-byte string literal not displayed */
	Endpoint  string `` /* 132-byte string literal not displayed */
	Collector string `` /* 252-byte string literal not displayed */
}

Tracing defines the available tracing configuration.

func (Tracing) Convert

func (t Tracing) Convert() tracing.Config

Convert Tracing to the tracing package's Config struct.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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