auth

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxConcurrentRemoteUpgrades = 10
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	Authenticate(username, password string) error
}

func NewBackend

func NewBackend(conf *Config, prom prometheus.Registerer, infoLog, dbgLog *log.Logger) (Backend, error)

func NewLDAPBackend

func NewLDAPBackend(conf *LDAPConfig, prom prometheus.Registerer, infoLog, dbgLog *log.Logger) (Backend, error)

func NewStaticBackend

func NewStaticBackend(conf *StaticConfig, prom prometheus.Registerer, infoLog, dbgLog *log.Logger) (Backend, error)

func NewWhawtyAuthBackend

func NewWhawtyAuthBackend(conf *WhawtyAuthConfig, prom prometheus.Registerer, infoLog, dbgLog *log.Logger) (Backend, error)

type Config

type Config struct {
	LDAP   *LDAPConfig       `yaml:"ldap"`
	Static *StaticConfig     `yaml:"static"`
	Whawty *WhawtyAuthConfig `yaml:"whawty"`
}

type LDAPBackend

type LDAPBackend struct {
	// contains filtered or unexported fields
}

func (*LDAPBackend) Authenticate

func (b *LDAPBackend) Authenticate(username, password string) (err error)

type LDAPConfig

type LDAPConfig struct {
	Servers          []string             `yaml:"servers"`
	RootDN           string               `yaml:"root-dn"`
	ManagerDN        string               `yaml:"manager-dn"`
	ManagerPassword  string               `yaml:"manager-password"`
	UserSearchBase   string               `yaml:"user-search-base"`
	UserSearchFilter string               `yaml:"user-search-filter"`
	UserDNTemplate   string               `yaml:"user-dn-template"`
	StartTLS         bool                 `yaml:"start-tls"`
	TLS              *tlsconfig.TLSConfig `yaml:"tls"`
}

type NullBackend

type NullBackend struct {
}

func (*NullBackend) Authenticate

func (b *NullBackend) Authenticate(username, password string) error

type StaticBackend

type StaticBackend struct {
	// contains filtered or unexported fields
}

func (*StaticBackend) Authenticate

func (b *StaticBackend) Authenticate(username, password string) error

type StaticConfig

type StaticConfig struct {
	HTPasswd   string `yaml:"htpasswd"`
	AutoReload bool   `yaml:"autoreload"`
}

type WhawtyAuthBackend

type WhawtyAuthBackend struct {
	// contains filtered or unexported fields
}

func (*WhawtyAuthBackend) Authenticate

func (b *WhawtyAuthBackend) Authenticate(username, password string) error

type WhawtyAuthConfig

type WhawtyAuthConfig struct {
	ConfigFile     string `yaml:"store"`
	AutoReload     bool   `yaml:"autoreload"`
	RemoteUpgrades *struct {
		URL      string               `yaml:"url"`
		HTTPHost string               `yaml:"http-host"`
		TLS      *tlsconfig.TLSConfig `yaml:"tls"`
	} `yaml:"remote-upgrades"`
}

Jump to

Keyboard shortcuts

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