This repository was archived by the owner on Jan 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Config
Victor Brekenfeld edited this page Aug 2, 2016
·
2 revisions
Basic hazel configuration arguments can be given via command line. However no all options are available via command line arguments, as some options need a lot more configuration then it would be feasible to provide through a single line of text. This is why you may provide a configuration file for hazel via it's -c flag.
The config file is toml file, you may read about this format here
Hazels configuration file features multiple sections, most of them are not required.
-
db_url- Sets the Uri for the postgres server, including the database to use -
migrations- Sets the folder for the provided database migrations, you can usually leave the default here -
storage- Sets the folder for storing chocolatey packages.
-
max_upload_filesize_mb- Sets the maximum package size allowed to be uploaded -
resources- Sets the folder for the provided resources like html templates hazel needs
-
port- Sets the webservers port
-
certificate- Path to the certificate -
key- Path to the private key
-
logfile- Sets the path of the logfile to write into. No logfile is created if not provided -
verbosity- Sets the logging verbosity (0: Error, 1: Warning, 2: Info, 3: Debug, 4: Trace) -
quiet- Disables logging to stdout/stderr completely
-
superuser_password- Sets the password for the admin superuser account -
cookie_key- Sets the key for encrypting the web frontends cookie values. (Set this to a random long (e.g. 64 characters) string or leave it free) -
open_for_registration- Sets if registrations are possible
auth.mail - If this section exists, newly registrated accounts need to confirm their mail address before having any new permissions
-
hostname- Sets the Hostname/IP of the mail server to use -
port- Sets the port of the mail server to use -
hello_name- Sets the Helo/Ehlo name to use via SMTP -
mail_address- Sets the sending mail address for confirmation mails -
username- Sets the username if necessary -
password- Sets the password for authentication -
authentication- May either beCramMD5orPlainfor Authentication (Default Plain) -
encrypt- Sets if the connection to the mail server shall always be encrypted or never (if unset: try encrypted) -
utf8- Sets if the mails should be encoded via UTF8 -
fullname_website- Sets the mails name of the website -
domain_website- Sets the full domain of the website for the confirmation link
-
server_uri- Sets the ldap server uri -
login_mask- Sets the login mask -
login_mask_cn_substitution- Sets the substring oflogin_maskto be replaced by the actual user common_name -
common_name- Sets the functional account for user search -
password- Sets the functional accounts user password -
scope- Sets the search scope for users -
filter- Sets the filter to find a user given a username -
filter_username_substitution- Sets the substring offilterto be replaced by the actual provided username -
fullname_attr- Sets the ldap argument providing the actual common_name / fullname of the user
[backend]
db_url = "postgres://postgres:postgr3s@localhost/hazel"
migrations = "/usr/share/hazel/migrations/"
storage = "/var/lib/hazel/storage/"
[web]
max_upload_filesize_mb = 10
resources = "/usr/share/hazel/resources/"
[server]
port = 443
[server.https]
certificate = "/var/lib/hazel/cert"
key = "/var/lib/hazel/key.priv"
[log]
logfile = "/var/log/hazel.log"
quiet = false
verbosity = 3
[auth]
superuser_password = "ThisNeedsToBeVerySecure"
cookie_key = "40JXEArhoSfvDeHmkhh2xZF9ODjREQK2AujHRso8zV7tMaX0Pfq7JcnIyTtejGh0" # Please create your own
open_for_registration = true
[auth.ldap]
server_uri = "ldap://ldap.my_domain.org.com"
login_mask = "cn={cn},ou=section,dc=my_domain,dc=org,dc=com"
login_mask_cn_substitution = "{cn}"
common_name = "functional"
password = "functi0nal"
scope = "ou=section,dc=my_domain,dc=org,dc=com"
filter = "(&(objectClass=user)(!(objectClass=computer))(sAMAccountName={user})(memberof=CN=HazelUsers,ou=section,DC=my_domain,DC=org,DC=com))"
filter_username_substitution = "{user}"
fullname_attr = "cn"