Documentation ¶
Index ¶
- func AuthenticationHandlerFilter(handler http.Handler, authenticator authenticator.Request, ...) http.Handler
- func AuthorizationFilter(handler http.Handler, authorizer kauthorizer.Authorizer, ...) http.Handler
- func Forbidden(reason string, attributes kauthorizer.Attributes, w http.ResponseWriter, ...)
- func ImpersonationFilter(handler http.Handler, a kauthorizer.Authorizer, groupCache GroupCache, ...) http.Handler
- func NewBypassAuthorizer(auth kauthorizer.Authorizer, paths ...string) kauthorizer.Authorizer
- type GroupCache
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthenticationHandlerFilter ¶
func AuthenticationHandlerFilter(handler http.Handler, authenticator authenticator.Request, contextMapper apirequest.RequestContextMapper) http.Handler
AuthenticationHandlerFilter creates a filter object that will enforce authentication directly
func AuthorizationFilter ¶
func AuthorizationFilter(handler http.Handler, authorizer kauthorizer.Authorizer, authorizationAttributeBuilder authorizer.AuthorizationAttributeBuilder, contextMapper apirequest.RequestContextMapper) http.Handler
AuthorizationFilter imposes normal authorization rules
func Forbidden ¶
func Forbidden(reason string, attributes kauthorizer.Attributes, w http.ResponseWriter, req *http.Request)
Forbidden renders a simple forbidden error to the response
func ImpersonationFilter ¶
func ImpersonationFilter(handler http.Handler, a kauthorizer.Authorizer, groupCache GroupCache, contextMapper apirequest.RequestContextMapper) http.Handler
ImpersonationFilter checks for impersonation rules against the current user.
func NewBypassAuthorizer ¶
func NewBypassAuthorizer(auth kauthorizer.Authorizer, paths ...string) kauthorizer.Authorizer
NewBypassAuthorizer creates an Authorizer that always allows the exact paths described, and delegates to the nested authorizer for everything else.
Types ¶
Click to show internal directories.
Click to hide internal directories.