module

Exu

Exu is the main namespace for the exu web administration daemon.

Constants

COOKIE_NAME = Web::Auth::SessionManager::COOKIE_NAME
DOMAIN_REGEX = /^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/
SESSION_KEY_PATH = Web::Auth::SessionManager::SESSION_KEY_PATH
VERSION = "0.2.3"

Class methods

assign_domain_to_user(username : String, domain : String) : Nil

Assign domain ownership to user in exu.yaml under lock

Source
autodiscover_xml
Source
extract_cn(dn : String) : String

Extract Common Name (CN) from Client DN header

Source
extract_username_from_dn(dn : String) : String | Nil
Source
generate_session_token(username : String) : String
Source
get_client_dn(env : HTTP::Server::Context) : String
Source
get_domain_dmarc(domain : String) : DmarcConfig

Get DMARC policy for a domain

Source
get_session_username(env : HTTP::Server::Context) : String | Nil
Source
get_user_info(dn : String) : UserInfo

Load role mapping from exu.yaml config file

Source
get_user_info_by_username(username : String) : Exu::UserInfo

Load role mapping directly by username

Source
has_domain_access?(user_info : Exu::UserInfo, domain : String) : Bool

Verify domain access permissions

Source
mail_hostname

Returns the configured mail server hostname from EXU_MAIL_HOST, /etc/mailname, or System.hostname

Source
map_command_error(output : String) : Int32
Source
remove_domain_from_user(username : String, domain : String) : Nil

Remove domain ownership from user in exu.yaml under lock

Source
run_command(cmd : String, args : Array(String), input : String | Nil = nil) : Tuple(Bool, String)

Helper to run system commands safely with optional stdin input

Source
session_secret

Delegation methods preserving backward compatibility with existing tests and modules

Source
set_domain_dmarc(domain : String, dmarc : DmarcConfig) : Nil

Update DMARC policy for a domain in exu.yaml under lock

Source
setup

Orchestrates Kemal middleware and controller route registration

Source
thunderbird_autoconfig_xml
Source
valid_domain?(domain : String) : Bool

Validates FQDN domain syntax with at least one dot and RFC-compliant labels

Source
verify_session_token(token : String) : String | Nil
Source

Nested types