filters

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2020 License: Apache-2.0, BSD-3-Clause, MIT Imports: 17 Imported by: 3

Documentation

Index

Constants

View Source
const BearerAuthnFilterName string = "BearerAuthnFilter"

BearerAuthnFilterName is the name of the bearer authentication filter

View Source
const (
	CheckBrokerCredentialsFilterName = "CheckBrokerCredentialsFilter"
)
View Source
const (
	// CriteriaFilterName is the name of the criteria filter
	CriteriaFilterName = "CriteriaFilter"
)
View Source
const LabelCriteriaFilterNameSuffix = "CriteriaFilter"
View Source
const LabelName = "Tenant"

sm-dev adopt and add new config properties in the dev en

View Source
const (
	// LoggingFilterName is the name of the logging filter
	LoggingFilterName = "LoggingFilter"
)
View Source
const PatchOnlyLabelsFilterName = "PatchOnlyLabelsFilter"
View Source
const PlanVisibilityFilterName = "PlanFilterByVisibility"
View Source
const PlatformAwareVisibilityFilterName = "PlatformAwareVisibilityFilter"
View Source
const (
	PlatformIDInstanceValidationFilterName = "PlatformIDInstanceValidationFilter"
)
View Source
const ProtectedLabelsFilterName = "ProtectedLabelsFilter"
View Source
const ProtectedSMPlatformFilterName = "ProtectedSMPlatformFilter"
View Source
const ResourceLabelingFilterNameSuffix = "LabelingFilter"
View Source
const ServiceBindingStripFilterName = "ServiceBindingStripFilter"
View Source
const ServiceBindingVisibilityFilterName = "ServiceBindingVisibilityFilter"
View Source
const ServiceInstanceStripFilterName = "ServiceInstanceStripFilter"
View Source
const ServiceInstanceTransferFilterName = "ServiceInstanceTransferFilter"
View Source
const ServiceInstanceVisibilityFilterName = "ServiceInstanceVisibilityFilter"
View Source
const ServicesVisibilityFilterName = "ServicesFilterByVisibility"
View Source
const (
	SupportedEncodingsFilterName = "SupportedEncodingsFilter"
)

Variables

This section is empty.

Functions

func NewLabelingFilters added in v0.13.0

func NewLabelingFilters(labelName, labelKey string, basePaths []string, extractValueFunc func(request *web.Request) (string, error)) []web.Filter

NewLabelingFilters returns set of filters which applies resource labeling rules

func NewMultitenancyFilters added in v0.4.1

func NewMultitenancyFilters(labelKey string, extractTenantFunc func(request *web.Request) (string, error)) ([]web.Filter, error)

NewMultitenancyFilters returns set of filters which applies multitenancy rules

func NewOIDCAuthnFilter added in v0.3.3

func NewOIDCAuthnFilter(ctx context.Context, tokenIssuer, clientID string) (*filters.AuthenticationFilter, error)

NewOIDCAuthnFilter returns a web.Filter for Bearer authentication

func NewRecoveryMiddleware

func NewRecoveryMiddleware() mux.MiddlewareFunc

NewRecoveryMiddleware returns a standard mux middleware that provides panic recovery

func NewServiceBindingVisibilityFilter added in v0.10.0

func NewServiceBindingVisibilityFilter(repository storage.Repository, tenantIdentifier string) *serviceBindingVisibilityFilter

NewServiceBindingVisibilityFilter creates a new serviceInstanceVisibilityFilter filter

func NewServiceInstanceTransferFilter added in v0.13.0

func NewServiceInstanceTransferFilter(repository storage.Repository, enableInstanceTransfer bool) *serviceInstanceTransferFilter

func NewServiceInstanceVisibilityFilter added in v0.10.0

func NewServiceInstanceVisibilityFilter(repository storage.Repository, getInstanceVisibilityMetadata func(req *web.Request, repository storage.Repository) (*InstanceVisibilityMetadata, error)) *serviceInstanceVisibilityFilter

NewServiceInstanceVisibilityFilter creates a new serviceInstanceVisibilityFilter filter

func TenantLabelingFilterName added in v0.4.1

func TenantLabelingFilterName() string

TenantLabelingFilterName returns the name of the filter that is adding the tenant label to tenant-scoped resources

Types

type CheckBrokerCredentialsFilter added in v0.9.10

type CheckBrokerCredentialsFilter struct {
}

