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 ¶
func (config Config) New() (authenticator.Request, *spec.SecurityDefinitions, error)
New returns an authenticator.Request or an error that supports the standard Kubernetes authentication mechanisms.
Click to show internal directories.
Click to hide internal directories.