Documentation ¶
Index ¶
- Constants
- Variables
- func WrapResponses(responses map[*ResponseConfig]interface{}) (responseHeaders map[string]string, responseMetadata map[string]interface{})
- type AuthConfig
- type AuthorizationConfig
- func (config *AuthorizationConfig) Call(pipeline auth.AuthPipeline, ctx context.Context) (interface{}, error)
- func (config *AuthorizationConfig) Clean(ctx context.Context) error
- func (config *AuthorizationConfig) GetAuthConfigEvaluator() auth.AuthConfigEvaluator
- func (config *AuthorizationConfig) GetConditions() []json.JSONPatternMatchingRule
- func (config *AuthorizationConfig) GetName() string
- func (config *AuthorizationConfig) GetPriority() int
- func (config *AuthorizationConfig) GetType() string
- func (config *AuthorizationConfig) MetricsEnabled() bool
- type DenyWith
- type DenyWithValues
- type EvaluatorCache
- type IdentityConfig
- func (config *IdentityConfig) AddK8sSecretBasedIdentity(ctx context.Context, new v1.Secret)
- func (config *IdentityConfig) Call(pipeline auth.AuthPipeline, ctx context.Context) (interface{}, error)
- func (config *IdentityConfig) Clean(ctx context.Context) error
- func (config *IdentityConfig) GetAuthConfigEvaluator() auth.AuthConfigEvaluator
- func (config *IdentityConfig) GetAuthCredentials() auth.AuthCredentials
- func (config *IdentityConfig) GetConditions() []json.JSONPatternMatchingRule
- func (config *IdentityConfig) GetK8sSecretLabelSelectors() map[string]string
- func (config *IdentityConfig) GetName() string
- func (config *IdentityConfig) GetOIDC() interface{}
- func (config *IdentityConfig) GetPriority() int
- func (config *IdentityConfig) GetType() string
- func (config *IdentityConfig) MetricsEnabled() bool
- func (config *IdentityConfig) ResolveExtendedProperties(pipeline auth.AuthPipeline) (interface{}, error)
- func (config *IdentityConfig) RevokeK8sSecretBasedIdentity(ctx context.Context, deleted types.NamespacedName)
- type MetadataConfig
- func (config *MetadataConfig) Call(pipeline auth.AuthPipeline, ctx context.Context) (interface{}, error)
- func (config *MetadataConfig) Clean(_ context.Context) error
- func (config *MetadataConfig) GetAuthConfigEvaluator() auth.AuthConfigEvaluator
- func (config *MetadataConfig) GetConditions() []json.JSONPatternMatchingRule
- func (config *MetadataConfig) GetName() string
- func (config *MetadataConfig) GetPriority() int
- func (config *MetadataConfig) GetType() string
- func (config *MetadataConfig) MetricsEnabled() bool
- type ResponseConfig
- func (config *ResponseConfig) Call(pipeline auth.AuthPipeline, ctx context.Context) (interface{}, error)
- func (config *ResponseConfig) GetAuthConfigEvaluator() auth.AuthConfigEvaluator
- func (config *ResponseConfig) GetConditions() []json.JSONPatternMatchingRule
- func (config *ResponseConfig) GetName() string
- func (config *ResponseConfig) GetPriority() int
- func (config *ResponseConfig) GetType() string
- func (config *ResponseConfig) GetWristbandIssuer() auth.WristbandIssuer
- func (config *ResponseConfig) MetricsEnabled() bool
Constants ¶
View Source
const ( HTTP_HEADER_WRAPPER = "httpHeader" ENVOY_DYNAMIC_METADATA_WRAPPER = "envoyDynamicMetadata" DEFAULT_WRAPPER = HTTP_HEADER_WRAPPER )
Variables ¶
View Source
var EvaluatorCacheSize int // in megabytes
Functions ¶
func WrapResponses ¶
func WrapResponses(responses map[*ResponseConfig]interface{}) (responseHeaders map[string]string, responseMetadata map[string]interface{})
Types ¶
type AuthConfig ¶
type AuthConfig struct { Labels map[string]string Conditions []json.JSONPatternMatchingRule `yaml:"conditions"` IdentityConfigs []auth.AuthConfigEvaluator `yaml:"identity,omitempty"` MetadataConfigs []auth.AuthConfigEvaluator `yaml:"metadata,omitempty"` AuthorizationConfigs []auth.AuthConfigEvaluator `yaml:"authorization,omitempty"` ResponseConfigs []auth.AuthConfigEvaluator `yaml:"response,omitempty"` DenyWith }
AuthConfig holds the static configuration to be evaluated in the auth pipeline
func (*AuthConfig) GetChallengeHeaders ¶
func (config *AuthConfig) GetChallengeHeaders() []map[string]string
type AuthorizationConfig ¶
type AuthorizationConfig struct { Name string `yaml:"name"` Priority int `yaml:"priority"` Conditions []json.JSONPatternMatchingRule `yaml:"conditions"` Metrics bool `yaml:"metrics"` Cache EvaluatorCache OPA *authorization.OPA `yaml:"opa,omitempty"` JSON *authorization.JSONPatternMatching `yaml:"json,omitempty"` KubernetesAuthz *authorization.KubernetesAuthz `yaml:"kubernetes,omitempty"` }
func (*AuthorizationConfig) Call ¶
func (config *AuthorizationConfig) Call(pipeline auth.AuthPipeline, ctx context.Context) (interface{}, error)
func (*AuthorizationConfig) Clean ¶
func (config *AuthorizationConfig) Clean(ctx context.Context) error
func (*AuthorizationConfig) GetAuthConfigEvaluator ¶
func (config *AuthorizationConfig) GetAuthConfigEvaluator() auth.AuthConfigEvaluator
func (*AuthorizationConfig) GetConditions ¶
func (config *AuthorizationConfig) GetConditions() []json.JSONPatternMatchingRule
func (*AuthorizationConfig) GetName ¶
func (config *AuthorizationConfig) GetName() string
func (*AuthorizationConfig) GetPriority ¶
func (config *AuthorizationConfig) GetPriority() int
func (*AuthorizationConfig) GetType ¶
func (config *AuthorizationConfig) GetType() string
func (*AuthorizationConfig) MetricsEnabled ¶
func (config *AuthorizationConfig) MetricsEnabled() bool
type DenyWith ¶
type DenyWith struct { Unauthenticated *DenyWithValues }
type DenyWithValues ¶
type EvaluatorCache ¶
type EvaluatorCache interface { Get(key interface{}) (interface{}, error) Set(key, value interface{}) error ResolveKeyFor(authJSON string) interface{} Shutdown() error }
func NewEvaluatorCache ¶
func NewEvaluatorCache(keyTemplate json.JSONValue, ttl int) EvaluatorCache
type IdentityConfig ¶
type IdentityConfig struct { Name string `yaml:"name"` Priority int `yaml:"priority"` Conditions []json.JSONPatternMatchingRule `yaml:"conditions"` Metrics bool `yaml:"metrics"` Cache EvaluatorCache OAuth2 *identity.OAuth2 `yaml:"oauth2,omitempty"` OIDC *identity.OIDC `yaml:"oidc,omitempty"` MTLS *identity.MTLS `yaml:"mtls,omitempty"` HMAC *identity.HMAC `yaml:"hmac,omitempty"` APIKey *identity.APIKey `yaml:"apiKey,omitempty"` KubernetesAuth *identity.KubernetesAuth `yaml:"kubernetes,omitempty"` Plain *identity.Plain `yaml:"plain,omitempty"` Noop *identity.Noop `yaml:"noop,omitempty"` ExtendedProperties []json.JSONProperty `yaml:"extendedProperties"` }
func (*IdentityConfig) AddK8sSecretBasedIdentity ¶ added in v0.9.0
func (config *IdentityConfig) AddK8sSecretBasedIdentity(ctx context.Context, new v1.Secret)
func (*IdentityConfig) Call ¶
func (config *IdentityConfig) Call(pipeline auth.AuthPipeline, ctx context.Context) (interface{}, error)
func (*IdentityConfig) GetAuthConfigEvaluator ¶
func (config *IdentityConfig) GetAuthConfigEvaluator() auth.AuthConfigEvaluator
func (*IdentityConfig) GetAuthCredentials ¶
func (config *IdentityConfig) GetAuthCredentials() auth.AuthCredentials
func (*IdentityConfig) GetConditions ¶
func (config *IdentityConfig) GetConditions() []json.JSONPatternMatchingRule
func (*IdentityConfig) GetK8sSecretLabelSelectors ¶ added in v0.9.0
func (config *IdentityConfig) GetK8sSecretLabelSelectors() map[string]string
func (*IdentityConfig) GetName ¶
func (config *IdentityConfig) GetName() string
func (*IdentityConfig) GetOIDC ¶
func (config *IdentityConfig) GetOIDC() interface{}
func (*IdentityConfig) GetPriority ¶
func (config *IdentityConfig) GetPriority() int
func (*IdentityConfig) GetType ¶
func (config *IdentityConfig) GetType() string
func (*IdentityConfig) MetricsEnabled ¶
func (config *IdentityConfig) MetricsEnabled() bool
func (*IdentityConfig) ResolveExtendedProperties ¶
func (config *IdentityConfig) ResolveExtendedProperties(pipeline auth.AuthPipeline) (interface{}, error)
func (*IdentityConfig) RevokeK8sSecretBasedIdentity ¶ added in v0.9.0
func (config *IdentityConfig) RevokeK8sSecretBasedIdentity(ctx context.Context, deleted types.NamespacedName)
type MetadataConfig ¶
type MetadataConfig struct { Name string `yaml:"name"` Priority int `yaml:"priority"` Conditions []json.JSONPatternMatchingRule `yaml:"conditions"` Metrics bool `yaml:"metrics"` Cache EvaluatorCache UserInfo *metadata.UserInfo `yaml:"userinfo,omitempty"` UMA *metadata.UMA `yaml:"uma,omitempty"` GenericHTTP *metadata.GenericHttp `yaml:"http,omitempty"` }
func (*MetadataConfig) Call ¶
func (config *MetadataConfig) Call(pipeline auth.AuthPipeline, ctx context.Context) (interface{}, error)
func (*MetadataConfig) GetAuthConfigEvaluator ¶
func (config *MetadataConfig) GetAuthConfigEvaluator() auth.AuthConfigEvaluator
func (*MetadataConfig) GetConditions ¶
func (config *MetadataConfig) GetConditions() []json.JSONPatternMatchingRule
func (*MetadataConfig) GetName ¶
func (config *MetadataConfig) GetName() string
func (*MetadataConfig) GetPriority ¶
func (config *MetadataConfig) GetPriority() int
func (*MetadataConfig) GetType ¶
func (config *MetadataConfig) GetType() string
func (*MetadataConfig) MetricsEnabled ¶
func (config *MetadataConfig) MetricsEnabled() bool
type ResponseConfig ¶
type ResponseConfig struct { Name string `yaml:"name"` Priority int `yaml:"priority"` Conditions []json.JSONPatternMatchingRule `yaml:"conditions"` Wrapper string `yaml:"wrapper"` WrapperKey string `yaml:"wrapperKey"` Metrics bool `yaml:"metrics"` Cache EvaluatorCache Wristband auth.WristbandIssuer `yaml:"wristband,omitempty"` DynamicJSON *response.DynamicJSON `yaml:"json,omitempty"` }
func NewResponseConfig ¶
func NewResponseConfig(name string, priority int, conditions []json.JSONPatternMatchingRule, wrapper string, wrapperKey string, metricsEnabled bool) *ResponseConfig
func (*ResponseConfig) Call ¶
func (config *ResponseConfig) Call(pipeline auth.AuthPipeline, ctx context.Context) (interface{}, error)
func (*ResponseConfig) GetAuthConfigEvaluator ¶
func (config *ResponseConfig) GetAuthConfigEvaluator() auth.AuthConfigEvaluator
func (*ResponseConfig) GetConditions ¶
func (config *ResponseConfig) GetConditions() []json.JSONPatternMatchingRule
func (*ResponseConfig) GetName ¶
func (config *ResponseConfig) GetName() string
func (*ResponseConfig) GetPriority ¶
func (config *ResponseConfig) GetPriority() int
func (*ResponseConfig) GetType ¶
func (config *ResponseConfig) GetType() string
func (*ResponseConfig) GetWristbandIssuer ¶
func (config *ResponseConfig) GetWristbandIssuer() auth.WristbandIssuer
func (*ResponseConfig) MetricsEnabled ¶
func (config *ResponseConfig) MetricsEnabled() bool
Source Files ¶
Click to show internal directories.
Click to hide internal directories.