CheckBrokerCredentialsFilter checks patch request for the broker basic credentials

func (*CheckBrokerCredentialsFilter) FilterMatchers added in v0.9.10

func (*CheckBrokerCredentialsFilter) FilterMatchers() []web.FilterMatcher

func (*CheckBrokerCredentialsFilter) Name added in v0.9.10

func (*CheckBrokerCredentialsFilter) Run added in v0.9.10

type InstanceVisibilityMetadata added in v0.11.0

type InstanceVisibilityMetadata struct {
	PlatformID   string
	PlatformType string
	LabelKey     string
	LabelValue   string
}

InstanceVisibilityMetadata contains metadata required for visibility checks during instance creation

type LabelingFilter added in v0.13.0

type LabelingFilter struct {
	// LabelKey is the key of the label
	LabelKey     string
	ExtractValue func(request *web.Request) (string, error)
	LabelingFunc func(request *web.Request, labelKey, labelValue string) error

	FilterName string
	BasePaths  []string
	Methods    []string
}

LabelingFilter applies labeling on the resources based on extracted values

func (*LabelingFilter) FilterMatchers added in v0.13.0

func (f *LabelingFilter) FilterMatchers() []web.FilterMatcher

FilterMatchers implements web.Filter.FilterMatchers and specifies that the filter should run on configured method

func (*LabelingFilter) Name added in v0.13.0

func (f *LabelingFilter) Name() string

Name implements web.Named and returns the filter name

func (*LabelingFilter) Run added in v0.13.0

func (f *LabelingFilter) Run(request *web.Request, next web.Handler) (*web.Response, error)

Run implements web.Middleware and attempts to extract label value and apply labeling function

type Logging

type Logging struct {
}

Logging is filter that configures logging per request.

func (*Logging) FilterMatchers

func (*Logging) FilterMatchers() []web.FilterMatcher

FilterMatchers implements the web.Filter interface and returns the conditions on which the filter should be executed.

func (*Logging) Name

func (*Logging) Name() string

Name implements the web.Filter interface and returns the identifier of the filter.

func (*Logging) Run

func (l *Logging) Run(req *web.Request, next web.Handler) (*web.Response, error)

Run represents the logging middleware function that processes the request and configures the request-scoped logging.

type PatchOnlyLabelsFilter added in v0.3.3

type PatchOnlyLabelsFilter struct {
}

PatchOnlyLabelsFilter checks patch request for service offerings and plans include only label changes

func (*PatchOnlyLabelsFilter) FilterMatchers added in v0.3.3

func (*PatchOnlyLabelsFilter) FilterMatchers() []web.FilterMatcher

func (*PatchOnlyLabelsFilter) Name added in v0.3.3

func (*PatchOnlyLabelsFilter) Name() string

func (*PatchOnlyLabelsFilter) Run added in v0.3.3

type PlanFilterByVisibility added in v0.6.0

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

func NewPlansFilterByVisibility added in v0.6.0

func NewPlansFilterByVisibility(repository storage.Repository) *PlanFilterByVisibility

func (*PlanFilterByVisibility) FilterMatchers added in v0.6.0

func (vf *PlanFilterByVisibility) FilterMatchers() []web.FilterMatcher

func (*PlanFilterByVisibility) Name added in v0.6.0

func (vf *PlanFilterByVisibility) Name() string

func (PlanFilterByVisibility) Run added in v0.6.0

func (m PlanFilterByVisibility) Run(req *web.Request, next web.Handler) (*web.Response, error)

type PlatformAwareVisibilityFilter added in v0.2.0

type PlatformAwareVisibilityFilter struct {
}

func (*PlatformAwareVisibilityFilter) FilterMatchers added in v0.2.0

func (*PlatformAwareVisibilityFilter) FilterMatchers() []web.FilterMatcher

func (*PlatformAwareVisibilityFilter) Name added in v0.2.0

func (*PlatformAwareVisibilityFilter) Run added in v0.2.0

type PlatformIDInstanceValidationFilter added in v0.13.0

type PlatformIDInstanceValidationFilter struct {
}

PlatformIDInstanceValidationFilter ensures that if a platform is provided for provisioning request that it's the SM Platform. It also limits Patch and Delete requests to instances created in the SM platform. In addition PATCH requests that transfer instances to SM platform are also allowed.

func (*PlatformIDInstanceValidationFilter) FilterMatchers added in v0.13.0

