oathkeeper: github.com/ory/oathkeeper/driver/configuration Index | Files

package configuration

import "github.com/ory/oathkeeper/driver/configuration"

Index

Package Files

provider.go provider_viper.go

Constants

const (
    ViperKeyProxyReadTimeout           = "serve.proxy.timeout.read"
    ViperKeyProxyWriteTimeout          = "serve.proxy.timeout.write"
    ViperKeyProxyIdleTimeout           = "serve.proxy.timeout.idle"
    ViperKeyProxyServeAddressHost      = "serve.proxy.host"
    ViperKeyProxyServeAddressPort      = "serve.proxy.port"
    ViperKeyAPIServeAddressHost        = "serve.api.host"
    ViperKeyAPIServeAddressPort        = "serve.api.port"
    ViperKeyAccessRuleRepositories     = "access_rules.repositories"
    ViperKeyAccessRuleMatchingStrategy = "access_rules.matching_strategy"
)
const (
    ViperKeyAuthorizerAllowIsEnabled = "authorizers.allow.enabled"

    ViperKeyAuthorizerDenyIsEnabled = "authorizers.deny.enabled"

    ViperKeyAuthorizerKetoEngineACPORYIsEnabled = "authorizers.keto_engine_acp_ory.enabled"

    ViperKeyAuthorizerRemoteJSONIsEnabled = "authorizers.remote_json.enabled"
)

Authorizers

const (
    ViperKeyMutatorCookieIsEnabled = "mutators.cookie.enabled"

    ViperKeyMutatorHeaderIsEnabled = "mutators.header.enabled"

    ViperKeyMutatorNoopIsEnabled = "mutators.noop.enabled"

    ViperKeyMutatorHydratorIsEnabled = "mutators.hydrator.enabled"

    ViperKeyMutatorIDTokenIsEnabled = "mutators.id_token.enabled"
    ViperKeyMutatorIDTokenJWKSURL   = "mutators.id_token.config.jwks_url"
)

Mutators

const (
    // anonymous
    ViperKeyAuthenticatorAnonymousIsEnabled = "authenticators.anonymous.enabled"

    // noop
    ViperKeyAuthenticatorNoopIsEnabled = "authenticators.noop.enabled"

    // cookie session
    ViperKeyAuthenticatorCookieSessionIsEnabled = "authenticators.cookie_session.enabled"

    // jwt
    ViperKeyAuthenticatorJWTIsEnabled = "authenticators.jwt.enabled"

    // oauth2_client_credentials
    ViperKeyAuthenticatorOAuth2ClientCredentialsIsEnabled = "authenticators.oauth2_client_credentials.enabled"

    // oauth2_token_introspection
    ViperKeyAuthenticatorOAuth2TokenIntrospectionIsEnabled = "authenticators.oauth2_introspection.enabled"

    // unauthorized
    ViperKeyAuthenticatorUnauthorizedIsEnabled = "authenticators.unauthorized.enabled"
)

Authenticators

const (
    ViperKeyErrors                         = "errors.handlers"
    ViperKeyErrorsFallback                 = "errors.fallback"
    ViperKeyErrorsJSONIsEnabled            = ViperKeyErrors + ".json.enabled"
    ViperKeyErrorsRedirectIsEnabled        = ViperKeyErrors + ".redirect.enabled"
    ViperKeyErrorsWWWAuthenticateIsEnabled = ViperKeyErrors + ".www_authenticate.enabled"
)

Errors

const (
    ForbiddenStrategyErrorType = "forbidden"
)

func MustValidate Uses

func MustValidate(l logrus.FieldLogger, p Provider)

type MatchingStrategy Uses

type MatchingStrategy string

MatchingStrategy defines matching strategy such as Regexp or Glob. Empty string defaults to "regexp".

const (
    Regexp MatchingStrategy = "regexp"
    Glob   MatchingStrategy = "glob"
)

Possible matching strategies.

type Provider Uses

type Provider interface {
    CORSEnabled(iface string) bool
    CORSOptions(iface string) cors.Options

    ProviderAuthenticators
    ProviderErrorHandlers
    ProviderAuthorizers
    ProviderMutators

    ProxyReadTimeout() time.Duration
    ProxyWriteTimeout() time.Duration
    ProxyIdleTimeout() time.Duration

    AccessRuleRepositories() []url.URL
    AccessRuleMatchingStrategy() MatchingStrategy

    ProxyServeAddress() string
    APIServeAddress() string

    ToScopeStrategy(value string, key string) fosite.ScopeStrategy
    ParseURLs(sources []string) ([]url.URL, error)
    JSONWebKeyURLs() []string

    TracingServiceName() string
    TracingProvider() string
    TracingJaegerConfig() *tracing.JaegerConfig
}

type ProviderAuthenticators Uses

