suites

package
v4.35.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2022 License: Apache-2.0 Imports: 28 Imported by: 0

README

Authelia Suites

A suite is a kind of virtual environment for Authelia. Please read the related documentation here to get more details.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AdminBaseURL = fmt.Sprintf("https://admin.%s", BaseDomain)

AdminBaseURL the base URL of the admin domain.

View Source
var AutheliaBaseURL = "https://authelia.example.com:9091"

AutheliaBaseURL the base URL of Authelia service.

View Source
var BaseDomain = "example.com:8080"

BaseDomain the base domain.

View Source
var DevBaseURL = fmt.Sprintf("https://dev.%s", BaseDomain)

DevBaseURL the base URL of the dev domain.

View Source
var DuoBaseURL = "https://duo.example.com"

DuoBaseURL the base URL of the Duo configuration API.

View Source
var HomeBaseURL = fmt.Sprintf("https://home.%s", BaseDomain)

HomeBaseURL the base URL of the home domain.

View Source
var LoginBaseURL = fmt.Sprintf("https://login.%s", BaseDomain)

LoginBaseURL the base URL of the login portal.

View Source
var MX1MailBaseURL = fmt.Sprintf("https://mx1.mail.%s", BaseDomain)

MX1MailBaseURL the base URL of the mx1.mail domain.

View Source
var MX2MailBaseURL = fmt.Sprintf("https://mx2.mail.%s", BaseDomain)

MX2MailBaseURL the base URL of the mx2.mail domain.

View Source
var MailBaseURL = fmt.Sprintf("https://mail.%s", BaseDomain)

MailBaseURL the base URL of the mail domain.

View Source
var OIDCBaseURL = fmt.Sprintf("https://oidc.%s", BaseDomain)

OIDCBaseURL the base URL of the oidc domain.

View Source
var PathPrefix = os.Getenv("PathPrefix")

PathPrefix the prefix/url_base of the login portal.

View Source
var PublicBaseURL = fmt.Sprintf("https://public.%s", BaseDomain)

PublicBaseURL the base URL of the public domain.

View Source
var SecureBaseURL = fmt.Sprintf("https://secure.%s", BaseDomain)

SecureBaseURL the base URL of the secure domain.

View Source
var SingleFactorBaseURL = fmt.Sprintf("https://singlefactor.%s", BaseDomain)

SingleFactorBaseURL the base URL of the singlefactor domain.

Functions

func ConfigureDuo

func ConfigureDuo(t *testing.T, allowDeny DuoPolicy)

ConfigureDuo configure duo api to allow or block auth requests.

func ConfigureDuoPreAuth added in v4.33.0

func ConfigureDuoPreAuth(t *testing.T, response duo.PreAuthResponse)

ConfigureDuoPreAuth configure duo api to respond with available devices or enrollment Url.

func GetLoginBaseURL

func GetLoginBaseURL() string

GetLoginBaseURL returns the URL of the login portal and the path prefix if specified.

func NewHTTPClient

func NewHTTPClient() *http.Client

NewHTTPClient create a new client skipping TLS verification and not redirecting.

Types

type CommandSuite

type CommandSuite struct {
	suite.Suite

	*DockerEnvironment
	// contains filtered or unexported fields
}

CommandSuite is a command line interface suite.

type DockerEnvironment

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

DockerEnvironment represent a docker environment.

func NewDockerEnvironment

func NewDockerEnvironment(files []string) *DockerEnvironment

NewDockerEnvironment create a new docker environment.

func (*DockerEnvironment) Down

func (de *DockerEnvironment) Down() error

Down destroy a docker environment.

func (*DockerEnvironment) Exec

func (de *DockerEnvironment) Exec(service string, command []string) (string, error)

Exec execute a command within a given service of the environment.

func (*DockerEnvironment) Logs

func (de *DockerEnvironment) Logs(service string, flags []string) (string, error)

Logs get logs of a given service of the environment.

func (*DockerEnvironment) Pull

func (de *DockerEnvironment) Pull(images ...string) error

Pull pull all images of needed in the environment.

func (*DockerEnvironment) Restart

func (de *DockerEnvironment) Restart(service string) error

Restart restarts a service.

func (*DockerEnvironment) Start

func (de *DockerEnvironment) Start(service string) error

Start a docker service.

func (*DockerEnvironment) Stop

func (de *DockerEnvironment) Stop(service string) error

Stop a docker service.

func (*DockerEnvironment) Up

func (de *DockerEnvironment) Up() error