func (*PlatformIDInstanceValidationFilter) Name added in v0.13.0

func (*PlatformIDInstanceValidationFilter) Run added in v0.13.0

type ProtectedLabelsFilter added in v0.4.1

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

ProtectedLabelsFilter checks for forbidden labels being modified/added

func NewProtectedLabelsFilter added in v0.4.1

func NewProtectedLabelsFilter(forbiddenLabels []string) *ProtectedLabelsFilter

NewProtectedLabelsFilter creates new filter for forbidden labels

func (*ProtectedLabelsFilter) FilterMatchers added in v0.4.1

func (flo *ProtectedLabelsFilter) FilterMatchers() []web.FilterMatcher

func (*ProtectedLabelsFilter) Name added in v0.4.1

func (flo *ProtectedLabelsFilter) Name() string

func (*ProtectedLabelsFilter) Run added in v0.4.1

func (flo *ProtectedLabelsFilter) Run(req *web.Request, next web.Handler) (*web.Response, error)

type ProtectedSMPlatformFilter added in v0.10.0

type ProtectedSMPlatformFilter struct {
}

ProtectedSMPlatformFilter disallows patching and deleting of the service manager platform

func (*ProtectedSMPlatformFilter) FilterMatchers added in v0.10.0

func (f *ProtectedSMPlatformFilter) FilterMatchers() []web.FilterMatcher

func (*ProtectedSMPlatformFilter) Name added in v0.10.0

func (*ProtectedSMPlatformFilter) Run added in v0.10.0

type SelectionCriteria added in v0.1.8

type SelectionCriteria struct {
}

SelectionCriteria is filter that configures selection criteria per request.

func (*SelectionCriteria) FilterMatchers added in v0.1.8

func (*SelectionCriteria) FilterMatchers() []web.FilterMatcher

FilterMatchers implements the web.Filter interface and returns the conditions on which the filter should be executed.

func (*SelectionCriteria) Name added in v0.1.8

func (*SelectionCriteria) Name() string

Name implements the web.Filter interface and returns the identifier of the filter.

func (*SelectionCriteria) Run added in v0.1.8

func (l *SelectionCriteria) Run(req *web.Request, next web.Handler) (*web.Response, error)

Run represents the selection criteria middleware function that processes the request and configures the request-scoped selection criteria.

type ServiceBindingStripFilter added in v0.10.0

type ServiceBindingStripFilter struct {
}

ServiceBindingStripFilter checks post request body for unmodifiable properties

func (*ServiceBindingStripFilter) FilterMatchers added in v0.10.0

func (*ServiceBindingStripFilter) FilterMatchers() []web.FilterMatcher

func (*ServiceBindingStripFilter) Name added in v0.10.0

func (*ServiceBindingStripFilter) Run added in v0.10.0

type ServiceInstanceStripFilter added in v0.10.0

type ServiceInstanceStripFilter struct {
}

ServiceInstanceStripFilter checks post/patch request body for unmodifiable properties

func (*ServiceInstanceStripFilter) FilterMatchers added in v0.10.0

func (*ServiceInstanceStripFilter) FilterMatchers() []web.FilterMatcher

func (*ServiceInstanceStripFilter) Name added in v0.10.0

func (*ServiceInstanceStripFilter) Run added in v0.10.0

type ServicesFilterByVisibility added in v0.6.0

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

func NewServicesFilterByVisibility added in v0.6.0

func NewServicesFilterByVisibility(repository storage.Repository) *ServicesFilterByVisibility

func (*ServicesFilterByVisibility) FilterMatchers added in v0.6.0

func (vf *ServicesFilterByVisibility) FilterMatchers() []web.FilterMatcher

func (*ServicesFilterByVisibility) Name added in v0.6.0

func (ServicesFilterByVisibility) Run added in v0.6.0

func (m ServicesFilterByVisibility) Run(req *web.Request, next web.Handler) (*web.Response, error)

type SupportedEncodingsFilter added in v0.11.0

type SupportedEncodingsFilter struct {
}

func (*SupportedEncodingsFilter) FilterMatchers added in v0.11.0

func (*SupportedEncodingsFilter) FilterMatchers() []web.FilterMatcher

func (*SupportedEncodingsFilter) Name added in v0.11.0

func (*SupportedEncodingsFilter) Run added in v0.11.0

* Allow to proxy only SM supported osb encodings (Identity/none are currently allowed)

Jump to

Keyboard shortcuts

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