auth

package
v0.0.0-...-b990ac8 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// DefAuthDirectory default directory used to store files
	// to authenticate request in NGINX
	DefAuthDirectory = "/etc/nginx/auth"
)

Variables

View Source
var (

	// ErrInvalidAuthType is return in case of unsupported authentication type
	ErrInvalidAuthType = errors.New("invalid authentication type")

	// ErrMissingAuthType is return when the annotation for authentication is missing
	ErrMissingAuthType = errors.New("authentication type is missing")

	// ErrMissingSecretName is returned when the name of the secret is missing
	ErrMissingSecretName = errors.New("secret name is missing")

	// ErrMissingAuthInSecret is returned when there is no auth key in secret data
	ErrMissingAuthInSecret = errors.New("the secret does not contains the auth key")

	// ErrMissingAnnotations is returned when the ingress rule
	// does not contains annotations related with authentication
	ErrMissingAnnotations = errors.New("missing authentication annotations")
)

Functions

This section is empty.

Types

type Nginx

type Nginx struct {
	Type    string
	Realm   string
	File    string
	Secured bool
}

Nginx returns authentication configuration for an Ingress rule

func ParseAnnotations

func ParseAnnotations(kubeClient client.Interface, ing *extensions.Ingress, authDir string) (*Nginx, error)

ParseAnnotations parses the annotations contained in the ingress rule used to add authentication in the paths defined in the rule and generated an htpasswd compatible file to be used as source during the authentication process

Jump to

Keyboard shortcuts

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