Documentation
¶
Index ¶
- Variables
- func GetEnv(cfg *Config) []string
- func StructMappings(cfg *Config) []shared.EnvBinding
- type Auth
- type Cache
- type ClaimsSelectorConf
- type Config
- type Debug
- type HTTP
- type Log
- type Middleware
- type MigrationSelectorConf
- type OIDC
- type Policy
- type PolicySelector
- type PreSignedURL
- type RegexRuleConf
- type RegexSelectorConf
- type Reva
- type Route
- type RouteType
- type Service
- type StaticSelectorConf
- type TokenManager
- type Tracing
Constants ¶
This section is empty.
Variables ¶
var ( // RouteTypes is an array of the available route types RouteTypes = []RouteType{QueryRoute, RegexRoute, PrefixRoute} )
Functions ¶
func GetEnv ¶ added in v1.16.0
GetEnv fetches a list of known env variables for this extension. It is to be used by gookit, as it provides a list with all the environment variables an extension supports.
func StructMappings ¶ added in v1.16.0
func StructMappings(cfg *Config) []shared.EnvBinding
StructMappings binds a set of environment variables to a destination on cfg. Iterating over this set and editing the Destination value of a binding will alter the original value, as it is a pointer to its memory address. This lets us propagate changes easier.
Types ¶
type ClaimsSelectorConf ¶
type ClaimsSelectorConf struct {
DefaultPolicy string `ocisConfig:"default_policy"`
UnauthenticatedPolicy string `ocisConfig:"unauthenticated_policy"`
SelectorCookieName string `ocisConfig:"selector_cookie_name"`
}
ClaimsSelectorConf is the config for the claims-selector
type Config ¶
type Config struct {
*shared.Commons
Log *shared.Log `ocisConfig:"log"`
Debug Debug `ocisConfig:"debug"`
HTTP HTTP `ocisConfig:"http"`
Service Service `ocisConfig:"service"`
Tracing Tracing `ocisConfig:"tracing"`
Policies []Policy `ocisConfig:"policies"`
OIDC OIDC `ocisConfig:"oidc"`
TokenManager TokenManager `ocisConfig:"token_manager"`
PolicySelector *PolicySelector `ocisConfig:"policy_selector"`
Reva Reva `ocisConfig:"reva"`
PreSignedURL PreSignedURL `ocisConfig:"pre_signed_url"`
AccountBackend string `ocisConfig:"account_backend"`
UserOIDCClaim string `ocisConfig:"user_oidc_claim"`
UserCS3Claim string `ocisConfig:"user_cs3_claim"`
MachineAuthAPIKey string `ocisConfig:"machine_auth_api_key"`
AutoprovisionAccounts bool `ocisConfig:"auto_provision_accounts"`
EnableBasicAuth bool `ocisConfig:"enable_basic_auth"`
InsecureBackends bool `ocisConfig:"insecure_backends"`
Context context.Context
Supervised bool
}
Config combines all available configuration parts.
func DefaultConfig ¶ added in v1.16.0
func DefaultConfig() *Config
DefaultConfig provides with a working local configuration for a proxy service.
type Debug ¶
type Debug struct {
Addr string `ocisConfig:"addr"`
Token string `ocisConfig:"token"`
Pprof bool `ocisConfig:"pprof"`
Zpages bool `ocisConfig:"zpages"`
}
Debug defines the available debug configuration.
type HTTP ¶
type HTTP struct {
Addr string `ocisConfig:"addr"`
Root string `ocisConfig:"root"`
TLSCert string `ocisConfig:"tls_cert"`
TLSKey string `ocisConfig:"tls_key"`
TLS bool `ocisConfig:"tls"`
}
HTTP defines the available http configuration.
type Log ¶
type Log struct {
Level string `ocisConfig:"level"`
Pretty bool `ocisConfig:"pretty"`
Color bool `ocisConfig:"color"`
File string `ocisConfig:"file"`
}
Log defines the available logging configuration.
type Middleware ¶
type Middleware struct {
Auth Auth `ocisConfig:"middleware"`
}
Middleware configures proxy middlewares.
type MigrationSelectorConf ¶
type MigrationSelectorConf struct {
AccFoundPolicy string `ocisConfig:"acc_found_policy"`
AccNotFoundPolicy string `ocisConfig:"acc_not_found_policy"`
UnauthenticatedPolicy string `ocisConfig:"unauthenticated_policy"`
}
MigrationSelectorConf is the config for the migration-selector
type OIDC ¶
type OIDC struct {
Issuer string `ocisConfig:"issuer"`
Insecure bool `ocisConfig:"insecure"`
UserinfoCache Cache `ocisConfig:"user_info_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 ¶
Policy enables us to use multiple directors.
func DefaultPolicies ¶ added in v1.16.0
func DefaultPolicies() []Policy
type PolicySelector ¶
type PolicySelector struct {
Static *StaticSelectorConf `ocisConfig:"static"`
Migration *MigrationSelectorConf `ocisConfig:"migration"`
Claims *ClaimsSelectorConf `ocisConfig:"claims"`
Regex *RegexSelectorConf `ocisConfig:"regex"`
}
PolicySelector is the toplevel-configuration for different selectors
type PreSignedURL ¶
type PreSignedURL struct {
AllowedHTTPMethods []string `ocisConfig:"allowed_http_methods"`
Enabled bool `ocisConfig:"enabled"`
}
PreSignedURL is the config for the presigned url middleware
type RegexRuleConf ¶
type RegexSelectorConf ¶
type RegexSelectorConf struct {
DefaultPolicy string `ocisConfig:"default_policy"`
MatchesPolicies []RegexRuleConf `ocisConfig:"matches_policies"`
UnauthenticatedPolicy string `ocisConfig:"unauthenticated_policy"`
SelectorCookieName string `ocisConfig:"selector_cookie_name"`
}
RegexSelectorConf is the config for the regex-selector
type Reva ¶
type Reva struct {
Address string `ocisConfig:"address"`
Middleware Middleware `ocisConfig:"middleware"`
}
Reva defines all available REVA configuration.
type Route ¶
type Route struct {
Type RouteType `ocisConfig:"type"`
Endpoint string `ocisConfig:"endpoint"`
Backend string `ocisConfig:"backend"`
ApacheVHost bool `ocisConfig:"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 matched 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 `ocisConfig:"name"`
Namespace string `ocisConfig:"namespace"`
Version string `ocisConfig:"version"`
}
Service defines the available service configuration.
type StaticSelectorConf ¶
type StaticSelectorConf struct {
Policy string `ocisConfig:"policy"`
}
StaticSelectorConf is the config for the static-policy-selector
type TokenManager ¶
type TokenManager struct {
JWTSecret string `ocisConfig:"jwt_secret"`
}
TokenManager is the config for using the reva token manager