Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrBadRequest = AuthErr(http.StatusBadRequest, "bad request: invalid token format") ErrUnauthenticated = AuthErr(http.StatusUnauthorized, "bad request: unauthenticated") ErrInternalAuthN = AuthErr(http.StatusInternalServerError, "internal error: failed to authenticate user") ErrInternalAuthZ = AuthErr(http.StatusInternalServerError, "internal error: failed to authorize user") )
Functions ¶
Types ¶
type SubjectAuthorizer ¶
type SubjectAuthorizer struct {
// contains filtered or unexported fields
}
func NewSubjectAuthorizer ¶
func NewSubjectAuthorizer(client kubernetes.Interface) *SubjectAuthorizer
NewSubjectAuthorizer creates a new authorizer with the provided Kubernetes client.
func (*SubjectAuthorizer) AuthorizeSubject ¶
func (s *SubjectAuthorizer) AuthorizeSubject(ctx context.Context, user authnv1.UserInfo, namespace, group, resource, verb string) (bool, error)
AuthorizeSubject checks if the user is allowed to perform the provided action
type TokenAuthenticator ¶
type TokenAuthenticator struct {
// contains filtered or unexported fields
}
func NewTokenAuthenticator ¶
func NewTokenAuthenticator(client kubernetes.Interface) *TokenAuthenticator
func (*TokenAuthenticator) AuthenticateFromHeader ¶
Click to show internal directories.
Click to hide internal directories.