config

package
v0.0.0-...-499b85e Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2021 License: Apache-2.0 Imports: 1 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// RouteTypes is an array of the available route types
	RouteTypes []RouteType = []RouteType{QueryRoute, RegexRoute, PrefixRoute}
)

Functions

This section is empty.

Types

type Asset

type Asset struct {
	Path string
}

Asset defines the available asset configuration.

type Auth

type Auth struct {
	CredentialsByUserAgent map[string]string
}

Auth configures proxy http auth middleware.

type Cache

type Cache struct {
	Size int
	TTL  int
}

Cache is a TTL cache configuration.

type ClaimsSelectorConf

type ClaimsSelectorConf struct {
	DefaultPolicy         string `mapstructure:"default_policy"`
	UnauthenticatedPolicy string `mapstructure:"unauthenticated_policy"`
	SelectorCookieName    string `mapstructure:"selector_cookie_name"`
}

ClaimsSelectorConf is the config for the claims-selector

type Config

type Config struct {
	File                  string
	Log                   Log
	Debug                 Debug
	HTTP                  HTTP
	Service               Service
	Tracing               Tracing
	Asset                 Asset
	Policies              []Policy
	OIDC                  OIDC
	TokenManager          TokenManager
	PolicySelector        *PolicySelector `mapstructure:"policy_selector"`
	Reva                  Reva
	PreSignedURL          PreSignedURL
	AccountBackend        string
	UserOIDCClaim         string
	UserCS3Claim          string
	AutoprovisionAccounts bool
	EnableBasicAuth       bool
	InsecureBackends      bool

	Context    context.Context
	Supervised bool
}

Config combines all available configuration parts.

func New

func New() *Config

New initializes a new configuration

type Debug

type Debug struct {
	Addr   string
	Token  string
	Pprof  bool
	Zpages bool
}

Debug defines the available debug configuration.

type HTTP

type HTTP struct {
	Addr    string
	Root    string
	TLSCert string
	TLSKey  string
	TLS     bool
}

HTTP defines the available http configuration.

type Log

type Log struct {
	Level  string
	Pretty bool
	Color  bool
	File   string
}

Log defines the available logging configuration.

type Middleware

type Middleware struct {
	Auth Auth
}

Middleware configures proxy middlewares.

type MigrationSelectorConf

type MigrationSelectorConf struct {
	AccFoundPolicy        string `mapstructure:"acc_found_policy"`
	AccNotFoundPolicy     string `mapstructure:"acc_not_found_policy"`
	UnauthenticatedPolicy string `mapstructure:"unauthenticated_policy"`
}

MigrationSelectorConf is the config for the migration-selector

type OIDC

type OIDC struct {
	Issuer        string
	Insecure      bool
	UserinfoCache Cache
}

OIDC is the config for the OpenID-Connect middleware. If set the proxy will try to authenticate every request with the configured oidc-provider

type Policy

type Policy struct {
	Name   string
	Routes []Route
}

Policy enables us to use multiple directors.

type PolicySelector

type PolicySelector struct {
	Static    *StaticSelectorConf
	Migration *MigrationSelectorConf
	Claims    *ClaimsSelectorConf
	Regex     *RegexSelectorConf
}

PolicySelector is the toplevel-configuration for different selectors

type PreSignedURL

type PreSignedURL struct {
	AllowedHTTPMethods []string
	Enabled            bool
}

PreSignedURL is the config for the presigned url middleware

type RegexRuleConf

type RegexRuleConf struct {
	Priority int    `mapstructure:"priority"`
	Property string `mapstructure:"property"`
	Match    string `mapstructure:"match"`
	Policy   string `mapstructure:"policy"`
}

type RegexSelectorConf

type RegexSelectorConf struct {
	DefaultPolicy         string          `mapstructure:"default_policy"`
	MatchesPolicies       []RegexRuleConf `mapstructure:"matches_policies"`
	UnauthenticatedPolicy string          `mapstructure:"unauthenticated_policy"`
	SelectorCookieName    string          `mapstructure:"selector_cookie_name"`
}

RegexSelectorConf is the config for the regex-selector

type Reva

type Reva struct {
	Address    string
	Middleware Middleware
}

Reva defines all available REVA configuration.

type Route

type Route struct {
	Type        RouteType
	Endpoint    string
	Backend     string
	ApacheVHost bool `mapstructure:"apache-vhost"`
}

Route define forwarding routes

type RouteType

type RouteType string

RouteType defines the type of a route

const (
	// PrefixRoute are routes matched by a prefix
	PrefixRoute RouteType = "prefix"
	// QueryRoute are routes machted by a prefix and query parameters
	QueryRoute RouteType = "query"
	// RegexRoute are routes matched by a pattern
	RegexRoute RouteType = "regex"
	// DefaultRouteType is the PrefixRoute
	DefaultRouteType RouteType = PrefixRoute
)

type Service

type Service struct {
	Name      string
	Namespace string
	Version   string
}

Service defines the available service configuration.

type StaticSelectorConf

type StaticSelectorConf struct {
	Policy string
}

StaticSelectorConf is the config for the static-policy-selector

type TokenManager

type TokenManager struct {
	JWTSecret string
}

TokenManager is the config for using the reva token manager

type Tracing

type Tracing struct {
	Enabled   bool
	Type      string
	Endpoint  string
	Collector string
	Service   string
}

Tracing defines the available tracing configuration.

Jump to

Keyboard shortcuts

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