type ProviderAuthenticators interface {
    AuthenticatorConfig(id string, overrides json.RawMessage, destination interface{}) error
    AuthenticatorIsEnabled(id string) bool
}

type ProviderAuthorizers Uses

type ProviderAuthorizers interface {
    AuthorizerConfig(id string, overrides json.RawMessage, destination interface{}) error
    AuthorizerIsEnabled(id string) bool
}

type ProviderErrorHandlers Uses

type ProviderErrorHandlers interface {
    ErrorHandlerConfig(id string, override json.RawMessage, dest interface{}) error
    ErrorHandlerIsEnabled(id string) bool
    ErrorHandlerFallbackSpecificity() []string
}

type ProviderMutators Uses

type ProviderMutators interface {
    MutatorConfig(id string, overrides json.RawMessage, destination interface{}) error
    MutatorIsEnabled(id string) bool
}

type ViperProvider Uses

type ViperProvider struct {
    // contains filtered or unexported fields
}

func NewViperProvider Uses

func NewViperProvider(l logrus.FieldLogger) *ViperProvider

func (*ViperProvider) APIServeAddress Uses

func (v *ViperProvider) APIServeAddress() string

func (*ViperProvider) AccessRuleMatchingStrategy Uses

func (v *ViperProvider) AccessRuleMatchingStrategy() MatchingStrategy

AccessRuleMatchingStrategy returns current MatchingStrategy.

func (*ViperProvider) AccessRuleRepositories Uses

func (v *ViperProvider) AccessRuleRepositories() []url.URL

func (*ViperProvider) AuthenticatorConfig Uses

func (v *ViperProvider) AuthenticatorConfig(id string, override json.RawMessage, dest interface{}) error

func (*ViperProvider) AuthenticatorIsEnabled Uses

func (v *ViperProvider) AuthenticatorIsEnabled(id string) bool

func (*ViperProvider) AuthorizerConfig Uses

func (v *ViperProvider) AuthorizerConfig(id string, override json.RawMessage, dest interface{}) error

func (*ViperProvider) AuthorizerIsEnabled Uses

func (v *ViperProvider) AuthorizerIsEnabled(id string) bool

func (*ViperProvider) CORSEnabled Uses

func (v *ViperProvider) CORSEnabled(iface string) bool

func (*ViperProvider) CORSOptions Uses

func (v *ViperProvider) CORSOptions(iface string) cors.Options

func (*ViperProvider) ErrorHandlerConfig Uses

func (v *ViperProvider) ErrorHandlerConfig(id string, override json.RawMessage, dest interface{}) error

func (*ViperProvider) ErrorHandlerFallbackSpecificity Uses

func (v *ViperProvider) ErrorHandlerFallbackSpecificity() []string

func (*ViperProvider) ErrorHandlerIsEnabled Uses

func (v *ViperProvider) ErrorHandlerIsEnabled(id string) bool

func (*ViperProvider) JSONWebKeyURLs Uses

func (v *ViperProvider) JSONWebKeyURLs() []string

func (*ViperProvider) MutatorConfig Uses

func (v *ViperProvider) MutatorConfig(id string, override json.RawMessage, dest interface{}) error

func (*ViperProvider) MutatorIsEnabled Uses

func (v *ViperProvider) MutatorIsEnabled(id string) bool

func (*ViperProvider) ParseURLs Uses

func (v *ViperProvider) ParseURLs(sources []string) ([]url.URL, error)

func (*ViperProvider) PipelineConfig Uses

func (v *ViperProvider) PipelineConfig(prefix, id string, override json.RawMessage, dest interface{}) error

func (*ViperProvider) ProxyIdleTimeout Uses

func (v *ViperProvider) ProxyIdleTimeout() time.Duration

func (*ViperProvider) ProxyReadTimeout Uses

func (v *ViperProvider) ProxyReadTimeout() time.Duration

func (*ViperProvider) ProxyServeAddress Uses

func (v *ViperProvider) ProxyServeAddress() string

func (*ViperProvider) ProxyWriteTimeout Uses

func (v *ViperProvider) ProxyWriteTimeout() time.Duration

func (*ViperProvider) ToScopeStrategy Uses

func (v *ViperProvider) ToScopeStrategy(value string, key string) fosite.ScopeStrategy

func (*ViperProvider) TracingJaegerConfig Uses

func (v *ViperProvider) TracingJaegerConfig() *tracing.JaegerConfig

func (*ViperProvider) TracingProvider Uses

func (v *ViperProvider) TracingProvider() string

func (*ViperProvider) TracingServiceName Uses

func (v *ViperProvider) TracingServiceName() string

Package configuration imports 23 packages (graph) and is imported by 11 packages. Updated 2020-04-07. Refresh now. Tools for package owners.