authenticator

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2018 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package authenticator contains code for creating an authenticator for a standalone cluster registry based on the configuration provided to the clusteregistry binary.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {

	// Anonymous determines whether anonymous authentication is enabled.
	Anonymous bool

	// BasicAuthFile is a path to a file that contains username/password pairs.
	BasicAuthFile string

	// ClientCAFile is a path to a certificate that can be used to validate
	// client certificates.
	ClientCAFile string

	// TokenAuthFile is a path to a file that contains bearer tokens.
	TokenAuthFile string

	// WebhookTokenAuthnConfigFile is a path to a file that contains configuration
	// for webhook-based authentication.
	WebhookTokenAuthnConfigFile string
	// WebhookTokenAuthnCacheTTL is the TTL of the webhook token cache.
	WebhookTokenAuthnCacheTTL time.Duration

	// TokenSuccessCacheTTL determines how long a successful token authentication
	// should be cached (that is, continue to succeed).
	TokenSuccessCacheTTL time.Duration

	// TokenFailureCacheTTL determines how long a failed token authentication
	// should be cached (that is, continue to fail).
	TokenFailureCacheTTL time.Duration

	// RequestHeaderConfig contains information about authenticating via request
	// headers.
	RequestHeaderConfig *authenticatorfactory.RequestHeaderConfig
}

Config defines the configuration options for authentication methods to be used with a standalone cluster registry. Refer to https://kubernetes.io/docs/admin/authentication/ for more information about each of the fields of this object.

func (Config) New

New returns an authenticator.Request or an error that supports the standard Kubernetes authentication mechanisms.

Jump to

Keyboard shortcuts

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