Documentation
¶
Index ¶
- Constants
- func NewBasicAuthnFilter(repository storage.Repository) *filters.AuthenticationFilter
- func NewMultitenancyFilters(labelKey string, extractTenantFunc func(request *web.Request) (string, error)) []web.Filter
- func NewOIDCAuthnFilter(ctx context.Context, tokenIssuer, clientID string) (*filters.AuthenticationFilter, error)
- func NewRecoveryMiddleware() mux.MiddlewareFunc
- type BasicAuthenticator
- type Logging
- type PatchOnlyLabelsFilter
- type PlanFilterByVisibility
- type PlatformAwareVisibilityFilter
- type ProtectedLabelsFilter
- type SelectionCriteria
- type ServicesFilterByVisibility
- type TenantFilter
Constants ¶
const BasicAuthnFilterName string = "BasicAuthnFilter"
const BearerAuthnFilterName string = "BearerAuthnFilter"
BearerAuthnFilterName is the name of the bearer authentication filter
const (
// CriteriaFilterName is the name of the criteria filter
CriteriaFilterName = "CriteriaFilter"
)
const (
// LoggingFilterName is the name of the logging filter
LoggingFilterName = "LoggingFilter"
)
const PatchOnlyLabelsFilterName = "PatchOnlyLabelsFilter"
const PlanVisibilityFilterName = "PlanFilterByVisibility"
const PlatformAwareVisibilityFilterName = "PlatformAwareVisibilityFilter"
const ProtectedLabelsFilterName = "ProtectedLabelsFilter"
const ServicesVisibilityFilterName = "ServicesFilterByVisibility"
const TenantCriteriaFilterName = "TenantCriteriaFilter"
sm-dev adopt and add new config properties in the dev en
const TenantLabelingFilterName = "TenantLabelingFilter"
Variables ¶
This section is empty.
Functions ¶
func NewBasicAuthnFilter ¶ added in v0.3.3
func NewBasicAuthnFilter(repository storage.Repository) *filters.AuthenticationFilter
func NewMultitenancyFilters ¶ added in v0.4.1
func NewMultitenancyFilters(labelKey string, extractTenantFunc func(request *web.Request) (string, error)) []web.Filter
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
Types ¶
type BasicAuthenticator ¶ added in v0.4.1
type BasicAuthenticator struct {
Repository storage.Repository
}
BasicAuthenticator for basic security
func (*BasicAuthenticator) Authenticate ¶ added in v0.4.1
func (a *BasicAuthenticator) Authenticate(request *http.Request) (*web.UserContext, httpsec.Decision, error)
Authenticate authenticates by using the provided Basic credentials
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.
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
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
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) Name() string
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
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.
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 (vf *ServicesFilterByVisibility) Name() string
type TenantFilter ¶ added in v0.4.1
type TenantFilter struct { // LabelKey is the key of the label, the value of which will be used to apply multitenancy rules LabelKey string ExtractTenant func(request *web.Request) (string, error) LabelingFunc func(request *web.Request, labelKey, labelValue string) error FilterName string Methods []string }
TenantFilter applies multitenancy labeling on the resources based on extracted tenant
func (*TenantFilter) FilterMatchers ¶ added in v0.4.1
func (f *TenantFilter) FilterMatchers() []web.FilterMatcher
FilterMatchers implements web.Filter.FilterMatchers and specifies that the filter should run on configured method
func (*TenantFilter) Name ¶ added in v0.4.1
func (f *TenantFilter) Name() string
Name implements web.Named and returns the filter name