Documentation ¶
Index ¶
- Constants
- type Key
- type KoanfProvider
- func (v *KoanfProvider) APIIdleTimeout() time.Duration
- func (v *KoanfProvider) APIReadTimeout() time.Duration
- func (v *KoanfProvider) APIServeAddress() string
- func (v *KoanfProvider) APIWriteTimeout() time.Duration
- func (v *KoanfProvider) AccessRuleMatchingStrategy() MatchingStrategy
- func (v *KoanfProvider) AccessRuleRepositories() []url.URL
- func (v *KoanfProvider) AddWatcher(cb callback) SubscriptionID
- func (v *KoanfProvider) AllSettings() map[string]interface{}
- func (v *KoanfProvider) AuthenticatorConfig(id string, override json.RawMessage, dest interface{}) error
- func (v *KoanfProvider) AuthenticatorIsEnabled(id string) bool
- func (v *KoanfProvider) AuthenticatorJwtJwkMaxWait() time.Duration
- func (v *KoanfProvider) AuthenticatorJwtJwkTtl() time.Duration
- func (v *KoanfProvider) AuthorizerConfig(id string, override json.RawMessage, dest interface{}) error
- func (v *KoanfProvider) AuthorizerIsEnabled(id string) bool
- func (v *KoanfProvider) CORS(iface string) (cors.Options, bool)
- func (v *KoanfProvider) CORSEnabled(iface string) bool
- func (v *KoanfProvider) CORSOptions(iface string) cors.Options
- func (v *KoanfProvider) ErrorHandlerConfig(id string, override json.RawMessage, dest interface{}) error
- func (v *KoanfProvider) ErrorHandlerFallbackSpecificity() []string
- func (v *KoanfProvider) ErrorHandlerIsEnabled(id string) bool
- func (v *KoanfProvider) Get(k Key) interface{}
- func (v *KoanfProvider) JSONWebKeyURLs() []string
- func (v *KoanfProvider) MutatorConfig(id string, override json.RawMessage, dest interface{}) error
- func (v *KoanfProvider) MutatorIsEnabled(id string) bool
- func (v *KoanfProvider) ParseURLs(sources []string) ([]url.URL, error)
- func (v *KoanfProvider) PipelineConfig(prefix, id string, override json.RawMessage, dest interface{}) error
- func (v *KoanfProvider) PrometheusCollapseRequestPaths() bool
- func (v *KoanfProvider) PrometheusHideRequestPaths() bool
- func (v *KoanfProvider) PrometheusMetricsNamePrefix() string
- func (v *KoanfProvider) PrometheusMetricsPath() string
- func (v *KoanfProvider) PrometheusServeAddress() string
- func (v *KoanfProvider) ProxyIdleTimeout() time.Duration
- func (v *KoanfProvider) ProxyReadTimeout() time.Duration
- func (v *KoanfProvider) ProxyServeAddress() string
- func (v *KoanfProvider) ProxyWriteTimeout() time.Duration
- func (v *KoanfProvider) RemoveWatcher(id SubscriptionID)
- func (v *KoanfProvider) SetForTest(t testing.TB, key string, value interface{})
- func (v *KoanfProvider) Source() *configx.Provider
- func (v *KoanfProvider) String(k Key) string
- func (v *KoanfProvider) TLSConfig(daemon string) *TLSConfig
- func (v *KoanfProvider) ToScopeStrategy(value string, key string) fosite.ScopeStrategy
- func (v *KoanfProvider) TracingJaegerConfig() *tracing.JaegerConfig
- func (v *KoanfProvider) TracingProvider() string
- func (v *KoanfProvider) TracingServiceName() string
- func (v *KoanfProvider) TracingZipkinConfig() *tracing.ZipkinConfig
- type MatchingStrategy
- type Provider
- type ProviderAuthenticators
- type ProviderAuthorizers
- type ProviderErrorHandlers
- type ProviderMutators
- type SubscriptionID
- type TLSConfig
- type TLSData
Constants ¶
View Source
const (
ForbiddenStrategyErrorType = "forbidden"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Key ¶ added in v0.40.0
type Key = string
const ( ProxyReadTimeout Key = "serve.proxy.timeout.read" ProxyWriteTimeout Key = "serve.proxy.timeout.write" ProxyIdleTimeout Key = "serve.proxy.timeout.idle" ProxyServeAddressHost Key = "serve.proxy.host" ProxyServeAddressPort Key = "serve.proxy.port" APIServeAddressHost Key = "serve.api.host" APIServeAddressPort Key = "serve.api.port" APIReadTimeout Key = "serve.api.timeout.read" APIWriteTimeout Key = "serve.api.timeout.write" APIIdleTimeout Key = "serve.api.timeout.idle" PrometheusServeAddressHost Key = "serve.prometheus.host" PrometheusServeAddressPort Key = "serve.prometheus.port" PrometheusServeMetricsPath Key = "serve.prometheus.metrics_path" PrometheusServeMetricsNamePrefix Key = "serve.prometheus.metric_name_prefix" PrometheusServeHideRequestPaths Key = "serve.prometheus.hide_request_paths" PrometheusServeCollapseRequestPaths Key = "serve.prometheus.collapse_request_paths" AccessRuleRepositories Key = "access_rules.repositories" AccessRuleMatchingStrategy Key = "access_rules.matching_strategy" )
const ( AuthorizerAllowIsEnabled Key = "authorizers.allow.enabled" AuthorizerDenyIsEnabled Key = "authorizers.deny.enabled" AuthorizerKetoEngineACPORYIsEnabled Key = "authorizers.keto_engine_acp_ory.enabled" AuthorizerRemoteIsEnabled Key = "authorizers.remote.enabled" AuthorizerRemoteJSONIsEnabled Key = "authorizers.remote_json.enabled" )
Authorizers
const ( MutatorCookieIsEnabled Key = "mutators.cookie.enabled" MutatorHeaderIsEnabled Key = "mutators.header.enabled" MutatorNoopIsEnabled Key = "mutators.noop.enabled" MutatorHydratorIsEnabled Key = "mutators.hydrator.enabled" MutatorIDTokenIsEnabled Key = "mutators.id_token.enabled" MutatorIDTokenJWKSURL Key = "mutators.id_token.config.jwks_url" )
Mutators
const ( // anonymous AuthenticatorAnonymousIsEnabled Key = "authenticators.anonymous.enabled" // noop AuthenticatorNoopIsEnabled Key = "authenticators.noop.enabled" // cookie session AuthenticatorCookieSessionIsEnabled Key = "authenticators.cookie_session.enabled" // jwt AuthenticatorJwtIsEnabled Key = "authenticators.jwt.enabled" AuthenticatorJwtJwkMaxWait Key = "authenticators.jwt.config.jwks_max_wait" AuthenticatorJwtJwkTtl Key = "authenticators.jwt.config.jwks_ttl" // oauth2_client_credentials AuthenticatorOAuth2ClientCredentialsIsEnabled Key = "authenticators.oauth2_client_credentials.enabled" // oauth2_token_introspection AuthenticatorOAuth2TokenIntrospectionIsEnabled Key = "authenticators.oauth2_introspection.enabled" AuthenticatorUnauthorizedIsEnabled Key = "authenticators.unauthorized.enabled" )
Authenticators
const ( ErrorsHandlers Key = "errors.handlers" ErrorsFallback Key = "errors.fallback" ErrorsJSONIsEnabled Key = ErrorsHandlers + ".json.enabled" ErrorsRedirectIsEnabled Key = ErrorsHandlers + ".redirect.enabled" ErrorsWWWAuthenticateIsEnabled Key = ErrorsHandlers + ".www_authenticate.enabled" )
Errors
type KoanfProvider ¶ added in v0.40.0
type KoanfProvider struct {
// contains filtered or unexported fields
}
func NewKoanfProvider ¶ added in v0.40.0
func NewKoanfProvider(ctx context.Context, flags *pflag.FlagSet, l *logrusx.Logger, opts ...configx.OptionModifier) (kp *KoanfProvider, err error)
func (*KoanfProvider) APIIdleTimeout ¶ added in v0.40.0
func (v *KoanfProvider) APIIdleTimeout() time.Duration
func (*KoanfProvider) APIReadTimeout ¶ added in v0.40.0
func (v *KoanfProvider) APIReadTimeout() time.Duration
func (*KoanfProvider) APIServeAddress ¶ added in v0.40.0
func (v *KoanfProvider) APIServeAddress() string
func (*KoanfProvider) APIWriteTimeout ¶ added in v0.40.0
func (v *KoanfProvider) APIWriteTimeout() time.Duration
func (*KoanfProvider) AccessRuleMatchingStrategy ¶ added in v0.40.0
func (v *KoanfProvider) AccessRuleMatchingStrategy() MatchingStrategy
AccessRuleMatchingStrategy returns current MatchingStrategy.
func (*KoanfProvider) AccessRuleRepositories ¶ added in v0.40.0
func (v *KoanfProvider) AccessRuleRepositories() []url.URL
func (*KoanfProvider) AddWatcher ¶ added in v0.40.0
func (v *KoanfProvider) AddWatcher(cb callback) SubscriptionID
AddWatcher ensures that the callback is called when the configuration changes. The returned subscription can be used to remove the watcher.
func (*KoanfProvider) AllSettings ¶ added in v0.40.0
func (v *KoanfProvider) AllSettings() map[string]interface{}
func (*KoanfProvider) AuthenticatorConfig ¶ added in v0.40.0
func (v *KoanfProvider) AuthenticatorConfig(id string, override json.RawMessage, dest interface{}) error
func (*KoanfProvider) AuthenticatorIsEnabled ¶ added in v0.40.0
func (v *KoanfProvider) AuthenticatorIsEnabled(id string) bool
func (*KoanfProvider) AuthenticatorJwtJwkMaxWait ¶ added in v0.40.0
func (v *KoanfProvider) AuthenticatorJwtJwkMaxWait() time.Duration
func (*KoanfProvider) AuthenticatorJwtJwkTtl ¶ added in v0.40.0
func (v *KoanfProvider) AuthenticatorJwtJwkTtl() time.Duration
func (*KoanfProvider) AuthorizerConfig ¶ added in v0.40.0
func (v *KoanfProvider) AuthorizerConfig(id string, override json.RawMessage, dest interface{}) error
func (*KoanfProvider) AuthorizerIsEnabled ¶ added in v0.40.0
func (v *KoanfProvider) AuthorizerIsEnabled(id string) bool
func (*KoanfProvider) CORS ¶ added in v0.40.0
func (v *KoanfProvider) CORS(iface string) (cors.Options, bool)
func (*KoanfProvider) CORSEnabled ¶ added in v0.40.0
func (v *KoanfProvider) CORSEnabled(iface string) bool
func (*KoanfProvider) CORSOptions ¶ added in v0.40.0
func (v *KoanfProvider) CORSOptions(iface string) cors.Options
func (*KoanfProvider) ErrorHandlerConfig ¶ added in v0.40.0
func (v *KoanfProvider) ErrorHandlerConfig(id string, override json.RawMessage, dest interface{}) error
func (*KoanfProvider) ErrorHandlerFallbackSpecificity ¶ added in v0.40.0
func (v *KoanfProvider) ErrorHandlerFallbackSpecificity() []string
func (*KoanfProvider) ErrorHandlerIsEnabled ¶ added in v0.40.0
func (v *KoanfProvider) ErrorHandlerIsEnabled(id string) bool
func (*KoanfProvider) Get ¶ added in v0.40.0
func (v *KoanfProvider) Get(k Key) interface{}
func (*KoanfProvider) JSONWebKeyURLs ¶ added in v0.40.0
func (v *KoanfProvider) JSONWebKeyURLs() []string
func (*KoanfProvider) MutatorConfig ¶ added in v0.40.0
func (v *KoanfProvider) MutatorConfig(id string, override json.RawMessage, dest interface{}) error
func (*KoanfProvider) MutatorIsEnabled ¶ added in v0.40.0
func (v *KoanfProvider) MutatorIsEnabled(id string) bool
func (*KoanfProvider) ParseURLs ¶ added in v0.40.0
func (v *KoanfProvider) ParseURLs(sources []string) ([]url.URL, error)
func (*KoanfProvider) PipelineConfig ¶ added in v0.40.0
func (v *KoanfProvider) PipelineConfig(prefix, id string, override json.RawMessage, dest interface{}) error
func (*KoanfProvider) PrometheusCollapseRequestPaths ¶ added in v0.40.0
func (v *KoanfProvider) PrometheusCollapseRequestPaths() bool
func (*KoanfProvider) PrometheusHideRequestPaths ¶ added in v0.40.0
func (v *KoanfProvider) PrometheusHideRequestPaths() bool
func (*KoanfProvider) PrometheusMetricsNamePrefix ¶ added in v0.40.0
func (v *KoanfProvider) PrometheusMetricsNamePrefix() string
func (*KoanfProvider) PrometheusMetricsPath ¶ added in v0.40.0
func (v *KoanfProvider) PrometheusMetricsPath() string
func (*KoanfProvider) PrometheusServeAddress ¶ added in v0.40.0
func (v *KoanfProvider) PrometheusServeAddress() string
func (*KoanfProvider) ProxyIdleTimeout ¶ added in v0.40.0
func (v *KoanfProvider) ProxyIdleTimeout() time.Duration
func (*KoanfProvider) ProxyReadTimeout ¶ added in v0.40.0
func (v *KoanfProvider) ProxyReadTimeout() time.Duration
func (*KoanfProvider) ProxyServeAddress ¶ added in v0.40.0
func (v *KoanfProvider) ProxyServeAddress() string
func (*KoanfProvider) ProxyWriteTimeout ¶ added in v0.40.0
func (v *KoanfProvider) ProxyWriteTimeout() time.Duration
func (*KoanfProvider) RemoveWatcher ¶ added in v0.40.0
func (v *KoanfProvider) RemoveWatcher(id SubscriptionID)
RemoveWatcher removes the watcher with the given subscription ID.
func (*KoanfProvider) SetForTest ¶ added in v0.40.0
func (v *KoanfProvider) SetForTest(t testing.TB, key string, value interface{})
func (*KoanfProvider) Source ¶ added in v0.40.0
func (v *KoanfProvider) Source() *configx.Provider
func (*KoanfProvider) String ¶ added in v0.40.0
func (v *KoanfProvider) String(k Key) string
func (*KoanfProvider) TLSConfig ¶ added in v0.40.0
func (v *KoanfProvider) TLSConfig(daemon string) *TLSConfig
func (*KoanfProvider) ToScopeStrategy ¶ added in v0.40.0
func (v *KoanfProvider) ToScopeStrategy(value string, key string) fosite.ScopeStrategy
func (*KoanfProvider) TracingJaegerConfig ¶ added in v0.40.0
func (v *KoanfProvider) TracingJaegerConfig() *tracing.JaegerConfig
func (*KoanfProvider) TracingProvider ¶ added in v0.40.0
func (v *KoanfProvider) TracingProvider() string
func (*KoanfProvider) TracingServiceName ¶ added in v0.40.0
func (v *KoanfProvider) TracingServiceName() string
func (*KoanfProvider) TracingZipkinConfig ¶ added in v0.40.0
func (v *KoanfProvider) TracingZipkinConfig() *tracing.ZipkinConfig
type MatchingStrategy ¶
type MatchingStrategy string
MatchingStrategy defines matching strategy such as Regexp or Glob. Empty string defaults to "regexp".
const ( Regexp MatchingStrategy = "regexp" Glob MatchingStrategy = "glob" DefaultMatchingStrategy = Regexp )
Possible matching strategies.
type Provider ¶
type Provider interface { Get(k Key) interface{} String(k Key) string AllSettings() map[string]interface{} Source() *configx.Provider AddWatcher(cb callback) SubscriptionID RemoveWatcher(id SubscriptionID) CORSEnabled(iface string) bool CORSOptions(iface string) cors.Options CORS(iface string) (cors.Options, bool) ProviderAuthenticators ProviderErrorHandlers ProviderAuthorizers ProviderMutators ProxyReadTimeout() time.Duration ProxyWriteTimeout() time.Duration ProxyIdleTimeout() time.Duration APIReadTimeout() time.Duration APIWriteTimeout() time.Duration APIIdleTimeout() time.Duration AccessRuleRepositories() []url.URL AccessRuleMatchingStrategy() MatchingStrategy ProxyServeAddress() string APIServeAddress() string PrometheusServeAddress() string PrometheusMetricsPath() string PrometheusMetricsNamePrefix() string PrometheusHideRequestPaths() bool PrometheusCollapseRequestPaths() bool ToScopeStrategy(value string, key string) fosite.ScopeStrategy ParseURLs(sources []string) ([]url.URL, error) JSONWebKeyURLs() []string TracingServiceName() string TracingProvider() string TracingJaegerConfig() *tracing.JaegerConfig TracingZipkinConfig() *tracing.ZipkinConfig TLSConfig(daemon string) *TLSConfig SetForTest(t testing.TB, key string, value interface{}) }
type ProviderAuthenticators ¶
type ProviderAuthorizers ¶
type ProviderErrorHandlers ¶
type ProviderMutators ¶
type SubscriptionID ¶ added in v0.40.0
Click to show internal directories.
Click to hide internal directories.