config

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RESPONSE_WRISTBAND    = "RESPONSE_WRISTBAND"
	RESPONSE_DYNAMIC_JSON = "RESPONSE_DYNAMIC_JSON"

	HTTP_HEADER_WRAPPER            = "httpHeader"
	ENVOY_DYNAMIC_METADATA_WRAPPER = "envoyDynamicMetadata"

	DEFAULT_WRAPPER = HTTP_HEADER_WRAPPER
)

Variables

View Source
var (
	// AuthorizationEvaluator represents the authorizationConfig struct implementing its Call method
	AuthorizationEvaluator common.AuthConfigEvaluator
)
View Source
var (
	// IdentityEvaluator represents the identityConfig struct implementing its Call method
	IdentityEvaluator common.AuthConfigEvaluator
)
View Source
var (
	// MetadataEvaluator represents the metadataStruct implementing its Call method
	MetadataEvaluator common.AuthConfigEvaluator
)

Functions

func WrapResponses added in v0.4.0

func WrapResponses(responses map[*ResponseConfig]interface{}) (responseHeaders map[string]string, responseMetadata map[string]interface{})

Types

type APIConfig

type APIConfig struct {
	IdentityConfigs      []common.AuthConfigEvaluator `yaml:"identity,omitempty"`
	MetadataConfigs      []common.AuthConfigEvaluator `yaml:"metadata,omitempty"`
	AuthorizationConfigs []common.AuthConfigEvaluator `yaml:"authorization,omitempty"`
	ResponseConfigs      []common.AuthConfigEvaluator `yaml:"response,omitempty"`
}

APIConfig holds the static configuration to be evaluated in the auth pipeline

func (*APIConfig) GetChallengeHeaders

func (config *APIConfig) GetChallengeHeaders() []map[string]string

type AuthorizationConfig

type AuthorizationConfig struct {
	Name string                             `yaml:"name"`
	OPA  *authorization.OPA                 `yaml:"opa,omitempty"`
	JSON *authorization.JSONPatternMatching `yaml:"json,omitempty"`
}

func (*AuthorizationConfig) Call

func (config *AuthorizationConfig) Call(pipeline common.AuthPipeline, ctx context.Context) (interface{}, error)

type IdentityConfig

type IdentityConfig struct {
	Name               string                `yaml:"name"`
	ExtendedProperties []common.JSONProperty `yaml:"extendedProperties"`

	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"`
}

func (*IdentityConfig) Call

func (config *IdentityConfig) Call(pipeline common.AuthPipeline, ctx context.Context) (interface{}, error)

func (*IdentityConfig) FindSecretByName

func (config *IdentityConfig) FindSecretByName(lookup types.NamespacedName) *v1.Secret

func (*IdentityConfig) GetAuthConfigEvaluator

func (config *IdentityConfig) GetAuthConfigEvaluator() common.AuthConfigEvaluator

func (*IdentityConfig) GetAuthCredentials

func (config *IdentityConfig) GetAuthCredentials() auth_credentials.AuthCredentials

func (*IdentityConfig) GetOIDC

func (config *IdentityConfig) GetOIDC() interface{}

func (*IdentityConfig) ResolveExtendedProperties added in v0.4.0

func (config *IdentityConfig) ResolveExtendedProperties(pipeline common.AuthPipeline) (interface{}, error)

type MetadataConfig

type MetadataConfig struct {
	Name        string                `yaml:"name"`
	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 common.AuthPipeline, ctx context.Context) (interface{}, error)

func (*MetadataConfig) GetName

func (config *MetadataConfig) GetName() string

func (*MetadataConfig) GetType

func (config *MetadataConfig) GetType() (string, error)

type ResponseConfig added in v0.4.0

type ResponseConfig struct {
	Name       string `yaml:"name"`
	Wrapper    string `yaml:"wrapper"`
	WrapperKey string `yaml:"wrapperKey"`

	Wristband   common.WristbandIssuer `yaml:"wristband,omitempty"`
	DynamicJSON *response.DynamicJSON  `yaml:"json,omitempty"`
}

func NewResponseConfig added in v0.4.0

func NewResponseConfig(name string, wrapper string, wrapperKey string) *ResponseConfig

func (*ResponseConfig) Call added in v0.4.0

func (config *ResponseConfig) Call(pipeline common.AuthPipeline, ctx context.Context) (interface{}, error)

func (*ResponseConfig) GetAuthConfigEvaluator added in v0.4.0

func (config *ResponseConfig) GetAuthConfigEvaluator() common.AuthConfigEvaluator

func (*ResponseConfig) GetName added in v0.4.0

func (config *ResponseConfig) GetName() string

func (*ResponseConfig) GetType added in v0.4.0

func (config *ResponseConfig) GetType() (string, error)

func (*ResponseConfig) GetWristbandIssuer added in v0.4.0

func (config *ResponseConfig) GetWristbandIssuer() common.WristbandIssuer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL