handlers

package
v1.5.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2017 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthenticationHandlerFilter

func AuthenticationHandlerFilter(handler http.Handler, authenticator authenticator.Request, contextMapper kapi.RequestContextMapper) http.Handler

AuthenticationHandlerFilter creates a filter object that will enforce authentication directly

func AuthorizationFilter

func AuthorizationFilter(handler http.Handler, authorizer authorizer.Authorizer, authorizationAttributeBuilder authorizer.AuthorizationAttributeBuilder, contextMapper kapi.RequestContextMapper) http.Handler

AuthorizationFilter imposes normal authorization rules

func Forbidden

func Forbidden(reason string, attributes authorizer.Action, w http.ResponseWriter, req *http.Request)

Forbidden renders a simple forbidden error to the response

func ImpersonationFilter

func ImpersonationFilter(handler http.Handler, a authorizer.Authorizer, groupCache GroupCache, contextMapper kapi.RequestContextMapper) http.Handler

ImpersonationFilter checks for impersonation rules against the current user.

func NewBypassAuthorizer

func NewBypassAuthorizer(auth authorizer.Authorizer, paths ...string) authorizer.Authorizer

NewBypassAuthorizer creates an Authorizer that always allows the exact paths described, and delegates to the nested authorizer for everything else.

Types

type GroupCache

type GroupCache interface {
	GroupsFor(string) ([]*userapi.Group, error)
}

Jump to

Keyboard shortcuts

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