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 `yaml:"credentials_by_user_agent"`
}
AuthMiddleware configures the proxy http auth middleware.
type ClaimsSelectorConf ¶
type ClaimsSelectorConf struct { DefaultPolicy string `yaml:"default_policy"` UnauthenticatedPolicy string `yaml:"unauthenticated_policy"` SelectorCookieName string `yaml:"selector_cookie_name"` }
ClaimsSelectorConf is the config for the claims-selector
type Config ¶
type Config struct { *shared.Commons `yaml:"-"` Service Service `yaml:"-"` Tracing *Tracing `yaml:"tracing"` Log *Log `yaml:"log"` Debug Debug `yaml:"debug"` HTTP HTTP `yaml:"http"` Reva Reva `yaml:"reva"` Policies []Policy `yaml:"policies"` OIDC OIDC `yaml:"oidc"` TokenManager TokenManager `yaml:"token_manager"` PolicySelector *PolicySelector `yaml:"policy_selector"` PreSignedURL PreSignedURL `yaml:"pre_signed_url"` AccountBackend string `yaml:"account_backend" env:"PROXY_ACCOUNT_BACKEND_TYPE"` UserOIDCClaim string `yaml:"user_oidc_claim" env:"PROXY_USER_OIDC_CLAIM"` UserCS3Claim string `yaml:"user_cs3_claim" env:"PROXY_USER_CS3_CLAIM"` MachineAuthAPIKey string `yaml:"machine_auth_api_key" env:"OCIS_MACHINE_AUTH_API_KEY;PROXY_MACHINE_AUTH_API_KEY"` AutoprovisionAccounts bool `yaml:"auto_provision_accounts" env:"PROXY_AUTOPROVISION_ACCOUNTS"` EnableBasicAuth bool `yaml:"enable_basic_auth" env:"PROXY_ENABLE_BASIC_AUTH"` InsecureBackends bool `yaml:"insecure_backends" env:"PROXY_INSECURE_BACKENDS"` AuthMiddleware AuthMiddleware `yaml:"auth_middleware"` Context context.Context `yaml:"-"` }
Config combines all available configuration parts.
type Debug ¶
type Debug struct { Addr string `yaml:"addr" env:"PROXY_DEBUG_ADDR"` Token string `yaml:"token" env:"PROXY_DEBUG_TOKEN"` Pprof bool `yaml:"pprof" env:"PROXY_DEBUG_PPROF"` Zpages bool `yaml:"zpages" env:"PROXY_DEBUG_ZPAGES"` }
Debug defines the available debug configuration.
type HTTP ¶
type HTTP struct { Addr string `yaml:"addr" env:"PROXY_HTTP_ADDR"` Root string `yaml:"root" env:"PROXY_HTTP_ROOT"` Namespace string `yaml:"-"` TLSCert string `yaml:"tls_cert" env:"PROXY_TRANSPORT_TLS_CERT"` TLSKey string `yaml:"tls_key" env:"PROXY_TRANSPORT_TLS_KEY"` TLS bool `yaml:"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 `yaml:"acc_found_policy"` AccNotFoundPolicy string `yaml:"acc_not_found_policy"` UnauthenticatedPolicy string `yaml:"unauthenticated_policy"` }
MigrationSelectorConf is the config for the migration-selector
type OIDC ¶
type OIDC struct { Issuer string `yaml:"issuer" env:"OCIS_URL;PROXY_OIDC_ISSUER"` Insecure bool `yaml:"insecure" env:"OCIS_INSECURE;PROXY_OIDC_INSECURE"` UserinfoCache UserinfoCache `yaml:"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 PolicySelector ¶
type PolicySelector struct { Static *StaticSelectorConf `yaml:"static"` Migration *MigrationSelectorConf `yaml:"migration"` Claims *ClaimsSelectorConf `yaml:"claims"` Regex *RegexSelectorConf `yaml:"regex"` }
PolicySelector is the toplevel-configuration for different selectors
type PreSignedURL ¶
type PreSignedURL struct { AllowedHTTPMethods []string `yaml:"allowed_http_methods"` Enabled bool `yaml:"enabled" env:"PROXY_ENABLE_PRESIGNEDURLS"` }
PreSignedURL is the config for the presigned url middleware
type RegexRuleConf ¶
type RegexSelectorConf ¶
type RegexSelectorConf struct { DefaultPolicy string `yaml:"default_policy"` MatchesPolicies []RegexRuleConf `yaml:"matches_policies"` UnauthenticatedPolicy string `yaml:"unauthenticated_policy"` SelectorCookieName string `yaml:"selector_cookie_name"` }
RegexSelectorConf is the config for the regex-selector
type Reva ¶
type Reva struct {
Address string `yaml:"address" env:"REVA_GATEWAY"`
}
Reva defines all available REVA configuration.
type Route ¶
type Route struct { Type RouteType `yaml:"type"` Endpoint string `yaml:"endpoint"` // Backend is a static URL to forward the request to Backend string `yaml:"backend"` // Service name to look up in the registry Service string `yaml:"service"` ApacheVHost bool `yaml:"apache-vhost"` }
Route defines 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 `yaml:"-"`
}
Service defines the available service configuration.
type StaticSelectorConf ¶
type StaticSelectorConf struct {
Policy string `yaml:"policy"`
}
StaticSelectorConf is the config for the static-policy-selector
type TokenManager ¶
type TokenManager struct {
JWTSecret string `yaml:"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 `yaml:"enabled" env:"OCIS_TRACING_ENABLED;PROXY_TRACING_ENABLED"` Type string `yaml:"type" env:"OCIS_TRACING_TYPE;PROXY_TRACING_TYPE"` Endpoint string `yaml:"endpoint" env:"OCIS_TRACING_ENDPOINT;PROXY_TRACING_ENDPOINT"` Collector string `yaml:"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 `yaml:"size" env:"PROXY_OIDC_USERINFO_CACHE_SIZE"` TTL int `yaml:"ttl" env:"PROXY_OIDC_USERINFO_CACHE_TTL"` }
UserinfoCache is a TTL cache configuration.