Documentation ¶
Index ¶
- Variables
- type AuthMiddleware
- type ClaimsSelectorConf
- type Config
- type Debug
- type HTTP
- type Log
- 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
- type UserinfoCache
Constants ¶
This section is empty.
Variables ¶
var ( // RouteTypes is an array of the available route types RouteTypes = []RouteType{QueryRoute, RegexRoute, PrefixRoute} )
Functions ¶
This section is empty.
Types ¶
type AuthMiddleware ¶ added in v1.17.0
type AuthMiddleware struct {
CredentialsByUserAgent map[string]string `ocisConfig:"credentials_by_user_agent"`
}
AuthMiddleware configures the proxy http auth middleware.
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 Service Service Tracing *Tracing `ocisConfig:"tracing"` Log *Log `ocisConfig:"log"` Debug Debug `ocisConfig:"debug"` HTTP HTTP `ocisConfig:"http"` Reva Reva `ocisConfig:"reva"` Policies []Policy `ocisConfig:"policies"` OIDC OIDC `ocisConfig:"oidc"` TokenManager TokenManager `ocisConfig:"token_manager"` PolicySelector *PolicySelector `ocisConfig:"policy_selector"` PreSignedURL PreSignedURL `ocisConfig:"pre_signed_url"` AccountBackend string `ocisConfig:"account_backend" env:"PROXY_ACCOUNT_BACKEND_TYPE"` UserOIDCClaim string `ocisConfig:"user_oidc_claim" env:"PROXY_USER_OIDC_CLAIM"` UserCS3Claim string `ocisConfig:"user_cs3_claim" env:"PROXY_USER_CS3_CLAIM"` MachineAuthAPIKey string `ocisConfig:"machine_auth_api_key" env:"OCIS_MACHINE_AUTH_API_KEY;PROXY_MACHINE_AUTH_API_KEY"` AutoprovisionAccounts bool `ocisConfig:"auto_provision_accounts" env:"PROXY_AUTOPROVISION_ACCOUNTS"` EnableBasicAuth bool `ocisConfig:"enable_basic_auth" env:"PROXY_ENABLE_BASIC_AUTH"` InsecureBackends bool `ocisConfig:"insecure_backends" env:"PROXY_INSECURE_BACKENDS"` AuthMiddleware AuthMiddleware `ocisConfig:"auth_middleware"` Context context.Context }
Config combines all available configuration parts.
func DefaultConfig ¶ added in v1.16.0
func DefaultConfig() *Config
type Debug ¶
type Debug struct { Addr string `ocisConfig:"addr" env:"PROXY_DEBUG_ADDR"` Token string `ocisConfig:"token" env:"PROXY_DEBUG_TOKEN"` Pprof bool `ocisConfig:"pprof" env:"PROXY_DEBUG_PPROF"` Zpages bool `ocisConfig:"zpages" env:"PROXY_DEBUG_ZPAGES"` }
Debug defines the available debug configuration.
type HTTP ¶
type HTTP struct { Addr string `ocisConfig:"addr" env:"PROXY_HTTP_ADDR"` Root string `ocisConfig:"root" env:"PROXY_HTTP_ROOT"` Namespace string TLSCert string `ocisConfig:"tls_cert" env:"PROXY_TRANSPORT_TLS_CERT"` TLSKey string `ocisConfig:"tls_key" env:"PROXY_TRANSPORT_TLS_KEY"` TLS bool `ocisConfig:"tls" env:"PROXY_TLS"` }
HTTP defines the available http configuration.
type Log ¶
type Log struct { Level string `mapstructure:"level" env:"OCIS_LOG_LEVEL;PROXY_LOG_LEVEL"` Pretty bool `mapstructure:"pretty" env:"OCIS_LOG_PRETTY;PROXY_LOG_PRETTY"` Color bool `mapstructure:"color" env:"OCIS_LOG_COLOR;PROXY_LOG_COLOR"` File string `mapstructure:"file" env:"OCIS_LOG_FILE;PROXY_LOG_FILE"` }
Log defines the available log configuration.
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" env:"OCIS_URL;PROXY_OIDC_ISSUER"` Insecure bool `ocisConfig:"insecure" env:"OCIS_INSECURE;PROXY_OIDC_INSECURE"` UserinfoCache UserinfoCache `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" env:"PROXY_ENABLE_PRESIGNEDURLS"` }
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" env:"REVA_GATEWAY"`
}
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
}
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" env:"OCIS_JWT_SECRET;PROXY_JWT_SECRET"`
}
TokenManager is the config for using the reva token manager
type Tracing ¶
type Tracing struct { Enabled bool `ocisConfig:"enabled" env:"OCIS_TRACING_ENABLED;PROXY_TRACING_ENABLED"` Type string `ocisConfig:"type" env:"OCIS_TRACING_TYPE;PROXY_TRACING_TYPE"` Endpoint string `ocisConfig:"endpoint" env:"OCIS_TRACING_ENDPOINT;PROXY_TRACING_ENDPOINT"` Collector string `ocisConfig:"collector" env:"OCIS_TRACING_COLLECTOR;PROXY_TRACING_COLLECTOR"` }
Tracing defines the available tracing configuration.
type UserinfoCache ¶ added in v1.17.0
type UserinfoCache struct { Size int `ocisConfig:"size" env:"PROXY_OIDC_USERINFO_CACHE_SIZE"` TTL int `ocisConfig:"ttl" env:"PROXY_OIDC_USERINFO_CACHE_TTL"` }
UserinfoCache is a TTL cache configuration.