* added regulation validator * made regulations find_time and ban_time values duration notation strings * added DefaultRegulationConfiguration for the validator * made session expiration and inactivity values duration notation strings * TOTP period does not need to be converted because adjustment should be discouraged * moved TOTP defaults to DefaultTOTPConfiguration and removed the consts * arranged the root config validator in configuration file order * adjusted tests for the changes * moved duration notation docs to root of configuration * added references to duration notation where applicable * project wide gofmt and goimports: * run gofmt * run goimports -local github.com/authelia/authelia -w on all files * Make jwt_secret error uniform and add tests * now at 100% coverage for internal/configuration/validator/configuration.go
1.3 KiB
layout | title | nav_order | has_children |
---|---|---|---|
default | Configuration | 4 | true |
Configuration
Authelia uses a YAML file as configuration file. A template with all possible options can be found here, at the root of the repository.
When running Authelia, you can specify your configuration by passing the file path as shown below.
$ authelia --config config.custom.yml
Duration Notation Format
We have implemented a string based notation for configuration options that take a duration. This section describes its usage. You can use this implementation in: session for expiration, inactivity, and remember_me_duration; and regulation for ban_time, and find_time. This notation also supports just providing the number of seconds instead.
The notation is comprised of a number which must be positive and not have leading zeros, followed by a letter denoting the unit of time measurement. The table below describes the units of time and the associated letter.
Unit | Associated Letter |
---|---|
Years | y |
Months | M |
Weeks | w |
Days | d |
Hours | h |
Minutes | m |
Seconds | s |
Examples:
- 1 hour and 30 minutes: 90m
- 1 day: 1d
- 10 hours: 10h