Up spawn a docker environment.

type DuoPolicy

type DuoPolicy int32

DuoPolicy a type of policy.

const (
	// Deny deny policy.
	Deny DuoPolicy = iota
	// Allow allow policy.
	Allow DuoPolicy = iota
)

type Kind

type Kind struct{}

Kind used for running kind commands.

func (Kind) ClusterExists

func (k Kind) ClusterExists() (bool, error)

ClusterExists check whether a cluster exists.

func (Kind) CreateCluster

func (k Kind) CreateCluster() error

CreateCluster create a new Kubernetes cluster.

func (Kind) DeleteCluster

func (k Kind) DeleteCluster() error

DeleteCluster delete a Kubernetes cluster.

func (Kind) LoadImage

func (k Kind) LoadImage(imageName string) error

LoadImage load an image in the Kubernetes container.

type Kubectl

type Kubectl struct{}

Kubectl used for running kubectl commands.

func (Kubectl) DeployAuthelia

func (k Kubectl) DeployAuthelia() error

DeployAuthelia deploy Authelia application.

func (Kubectl) DeployThirdparties

func (k Kubectl) DeployThirdparties() error

DeployThirdparties deploy thirdparty services (ldap, db, ingress controllers, etc...).

func (Kubectl) StartDashboard

func (k Kubectl) StartDashboard() error

StartDashboard start Kube dashboard.

func (Kubectl) StartProxy

func (k Kubectl) StartProxy() error

StartProxy start a proxy.

func (Kubectl) StopDashboard

func (k Kubectl) StopDashboard() error

StopDashboard stop kube dashboard.

func (Kubectl) StopProxy

func (k Kubectl) StopProxy() error

StopProxy stop a proxy.

func (Kubectl) WaitPodsReady

func (k Kubectl) WaitPodsReady(timeout time.Duration) error

WaitPodsReady wait for all pods to be ready.

type Registry

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

Registry represent a registry of suite by name.

var GlobalRegistry *Registry

GlobalRegistry a global registry used by Authelia tooling.

func NewSuitesRegistry

func NewSuitesRegistry() *Registry

NewSuitesRegistry create a suites registry.

func (*Registry) Get

func (sr *Registry) Get(name string) Suite

Get return a suite by name.

func (*Registry) Register

func (sr *Registry) Register(name string, suite Suite)

Register register a suite by name.

func (*Registry) Suites

func (sr *Registry) Suites() []string

Suites list available suites.

type RodSession added in v4.33.0

type RodSession struct {
	Launcher  *launcher.Launcher
	WebDriver *rod.Browser
}

RodSession binding a chrome session with devtool protocol.

func StartRod added in v4.33.0

func StartRod() (*RodSession, error)

StartRod create a rod/chromedp session.

func StartRodWithProxy added in v4.33.0

func StartRodWithProxy(proxy string) (*RodSession, error)

StartRodWithProxy create a rod/chromedp session.

func (*RodSession) Stop added in v4.33.0

func (rs *RodSession) Stop() error

Stop stop the rod/chromedp session.

func (*RodSession) WaitElementLocatedByClassName added in v4.33.0

func (rs *RodSession) WaitElementLocatedByClassName(t *testing.T, page *rod.Page, className string) *rod.Element

WaitElementLocatedByClassName wait an element is located by class name.

func (*RodSession) WaitElementLocatedByID added in v4.35.0

func (rs *RodSession) WaitElementLocatedByID(t *testing.T, page *rod.Page, cssSelector string) *rod.Element

WaitElementLocatedByID waits for an element located by an id.

func (*RodSession) WaitElementsLocatedByID added in v4.35.0

func (rs *RodSession) WaitElementsLocatedByID(t *testing.T, page *rod.Page, cssSelector string) rod.Elements

WaitElementsLocatedByID waits for an elements located by an id.

type RodSuite added in v4.33.0

type RodSuite struct {
	suite.Suite

	*RodSession
	*rod.Page
}

RodSuite is a go-rod suite.

type Suite

type Suite struct {
	SetUp        func(tmpPath string) error
	SetUpTimeout time.Duration

	// Callback called when an error occur during setup phase.
	OnSetupTimeout func() error

	// Callback called when at least one test fail.
	OnError func() error

	TestTimeout time.Duration

	TearDown        func(tmpPath string) error
	TearDownTimeout time.Duration

	// A textual description of the suite purpose.
	Description string
}

Suite the definition of a suite.

Jump to

Keyboard shortcuts

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