auth

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package auth contains APIServer authentication helpers.

Index

Constants

View Source
const (
	UserHeaderKey  = "X-Remote-User"
	GroupHeaderKey = "X-Remote-Group"
	ExtraHeaderKey = "X-Remote-Extra-"
)

Variables

This section is empty.

Functions

func NewHeaderAuthenticator

func NewHeaderAuthenticator() authenticator.Request

NewHeaderAuthenticator returns a new authenticator.Request that authenticates requests based on the X-Remote-User, X-Remote-Group, and X-Remote-Extra headers.

func NewHeaderRoundTripper

func NewHeaderRoundTripper(rt http.RoundTripper, userHeader string, groupHeaders, extraHeaders []string) *headerRoundTripper

NewHeaderRoundTripper returns a new round tripper that adds the given headers to the request.

func NewTransportWrapperFunc

func NewTransportWrapperFunc(userHeader string, groupHeaders, extraHeaders []string) func(rt http.RoundTripper) http.RoundTripper

NewTransportWrapperFunc returns a new transport.WrapperFunc that adds the given headers to the request.

func NewX509Authenticator

func NewX509Authenticator(clientCAPath string) (authenticator.Request, error)

NewX509Authenticator creates a new authenticator that authenticates requests based on the provided client certificate.

Types

This section is empty.

Jump to

Keyboard shortcuts

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