authproxy

package
v0.0.0-...-b01d169 Latest Latest
Warning

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

Go to latest
Published: May 30, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(c *Config) (http.Handler, error)

New constructs an Kubernetes auth proxy which authenticates client requests and uses impersonation headers to impersonate that user to the backend service.

Types

type Authenticator

type Authenticator interface {
	// AuthenticateToken maps a bearer token to a username and set of groups.
	AuthenticateToken(string) (username string, groups []string, err error)
}

Authenticator is a method for authenticating a bearer token.

type Config

type Config struct {
	// Backend address, authentication strategy, and TLS configuration.
	Backend          string
	BackendAuth      func(r *http.Request)
	BackendTLSConfig *tls.Config

	// Authenticator for evaluating bearer tokesn of client requests.
	Authenticator Authenticator

	// Optional logger to use when reporting errors. If not supplied, the
	// proxy uses the log package's default logger.
	Logger *log.Logger
}

Config holds fields for customizing the auth proxy behavior.

Jump to

Keyboard shortcuts

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