Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTokenAuthFilter ¶
func NewTokenAuthFilter( findServiceAccountByTokenFn func( ctx context.Context, token string, ) (authn.ServiceAccount, error), findSessionFn func(ctx context.Context, token string) (authn.Session, error), findEventByTokenFn func( ctx context.Context, token string, ) (core.Event, error), config *TokenAuthFilterConfig, ) restmachinery.Filter
NewTokenAuthFilter returns an implementation of the restmachinery.Filter interface that decorates an http.HandlerFunc to carry out request authentication by extracting an opaque bearer token form the HTTP Authorization header and using that token to locate an established Session.
Types ¶
type TokenAuthFilterConfig ¶
type TokenAuthFilterConfig struct { // RootUserEnabled indicates whether the TokenAuthFilter should permit the // "root" user to authenticate using a password. RootUserEnabled bool // ThirdPartyAuthEnabled indicates whether the TokenAuthFilter service should // permit User authentication via third-parties. ThirdPartyAuthEnabled bool // FindUserFn is a function for locating a User. This field is applicable only // when the value of the ThirdPartyAuthEnabled field is true. FindUserFn func(ctx context.Context, id string) (authn.User, error) // HashedSchedulerToken is a secure hash of the token used by the scheduler // component. HashedSchedulerToken string // HashedObserverToken is a secure hash of the token used by the observer // component. HashedObserverToken string }
TokenAuthFilterConfig encapsulates several configuration options for the TokenAuthFilter.
Click to show internal directories.
Click to hide internal directories.