Documentation ¶
Index ¶
- Variables
- func IsNetworkValid(network string) bool
- func IsPolicyValid(policy string) bool
- func IsSubjectValid(subject string) bool
- type ACLRule
- type AccessControlConfiguration
- type AuthenticationBackendConfiguration
- type Configuration
- type DuoAPIConfiguration
- type EmailNotifierConfiguration
- type ErrorContainer
- type FileAuthenticationBackendConfiguration
- type FileSystemNotifierConfiguration
- type LDAPAuthenticationBackendConfiguration
- type LocalStorageConfiguration
- type MySQLStorageConfiguration
- type NotifierConfiguration
- type PostgreSQLStorageConfiguration
- type QueueItem
- type RedisSessionConfiguration
- type RegulationConfiguration
- type SMTPNotifierConfiguration
- type SQLStorageConfiguration
- type SessionConfiguration
- type StorageConfiguration
- type StructValidator
- type TOTPConfiguration
- type Validator
Constants ¶
This section is empty.
Variables ¶
var DefaultSessionConfiguration = SessionConfiguration{
Name: "authelia_session",
Expiration: 3600,
}
DefaultSessionConfiguration is the default session configuration
Functions ¶
func IsNetworkValid ¶
IsNetworkValid check if a network is valid
func IsSubjectValid ¶
IsSubjectValid check if a subject is valid
Types ¶
type ACLRule ¶
type ACLRule struct { Domain string `yaml:"domain"` Policy string `yaml:"policy"` Subject string `yaml:"subject"` Networks []string `yaml:"networks"` Resources []string `yaml:"resources"` }
ACLRule represent one ACL rule
func (*ACLRule) Validate ¶
func (r *ACLRule) Validate(validator *StructValidator)
Validate validate an ACL Rule
type AccessControlConfiguration ¶
type AccessControlConfiguration struct { DefaultPolicy string `yaml:"default_policy"` Rules []ACLRule `yaml:"rules"` }
AccessControlConfiguration represents the configuration related to ACLs.
func (*AccessControlConfiguration) Validate ¶
func (acc *AccessControlConfiguration) Validate(validator *StructValidator)
Validate validate the access control configuration
type AuthenticationBackendConfiguration ¶
type AuthenticationBackendConfiguration struct { Ldap *LDAPAuthenticationBackendConfiguration `yaml:"ldap"` File *FileAuthenticationBackendConfiguration `yaml:"file"` }
AuthenticationBackendConfiguration represents the configuration related to the authentication backend.
type Configuration ¶
type Configuration struct { Host string `yaml:"host"` Port int `yaml:"port"` LogsLevel string `yaml:"logs_level"` JWTSecret string `yaml:"jwt_secret"` DefaultRedirectionURL string `yaml:"default_redirection_url"` GoogleAnalyticsTrackingID string `yaml:"google_analytics"` AuthenticationBackend AuthenticationBackendConfiguration `yaml:"authentication_backend"` Session SessionConfiguration `yaml:"session"` TOTP *TOTPConfiguration `yaml:"totp"` DuoAPI *DuoAPIConfiguration `yaml:"duo_api"` AccessControl *AccessControlConfiguration `yaml:"access_control"` Regulation *RegulationConfiguration `yaml:"regulation"` Storage *StorageConfiguration `yaml:"storage"` Notifier *NotifierConfiguration `yaml:"notifier"` }
Configuration object extracted from YAML configuration file.
type DuoAPIConfiguration ¶
type DuoAPIConfiguration struct { Hostname string `yaml:"hostname"` IntegrationKey string `yaml:"integration_key"` SecretKey string `yaml:"secret_key"` }
DuoAPIConfiguration represents the configuration related to Duo API.
type EmailNotifierConfiguration ¶
type EmailNotifierConfiguration struct { Username string `yaml:"username"` Password string `yaml:"password"` Sender string `yaml:"sender"` Service string `yaml:"service"` }
EmailNotifierConfiguration represents the configuration of the email service notifier (like GMAIL API).
type ErrorContainer ¶
ErrorContainer represents a container where we can add errors and retrieve them
type FileAuthenticationBackendConfiguration ¶
type FileAuthenticationBackendConfiguration struct {
Path string `yaml:"path"`
}
FileAuthenticationBackendConfiguration represents the configuration related to file-based backend
type FileSystemNotifierConfiguration ¶
type FileSystemNotifierConfiguration struct {
Filename string `yaml:"filename"`
}
FileSystemNotifierConfiguration represents the configuration of the notifier writing emails in a file.
type LDAPAuthenticationBackendConfiguration ¶
type LDAPAuthenticationBackendConfiguration struct { URL string `yaml:"url"` SkipVerify bool `yaml:"skip_verify"` BaseDN string `yaml:"base_dn"` AdditionalUsersDN string `yaml:"additional_users_dn"` UsersFilter string `yaml:"users_filter"` AdditionalGroupsDN string `yaml:"additional_groups_dn"` GroupsFilter string `yaml:"groups_filter"` GroupNameAttribute string `yaml:"group_name_attribute"` MailAttribute string `yaml:"mail_attribute"` User string `yaml:"user"` Password string `yaml:"password"` }
LDAPAuthenticationBackendConfiguration represents the configuration related to LDAP server.
type LocalStorageConfiguration ¶
type LocalStorageConfiguration struct {
Path string `yaml:"path"`
}
LocalStorageConfiguration represents the configuration when using local storage.
type MySQLStorageConfiguration ¶
type MySQLStorageConfiguration struct {
SQLStorageConfiguration `yaml:",inline"`
}
MySQLStorageConfiguration represents the configuration of a MySQL database
type NotifierConfiguration ¶
type NotifierConfiguration struct { FileSystem *FileSystemNotifierConfiguration `yaml:"filesystem"` Email *EmailNotifierConfiguration `yaml:"email"` SMTP *SMTPNotifierConfiguration `yaml:"smtp"` }
NotifierConfiguration representes the configuration of the notifier to use when sending notifications to users.
type PostgreSQLStorageConfiguration ¶
type PostgreSQLStorageConfiguration struct { SQLStorageConfiguration `yaml:",inline"` SSLMode string `yaml:"sslmode"` }
PostgreSQLStorageConfiguration represents the configuration of a Postgres database
type QueueItem ¶
type QueueItem struct {
// contains filtered or unexported fields
}
QueueItem an item representing a struct field and its path.
type RedisSessionConfiguration ¶
type RedisSessionConfiguration struct { Host string `yaml:"host"` Port int64 `yaml:"port"` Password string `yaml:"password"` }
RedisSessionConfiguration represents the configuration related to redis session store.
type RegulationConfiguration ¶
type RegulationConfiguration struct { MaxRetries int `yaml:"max_retries"` FindTime int64 `yaml:"find_time"` BanTime int64 `yaml:"ban_time"` }
RegulationConfiguration represents the configuration related to regulation.
type SMTPNotifierConfiguration ¶
type SMTPNotifierConfiguration struct { Username string `yaml:"username"` Password string `yaml:"password"` Secure string `yaml:"secure"` Host string `yaml:"host"` Port int `yaml:"port"` Sender string `yaml:"sender"` }
SMTPNotifierConfiguration represents the configuration of the SMTP server to send emails with.
type SQLStorageConfiguration ¶
type SQLStorageConfiguration struct { Host string `yaml:"host"` Port int `yaml:"port"` Database string `yaml:"database"` Username string `yaml:"username"` Password string `yaml:"password"` }
SQLStorageConfiguration represents the configuration of the SQL database
type SessionConfiguration ¶
type SessionConfiguration struct { Name string `yaml:"name"` Secret string `yaml:"secret"` // Expiration in seconds Expiration int64 `yaml:"expiration"` // Inactivity in seconds Inactivity int64 `yaml:"inactivity"` Domain string `yaml:"domain"` Redis *RedisSessionConfiguration `yaml:"redis"` }
SessionConfiguration represents the configuration related to user sessions.
type StorageConfiguration ¶
type StorageConfiguration struct { Local *LocalStorageConfiguration `yaml:"local"` MySQL *MySQLStorageConfiguration `yaml:"mysql"` PostgreSQL *PostgreSQLStorageConfiguration `yaml:"postgres"` }
StorageConfiguration represents the configuration of the storage backend.
type StructValidator ¶
type StructValidator struct {
// contains filtered or unexported fields
}
StructValidator is a validator for structs
func NewStructValidator ¶
func NewStructValidator() *StructValidator
NewStructValidator is a constructor of struct validator
func (*StructValidator) Errors ¶
func (v *StructValidator) Errors() []error
Errors returns the errors.
func (*StructValidator) HasErrors ¶
func (v *StructValidator) HasErrors() bool
HasErrors checks whether the validator contains errors.
func (*StructValidator) Push ¶
func (v *StructValidator) Push(err error)
Push an error in the validator.
type TOTPConfiguration ¶
type TOTPConfiguration struct {
Issuer string
}
TOTPConfiguration represents the configuration related to TOTP options.
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
Validator represents the validator interface
func (*Validator) PrintErrors ¶
func (v *Validator) PrintErrors()
PrintErrors display the errors thrown during validation